Public report of tirth8205/code-review-graph, published 15 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 15 November 2026, 19:34 UTC · Survey ID cd_a131def885f04d239074178741137f02

tirth8205/code-review-graph

Measured 15 November 2026, 19:34 UTC, at code version bbdda4b

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

CAI score 55out of 100 At risk Down 1 since the last survey

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

A medium codebase: 89,533 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 1.4 person-years · Weakest lens: Code Health, 40

Findings by how serious they are

83 critical 811 serious 55 minor

12 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 19:34 UTC

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

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

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

55of 55 dimensions measured by tools.
940of 949 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
55dimensions across 6 lenses, read from 89,533 lines of product code in 2 projects.
Chapters

Executive summary

tirth8205/code-review-graph is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 55 out of 100, which the At risk rating leaves unchanged.

Code Health, at 40, is the weakest lens and counts most in the score. The best first step for the work it takes is making the five tests that check nothing check their results, worth about 5 points. Splitting the oversized files would lift Code Health itself, worth about 6 points. Raising Code Health to 70 would lift the score to about 65.

Sixty pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Sixteen known security holes in the packages the code depends on can be used by attackers, and four pipeline steps install packages that can change without warning. Pinning each tool to an exact version, updating the vulnerable packages and pinning what the pipeline installs would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and the unsafe setting in infrastructure or container files needs changing to safe values.

The product code is 89,533 lines, about €210,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 40 · counts for 46%Production Readiness 55 · counts for 25%Security and Compliance 69 · counts for 14%Maturity 79 · counts for 8%Architecture 91 · counts for 4%Performance 100 · counts for 2%

If Code Health rose from 40 to 70, the lowest score rated Strong, the score would rise from 55 to about 65.

Code composition: what the lines of code are
Product code 42%Tests 58%
New since the last survey: 291 findings

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

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

Fixed since the last survey: 87 findings

These 87 critical or serious findings were in the previous survey, on 3 November 2026, and are gone from this one.

  • Cyclomatic Complexity · skills.install_platform_configs (cyclomatic 49) code_review_graph/skills.py
  • Cyclomatic Complexity · build._compute_summaries (cyclomatic 38) code_review_graph/tools/build.py
  • Cyclomatic Complexity · auto_promote.decide (cyclomatic 36) scripts/auto_promote.py
  • Cyclomatic Complexity · audit_python_imports._file_facts (cyclomatic 33) scripts/audit_python_imports.py
  • Cyclomatic Complexity · audit_python_imports._attribution_is_justified (cyclomatic 23) scripts/audit_python_imports.py
  • Cyclomatic Complexity · promotion_gate.render_summary (cyclomatic 22) scripts/promotion_gate.py
  • Cyclomatic Complexity · render_pr_comment.render_markdown (cyclomatic 20) scripts/render_pr_comment.py
  • Cyclomatic Complexity · render_pr_comment._gaps_section (cyclomatic 19) scripts/render_pr_comment.py
  • Cyclomatic Complexity · auto_promote.normalise_reports (cyclomatic 18) scripts/auto_promote.py
  • Cyclomatic Complexity · scoped_resolver._scope_and_method (cyclomatic 17) code_review_graph/scoped_resolver.py
  • Cyclomatic Complexity · visualization._aggregate_file (cyclomatic 16) code_review_graph/visualization.py
  • Cyclomatic Complexity · auto_promote.gate_verdict (cyclomatic 16) scripts/auto_promote.py
  • Cognitive Complexity · skills.install_platform_configs (cognitive 124) code_review_graph/skills.py
  • Cognitive Complexity · audit_python_imports._file_facts (cognitive 70) scripts/audit_python_imports.py
  • Cognitive Complexity · build._compute_summaries (cognitive 69) code_review_graph/tools/build.py
  • Cognitive Complexity · auto_promote.decide (cognitive 41) scripts/auto_promote.py
  • Cognitive Complexity · promotion_gate.render_summary (cognitive 37) scripts/promotion_gate.py
  • Cognitive Complexity · audit_python_imports._attribution_is_justified (cognitive 31) scripts/audit_python_imports.py
  • Cognitive Complexity · audit_python_imports.audit_imports (cognitive 30) scripts/audit_python_imports.py
  • Cognitive Complexity · promotion_gate.parse_junit (cognitive 30) scripts/promotion_gate.py
  • Cognitive Complexity · audit_python_imports._classify_call (cognitive 25) scripts/audit_python_imports.py
  • Cognitive Complexity · render_pr_comment._gaps_section (cognitive 25) scripts/render_pr_comment.py
  • Cognitive Complexity · audit_python_imports.audit_calls (cognitive 24) scripts/audit_python_imports.py
  • Cognitive Complexity · audit_python_imports._annotation_at_path (cognitive 23) scripts/audit_python_imports.py
  • Cognitive Complexity · _common._resolve_graph_file_paths (cognitive 22) code_review_graph/tools/_common.py
  • Cognitive Complexity · auto_promote.normalise_reports (cognitive 21) scripts/auto_promote.py
  • Cognitive Complexity · render_pr_comment.main (cognitive 21) scripts/render_pr_comment.py
  • Cognitive Complexity · incremental.collect_all_files (cognitive 20) code_review_graph/incremental.py
  • Cognitive Complexity · auto_promote.required_contexts (cognitive 20) scripts/auto_promote.py
  • Cognitive Complexity · auto_promote.gate_verdict (cognitive 19) scripts/auto_promote.py
  • Cognitive Complexity · render_pr_comment.render_markdown (cognitive 19) scripts/render_pr_comment.py
  • Cognitive Complexity · visualization._build_name_index (cognitive 18) code_review_graph/visualization.py
  • Cognitive Complexity · audit_python_imports.audit_call_attribution (cognitive 18) scripts/audit_python_imports.py
  • Cognitive Complexity · uninstall._process_repo (cognitive 17) code_review_graph/uninstall.py
  • Cognitive Complexity · flows.detect_entry_points (cognitive 16) code_review_graph/flows.py
  • Cognitive Complexity · promotion_gate.run (cognitive 16) scripts/promotion_gate.py
  • God Classes · FileTooLong: scripts/audit_python_imports.py scripts/audit_python_imports.py
  • God Classes · FileTooLong: scripts/auto_promote.py scripts/auto_promote.py
  • God Classes · FileTooLong: scripts/promotion_gate.py scripts/promotion_gate.py
  • Code Duplication · Near-duplicate member pair (98 shared lines) code_review_graph/spring_resolver.py
  • Code Duplication · Edited copy of a member (33 corresponding lines) code_review_graph/flows.py
  • Code Duplication · Edited copy of a member (23 corresponding lines) code_review_graph/communities.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) code_review_graph/graph.py
  • Code Duplication · Duplicated block (42–43 lines × 2) code_review_graph/spring_resolver.py
  • Code Duplication · Duplicated block (30–31 lines × 2) code_review_graph/flows.py
  • Code Duplication · Duplicated block (20–21 lines × 2) code_review_graph/skills.py
  • Code Duplication · Duplicated block (20 lines × 2) code_review_graph/cli.py
  • Code Duplication · Duplicated block (20 lines × 2) code_review_graph/skills.py
  • Code Duplication · Duplicated block (17–19 lines × 5) code_review_graph/parser.py
  • Code Duplication · Duplicated block (18 lines × 2) code_review_graph/changes.py
  • Code Duplication · Duplicated block (17–18 lines × 2) code_review_graph/graph.py
  • Code Duplication · Duplicated block (16–18 lines × 2) code_review_graph/parser.py
  • Code Duplication · Duplicated block (17–18 lines × 2) code_review_graph/parser.py
  • Code Duplication · Duplicated block (16 lines × 2) code_review_graph/tools/build.py
  • Code Duplication · Duplicated block (15–16 lines × 2) code_review_graph/uninstall.py
  • Code Duplication · Duplicated block (15 lines × 2) code_review_graph/cli.py
  • Code Duplication · Duplicated block (14–15 lines × 2) code_review_graph/parser.py
  • Code Duplication · Duplicated block (12–13 lines × 3) code_review_graph/skills.py
  • Code Duplication · Duplicated block (13 lines × 2) code_review_graph/graph.py
  • Code Duplication · Duplicated block (10–11 lines × 3) code_review_graph/tools/build.py
  • Code Duplication · Duplicated block (10 lines × 3) code_review_graph/graph.py
  • Code Duplication · Duplicated block (9 lines × 5) code_review_graph/graph.py
  • Code Duplication · Duplicated block (9 lines × 2) code_review_graph/tools/build.py
  • Code Duplication · Duplicated block (8 lines × 2) code_review_graph/graph.py
  • Code Duplication · Duplicated block (8 lines × 2) code_review_graph/graph.py
  • Code Duplication · Duplicated block (7 lines × 5) code_review_graph/tools/build.py
  • Code Duplication · Duplicated block (6 lines × 2) code_review_graph/tools/build.py
  • Code Duplication · Duplicated block (5 lines × 2) code_review_graph/spring_resolver.py
  • Code Duplication · Duplicated block (5 lines × 2) scripts/auto_promote.py
  • Code Duplication · Duplicated block (5 lines × 2) scripts/auto_promote.py
  • Churn × Complexity Hotspots · Hotspot: REDACTED REDACTED
  • Churn × Complexity Hotspots · Hotspot: code_review_graph/tools/_common.py code_review_graph/tools/_common.py
  • Churn × Complexity Hotspots · Repeated repair: code_review_graph/eval/runner.py code_review_graph/eval/runner.py
  • Static Analysis (SAST) · High: REDACTED .github/workflows/auto-promote.yml
  • Static Analysis (SAST) · High: REDACTED .github/workflows/auto-promote.yml
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Dependency Vulnerabilities · Critical vulnerability: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium vulnerability: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium vulnerability: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Change Coupling · Change coupling: communities.py ↔ flows.py code_review_graph/communities.py
  • Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) code-review-graph-vscode/src/features/reviewAssistant.ts
  • Large Files · code-review-graph-vscode/src/extension.ts: 852 lines of code code-review-graph-vscode/src/extension.ts
  • Large Files · code-review-graph-vscode/src/backend/sqlite.ts: 524 lines of code code-review-graph-vscode/src/backend/sqlite.ts
  • Dependency Hygiene · Unused dependency '@vscode/test-electron'
Rebuild cost: about €210,000 · Estimate
Cost to rebuild€70,000 to €350,000, for 1,159 to 3,678 hours of work, about 1.4 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.8 at a score of 55. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 89,533 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 5 No assertions finding(s) in Test Quality — start with sample_vitest.test.ts (3), sample_mocha.test.ts (2).
Raises the score by about 5 points · Low effort · Test Quality
2
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 6 points · Medium effort · Large Files
3
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Raises the score by about 5 points · Medium effort · Nullable reference types

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 €210,000 to build again, about 1.4 person-years of work. Its weakest lens is Code Health, at 40 (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
Resolve the 5 No assertions finding(s) in Test Quality. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 5 Test Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.6 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 195,903 lines over the last 90 days, which is about 794,496 lines a year. At that pace, the extra work comes to an estimated 120 to 719.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

60 modules, with 47 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; 20 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 code-review-graph-vscode.src.backend.cli2 code-review-graph-vscode.src.backend.sqlite3 code-review-graph-vscode.src.views.treeItems4 code_review_graph.cli5 code_review_graph.context_history6 code_review_graph.daemon7 code_review_graph.doctor8 code_review_graph.dsh9 code_review_graph.embeddings10 code_review_graph.errors11 code_review_graph.hints12 code_review_graph.incremental13 code_review_graph.inheritance14 code_review_graph.install_gitignore15 code_review_graph.install_plan16 code_review_graph.locking17 code_review_graph.neighbourhood18 code_review_graph.parser19 code_review_graph.registry20 code_review_graph.search21 code_review_graph.skills22 code_review_graph.uninstall23 code_review_graph.visualization24 scripts25 code-review-graph-vscode.src26 code-review-graph-vscode.src.backend27 code-review-graph-vscode.src.features.scmDecorations28 code-review-graph-vscode.src.onboarding.installer29 code-review-graph-vscode.src.views.graphWebview30 code-review-graph-vscode.src.views.treeView31 code-review-graph-vscode.src.webview.graph32 code_review_graph.graph33 code_review_graph.refactor34 code-review-graph-vscode.src.features35 code-review-graph-vscode.src.onboarding36 code-review-graph-vscode.src.webview37 code_review_graph.changes38 code_review_graph.tools.query39 code_review_graph40 code_review_graph.tools
1 code-review-graph-vscode.src.backend.cli
2 code-review-graph-vscode.src.backend.sqlite
3 code-review-graph-vscode.src.views.treeItems
4 code_review_graph.cli
5 code_review_graph.context_history
6 code_review_graph.daemon
7 code_review_graph.doctor
8 code_review_graph.dsh
9 code_review_graph.embeddings
10 code_review_graph.errors
11 code_review_graph.hints
12 code_review_graph.incremental
13 code_review_graph.inheritance
14 code_review_graph.install_gitignore
15 code_review_graph.install_plan
16 code_review_graph.locking
17 code_review_graph.neighbourhood
18 code_review_graph.parser
19 code_review_graph.registry
20 code_review_graph.search
21 code_review_graph.skills
22 code_review_graph.uninstall
23 code_review_graph.visualization
24 scripts
25 code-review-graph-vscode.src11
26 code-review-graph-vscode.src.backend1
27 code-review-graph-vscode.src.features.scmDecorations1
28 code-review-graph-vscode.src.onboarding.installer1
29 code-review-graph-vscode.src.views.graphWebview2
30 code-review-graph-vscode.src.views.treeView23
31 code-review-graph-vscode.src.webview.graph3
32 code_review_graph.graph112
33 code_review_graph.refactor1
34 code-review-graph-vscode.src.features52
35 code-review-graph-vscode.src.onboarding11
36 code-review-graph-vscode.src.webview1
37 code_review_graph.changes1
38 code_review_graph.tools.query3
39 code_review_graph21132121333134111113623
40 code_review_graph.tools42
Uses a module listed above itPart of a loopThe module itself
1 code-review-graph-vscode.src.backend.cli2 code-review-graph-vscode.src.backend.sqlite3 code-review-graph-vscode.src.views.treeItems4 code_review_graph.cli5 code_review_graph.context_history6 code_review_graph.daemon7 code_review_graph.doctor8 code_review_graph.dsh9 code_review_graph.embeddings10 code_review_graph.errors11 code_review_graph.hints12 code_review_graph.incremental13 code_review_graph.inheritance14 code_review_graph.install_gitignore15 code_review_graph.install_plan16 code_review_graph.locking17 code_review_graph.neighbourhood18 code_review_graph.parser19 code_review_graph.registry20 code_review_graph.search21 code_review_graph.skills22 code_review_graph.uninstall23 code_review_graph.visualization24 scripts25 code-review-graph-vscode.src26 code-review-graph-vscode.src.backend27 code-review-graph-vscode.src.features.scmDecorations28 code-review-graph-vscode.src.onboarding.installer29 code-review-graph-vscode.src.views.graphWebview30 code-review-graph-vscode.src.views.treeView31 code-review-graph-vscode.src.webview.graph32 code_review_graph.graph33 code_review_graph.refactor34 code-review-graph-vscode.src.features35 code-review-graph-vscode.src.onboarding36 code-review-graph-vscode.src.webview37 code_review_graph.changes38 code_review_graph.tools.query39 code_review_graph40 code_review_graph.toolscode-review-graph-vscode.src.backend.cli1code-review-graph-vscode.src.backend.sqlite2code-review-graph-vscode.src.views.treeItems3code_review_graph.cli4code_review_graph.context_history5code_review_graph.daemon6code_review_graph.doctor7code_review_graph.dsh8code_review_graph.embeddings9code_review_graph.errors10code_review_graph.hints11code_review_graph.incremental12code_review_graph.inheritance13code_review_graph.install_gitignore14code_review_graph.install_plan15code_review_graph.locking16code_review_graph.neighbourhood17code_review_graph.parser18code_review_graph.registry19code_review_graph.search20code_review_graph.skills21code_review_graph.uninstall22code_review_graph.visualization23scripts24code-review-graph-vscode.src25code-review-graph-vscode.src.backend26code-review-graph-vscode.src.features.scmDecorations27code-review-graph-vscode.src.onboarding.installer28code-review-graph-vscode.src.views.graphWebview29code-review-graph-vscode.src.views.treeView30code-review-graph-vscode.src.webview.graph31code_review_graph.graph32code_review_graph.refactor33code-review-graph-vscode.src.features34code-review-graph-vscode.src.onboarding35code-review-graph-vscode.src.webview36code_review_graph.changes37code_review_graph.tools.query38code_review_graph39code_review_graph.tools40111112233112152111132113212133313411111362342+20 more modules (most-connected shown)

At a glance — Code Health · 40% · Weak · gated by D1, D2, R3, X5 ·

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

At a glance — Maturity · 79% · Strong ·

At a glance — Readiness · 55% · Adequate · gated by R4, P3 ·

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

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection69High / Critical
A03:2025 — Software Supply Chain Failures29High / Critical
A02:2025 — Security Misconfiguration4High / Critical

Roadmap

Top priorities: Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package; Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`; Resolve the 5 No assertions finding(s) in Test Quality — start with sample_vitest.test.ts (3), sample_mocha.test.ts (2).

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

Do thisHelpsEffortDimension
Resolve the 5 No assertions finding(s) in Test Quality — start with sample_vitest.test.ts (3), sample_mocha.test.ts (2).+4.8 ptsLowTest Quality
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+6.0 ptsMediumLarge Files
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.+4.8 ptsMediumNullable reference types
Bring the 51 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with query.query_graph (cyclomatic 196), cli._dispatch (cyclomatic 165), CodeParser._get_name (cyclomatic 139).+4.1 ptsHighCyclomatic Complexity
Bring the 151 bodies over 30 down to 30 or less in Cognitive Complexity — start with CodeParser._get_name (cognitive 435), query.query_graph (cognitive 413), CodeParser._get_bases (cognitive 364).+4.1 ptsHighCognitive Complexity
Add tests that import the unreached modules (directly or through their public entry).+3.5 ptsMediumTest Coverage
Resolve the 6 redundant comment finding(s) in Comment Value — start with extension.ts (3), navigation.ts (2), graph.ts.+1.1 ptsLowComment Value
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.+2.6 ptsMediumSecurity & performance tooling

File quality

Per-file score 0–10 — a quality signature. Of 87 files carrying findings, judged against the Production bar: 3% slop · 83% mixed · 14% near-clean.

FileScoreBandWorst signal
REDACTED0.6SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.8SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED3.5SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED4.1MixedDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedCyclomatic Complexity: embeddings.get_provider (cyclomatic 31)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
code-review-graph-vscode/src/extension.ts6.3MixedCyclomatic Complexity: extension.registerCommands (cyclomatic 77)
code-review-graph-vscode/src/webview/graph.ts6.5MixedCyclomatic Complexity: graph.buildGraph (cyclomatic 44)
code-review-graph-vscode/src/features/navigation.ts6.6MixedCyclomatic Complexity: navigation.registerNavigationCommands (cyclomatic 20)
code_review_graph/tools/query.py7.0MixedCyclomatic Complexity: query.query_graph (cyclomatic 196)
code_review_graph/cli.py7.0MixedCyclomatic Complexity: cli._dispatch (cyclomatic 165)
code_review_graph/parser.py7.0MixedCyclomatic Complexity: CodeParser._get_name (cyclomatic 139)
code_review_graph/incremental.py7.0MixedCyclomatic Complexity: incremental.incremental_update (cyclomatic 105)

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

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

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

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

Could not be resolved — 12

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 55 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 55 dimensions across the health lenses
D1D2D3D4D5D6D10D13D14D15D16D17D19D20D24D26D27D28D29D30D31D34D35D36D37D43D44AX10AX3AX4AX6GD1M1M2M3M4P1P10P2P3P4P6P7PF3R1R10R2R3R4R5R6R7R8R9X5

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, 940 of 949 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1e0b3-da91-77ee-99ba-22864b7b3621.

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.

  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 33 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 298 test source file(s) (.py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .py, and the python executor ran against the .py half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in code-review-graph-vscode/ (23 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 9 shipped Python distribution(s) were read, but the outdated signal needs pypi.org, and no declaration here carries an exact pin to ask about — a floor or a range installs the newest release it admits and cannot be behind one, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its Python distribution dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock runtime evidence).
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • 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 REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

200 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was query.query_graph at 196.

query.query_graph (cyclomatic 196)code_review_graph/tools/query.py:1019
cli._dispatch (cyclomatic 165)code_review_graph/cli.py:2721
CodeParser._get_name (cyclomatic 139)code_review_graph/parser.py:22976
CodeParser._get_bases (cyclomatic 119)code_review_graph/parser.py:23802
CodeParser._extract_import (cyclomatic 107)code_review_graph/parser.py:24256

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

What to do

  1. Bring the 51 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with query.query_graph (cyclomatic 196), cli._dispatch (cyclomatic 165), CodeParser._get_name (cyclomatic 139). — 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 51 together lifts Cyclomatic Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

344 method(s) exceeded the cognitive complexity threshold of 15; the worst was CodeParser._get_name at 435.

CodeParser._get_name (cognitive 435)code_review_graph/parser.py:22976
query.query_graph (cognitive 413)code_review_graph/tools/query.py:1019
CodeParser._get_bases (cognitive 364)code_review_graph/parser.py:23802
cli._dispatch (cognitive 332)code_review_graph/cli.py:2721
CodeParser._extract_import (cognitive 238)code_review_graph/parser.py:24256

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

What to do

  1. Bring the 151 bodies over 30 down to 30 or less in Cognitive Complexity — start with CodeParser._get_name (cognitive 435), query.query_graph (cognitive 413), CodeParser._get_bases (cognitive 364). — 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 151 together lifts Cognitive Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

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

30 god class(es) detected.

FileTooLong: code_review_graph/parser.py · ×23code_review_graph/parser.py
FunctionTooLong: extension.registerCommands · ×3code-review-graph-vscode/src/extension.ts:80
TooManyMethods: CodeParser · ×2code_review_graph/parser.py:3801
MethodTooLong: GraphWebviewPanel.getHtmlContentcode-review-graph-vscode/src/views/graphWebview.ts:290
ClassTooLong: GraphWebviewPanelcode-review-graph-vscode/src/views/graphWebview.ts:14

What to do

  1. Resolve the 23 FileTooLong finding(s) in God Classes — start with parser.py, graph.py, incremental.py. — One of this dimension's main actionable groups (23 warning-level).
  2. Resolve the 3 FunctionTooLong finding(s) in God Classes — start with extension.ts, graph.ts, navigation.ts. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 2 TooManyMethods finding(s) in God Classes — start with parser.py, graph.py. — One of this dimension's main actionable groups (2 warning-level).

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

D4 · Code Duplication8.3 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

93 duplicated block group(s) detected. 4.2 % of the production lines (3,726 of 89,533) are in a reported copy. A further 31 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (11 lines × 2) · ×6code_review_graph/flows.py:275
Duplicated block (7 lines × 2) · ×5code_review_graph/graph.py:5592
Duplicated block (14 lines × 2) · ×4code_review_graph/communities.py:489
Duplicated block (9 lines × 3) · ×3code_review_graph/daemon.py:410
Edited copy of a member (23 corresponding lines) · ×2code_review_graph/communities.py:396

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

What to do

  1. Resolve the 6 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with parser.py (3), flows.py, graph.py. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 5 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with parser.py (4), graph.py. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 4 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with parser.py (2), communities.py, query.py. — One of this dimension's main actionable groups (4 warning-level).

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

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

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

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

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

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

0 of 37 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D10 · Test Quality7.7 / 10Strong✓ 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 7.7 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 5 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 33 tests. Measured on the JavaScript/TypeScript suite only — at least 298 test source file(s) (.py) went unread, so its test quality is unmeasured and is not in these counts.

No assertions: constructs a service · ×5tests/fixtures/sample_mocha.test.ts:6

What to do

  1. Resolve the 5 No assertions finding(s) in Test Quality — start with sample_vitest.test.ts (3), sample_mocha.test.ts (2). — One of this dimension's main actionable groups (5 warning-level).

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 43 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 9 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (34 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. This repository publishes itself under MIT, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's Python distribution dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots6.7 / 10Adequate✓ 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 6.7 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: code_review_graph/parser.py (135×139=18765); code_review_graph/cli.py (72×165=11880); code_review_graph/incremental.py (95×105=9975) Repeated repair below the complexity floor: code_review_graph/daemon.py (8 of 15 changes were fixes); code_review_graph/uncertainty.py (8 of 11 changes were fixes); code_review_graph/tools/_common.py (6 of 8 changes were fixes)

Hotspot: code_review_graph/parser.py · ×37code_review_graph/parser.py:22976
Repeated repair: code_review_graph/daemon.py · ×7code_review_graph/daemon.py:1668

What to do

  1. Resolve the 37 Hotspot finding(s) in Churn × Complexity Hotspots — start with parser.py, cli.py, incremental.py. — One of this dimension's main actionable groups (37 warning-level).
  2. Resolve the 7 Repeated repair finding(s) in Churn × Complexity Hotspots — start with daemon.py, uncertainty.py, _common.py. — One of this dimension's main actionable groups (7 warning-level).

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

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

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

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

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

23 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is code_review_graph/visualization.py. Counted over 105 of the 120 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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

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

No architecture decision records were found.

No ADRs foundpyproject.toml:59

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with pyproject.toml. — One of this dimension's main actionable groups (1 recommendation-level).

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

D24 · Comment Value5.0 4.7 / 10Weak✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 4.7 / 10 · rule-coverage 95% · ceiling Documented

6 of 119 judged comments only repeat the code they sit on (5.0 %). 12 comment(s) in another language or script were not judged.

redundant comment · ×6code-review-graph-vscode/src/extension.ts:894

What to do

  1. Resolve the 6 redundant comment finding(s) in Comment Value — start with extension.ts (3), navigation.ts (2), graph.ts. — One of this dimension's main actionable groups (6 recommendation-level).

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

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

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

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

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

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

Projects may be oversized for their cohesionpyproject.toml:1

What to do

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

D27 · Navigability6.2 / 10Adequate✓ Tool-verified

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

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

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

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

91 % of calls cross a namespace and 0 % go through an interface, but 17 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.

Scattered collaborators

What to do

  1. Resolve the 1 Scattered collaborators finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

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

69 finding(s): 0 critical, 66 high, 0 medium, 3 low. 58 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 5 file(s) — `.beads/hooks/post-checkout` (line 11, line 19), `.beads/hooks/post-merge` (line 11, line 19), `.beads/hooks/pre-commit` (line 11, line 19), `.beads/hooks/pre-push` (line 11, line 19), `.beads/hooks/prepare-commit-msg` (line 11, line 19) — 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

What to do

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

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

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

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

24 finding(s): 4 critical, 12 high, 7 medium, 1 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D31 · IaC & Container Security9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

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

REDACTED
REDACTED

What to do

  1. Resolve the 1 Critical IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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.

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

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

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

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

M1 · Documentation (README)10.0 / 10Exemplary✓ Tool-verified

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

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

M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

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

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

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

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

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

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

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

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

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

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

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

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

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

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

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

  • No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 7 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `uv`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:2

What to do

  • Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `npm`, `uv` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

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

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

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

P7 · Outbound HTTP resilience10.0 / 10Exemplary○ Nothing flagged

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

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

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

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 · Type Safety9.5 / 10Exemplary✓ Tool-verified

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

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

R10 · Code Duplication5.0 / 10Adequate✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • code-review-graph-vscode/src/features/navigation.ts:56 · code-review-graph-vscode/src/features/navigation.ts:134 — 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. — code-review-graph-vscode/src/features/navigation.ts:56
  • code-review-graph-vscode/src/extension.ts:185 · code-review-graph-vscode/src/extension.ts:239 · code-review-graph-vscode/src/extension.ts:417 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — code-review-graph-vscode/src/extension.ts:185
  • code-review-graph-vscode/src/extension.ts:221 · code-review-graph-vscode/src/extension.ts:450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — code-review-graph-vscode/src/extension.ts:221
  • code-review-graph-vscode/src/extension.ts:282 · code-review-graph-vscode/src/features/navigation.ts:118 — 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. — code-review-graph-vscode/src/extension.ts:282
  • code-review-graph-vscode/src/extension.ts:612 · code-review-graph-vscode/src/features/navigation.ts:174 — 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. — code-review-graph-vscode/src/extension.ts:612
  • code-review-graph-vscode/src/views/treeView.ts:81 · code-review-graph-vscode/src/views/treeView.ts:101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — code-review-graph-vscode/src/views/treeView.ts:81
  • code-review-graph-vscode/src/features/navigation.ts:15 · code-review-graph-vscode/src/features/navigation.ts:74 — 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. — code-review-graph-vscode/src/features/navigation.ts:15
  • code-review-graph-vscode/src/views/treeItems.ts:83 · code-review-graph-vscode/src/views/treeItems.ts:178 — the two spans are one implementation copied and then locally edited — 75 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. — code-review-graph-vscode/src/views/treeItems.ts:83
  • code-review-graph-vscode/src/features/navigation.ts:36 · code-review-graph-vscode/src/features/navigation.ts:114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — code-review-graph-vscode/src/features/navigation.ts:36
  • code-review-graph-vscode/src/webview/graph.ts:716 · code-review-graph-vscode/src/webview/graph.ts:739 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — code-review-graph-vscode/src/webview/graph.ts:716
  • code-review-graph-vscode/src/extension.ts:111 · code-review-graph-vscode/src/extension.ts:646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — code-review-graph-vscode/src/extension.ts:111
  • code-review-graph-vscode/src/extension.ts:467 · code-review-graph-vscode/src/extension.ts:586 — 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. — code-review-graph-vscode/src/extension.ts:467
  • code-review-graph-vscode/src/webview/graph.ts:328 · code-review-graph-vscode/src/webview/graph.ts:367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — code-review-graph-vscode/src/webview/graph.ts:328
  • code-review-graph-vscode/src/views/treeView.ts:25 · code-review-graph-vscode/src/views/treeView.ts:144 — 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. — code-review-graph-vscode/src/views/treeView.ts:25
  • code-review-graph-vscode/src/webview/graph.ts:303 · code-review-graph-vscode/src/webview/graph.ts:355 — 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. — code-review-graph-vscode/src/webview/graph.ts:303
  • code-review-graph-vscode/src/extension.ts:83 · code-review-graph-vscode/src/features/blastRadius.ts:22 · code-review-graph-vscode/src/features/navigation.ts:11 — 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. — code-review-graph-vscode/src/extension.ts:83
  • code-review-graph-vscode/src/extension.ts:68 · code-review-graph-vscode/src/features/cursorResolver.ts:31 · code-review-graph-vscode/src/features/search.ts:56 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — code-review-graph-vscode/src/extension.ts:68
  • code-review-graph-vscode/src/views/treeView.ts:120 · code-review-graph-vscode/src/views/treeView.ts:187 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — code-review-graph-vscode/src/views/treeView.ts:120
  • code-review-graph-vscode/src/features/blastRadius.ts:48 · code-review-graph-vscode/src/features/scmDecorations.ts:59 — the two spans are one implementation copied and then locally edited — 53 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — code-review-graph-vscode/src/features/blastRadius.ts:48

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 Complexity7.9 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • (anonymous) has cyclomatic complexity 28 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — code-review-graph-vscode/src/webview/graph.ts:466
  • getVisibleData has cyclomatic complexity 20 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — code-review-graph-vscode/src/webview/graph.ts:288
  • (anonymous) has cyclomatic complexity 17 and cognitive complexity 23; 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. — code-review-graph-vscode/src/extension.ts:658
  • getImpactRadius has cyclomatic complexity 16 and cognitive complexity 30; 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. — code-review-graph-vscode/src/backend/sqlite.ts:440
  • (anonymous) has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — code-review-graph-vscode/src/extension.ts:317, code-review-graph-vscode/src/features/navigation.ts:75
  • setData has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — code-review-graph-vscode/src/webview/graph.ts:230
R3 · Large Files1.1 / 10Critical✓ Tool-verified

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

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

  • code-review-graph-vscode/src/webview/graph.ts has 872 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — code-review-graph-vscode/src/webview/graph.ts:1
  • code-review-graph-vscode/src/extension.ts has 862 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — code-review-graph-vscode/src/extension.ts:1
  • code-review-graph-vscode/src/views/graphWebview.ts has 571 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — code-review-graph-vscode/src/views/graphWebview.ts:1
  • code-review-graph-vscode/src/backend/sqlite.ts has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — code-review-graph-vscode/src/backend/sqlite.ts:1

What to do

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

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

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

  • 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) — code-review-graph-vscode/src/extension.ts:1, code-review-graph-vscode/src/webview/graph.ts:1, code-review-graph-vscode/src/views/graphWebview.ts:1, …

What to do

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

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

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

R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code5.8 / 10Adequate✓ Tool-verified

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

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

  • 11 file(s) (~278 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.
  • Unreachable from the 4 application, 0 tooling and 12 test entry point(s) detected in this repo. Gate removals on `npm run compile` — an undetected custom entry would make these reachable.
  • no import path from any entry point (4 application, 0 tooling, 12 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 (×5) — code-review-graph-vscode/src/features/navigation.ts, code-review-graph-vscode/src/features/search.ts, code-review-graph-vscode/src/features/reviewAssistant.ts, …
  • no import path from any entry point (4 application, 0 tooling, 12 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (code-review-graph-vscode/src/features/blastRadius.ts, code-review-graph-vscode/src/features/navigation.ts) — 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 — code-review-graph-vscode/src/features/cursorResolver.ts

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 Hygiene10.0 / 10Exemplary✓ 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.

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.

X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

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

  • 0/1 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.

What to do

  • Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.

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 Health40%Weak — gated by D1, D2, R3, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture91%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity79%StrongSolid.
Readiness55%Adequate — gated by R4, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security69%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 10 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 23 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 1 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 — 70 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock 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 the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
  • D12 Dependency Hygiene — Not scored — 9 shipped Python distribution(s) were read, but the outdated signal needs pypi.org, and no declaration here carries an exact pin to ask about — a floor or a range installs the newest release it admits and cannot be behind one, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency does not read html yet; not measured.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed Python surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D32 Data Compliance (PII/GDPR) — 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.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the node:test suite in code-review-graph-vscode/ ran and not one test passed (Error: Could not locate the bindings file. Tried:), so the coverage report describes the failed run, not the code. 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.
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (48 value object(s))
  • 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 (this repository commits no MSBuild project, so its C# was read as syntax-only projects — a handler marked ONLY by an interface from a package is not visible without a build)
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — 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
  • X12 Unreachable branch — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — X18 reached only 0% of this repository's production lines — python (85,110 lines), typescript (4,423 lines), javascript (46 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — X24 reached only 5% of this repository's production lines — python (85,110 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — 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
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

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 — 83 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
  • + 35 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · Critical IaC · ×1
  • REDACTED
Serious — 811 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×37
  • Hotspot: code_review_graph/parser.py code_review_graph/parser.py:22976 — code_review_graph/parser.py changed 135 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 139 in CodeParser._get_name at line 22976. 111 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/parser.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/cli.py code_review_graph/cli.py:2721 — code_review_graph/cli.py changed 72 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 165 in cli._dispatch at line 2721. 44 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/cli.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/incremental.py code_review_graph/incremental.py:3173 — code_review_graph/incremental.py changed 95 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 105 in incremental.incremental_update at line 3173. 76 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/incremental.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/tools/query.py code_review_graph/tools/query.py:1019 — code_review_graph/tools/query.py changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 196 in query.query_graph at line 1019. 27 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/tools/query.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/graph.py code_review_graph/graph.py:3969 — code_review_graph/graph.py changed 79 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in GraphStore._resolve_bare_endpoints at line 3969. 63 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/graph.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/skills.py code_review_graph/skills.py:1291 — code_review_graph/skills.py changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in skills._install_platform_configs at line 1291. 38 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/skills.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/refactor.py code_review_graph/refactor.py:1955 — code_review_graph/refactor.py changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 98 in refactor.find_dead_code at line 1955. 13 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/refactor.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/tools/build.py code_review_graph/tools/build.py:486 — code_review_graph/tools/build.py changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in build.build_or_update_graph at line 486. 21 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/tools/build.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/changes.py code_review_graph/changes.py:1482 — code_review_graph/changes.py changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in changes.analyze_changes at line 1482. 13 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/changes.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/main.py code_review_graph/main.py:1624 — code_review_graph/main.py changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in main.main at line 1624. 24 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/main.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/tools/review.py code_review_graph/tools/review.py:434 — code_review_graph/tools/review.py changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in review.get_review_context at line 434. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/tools/review.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/search.py code_review_graph/search.py:995 — code_review_graph/search.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in search.hybrid_search at line 995. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/search.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/uninstall.py code_review_graph/uninstall.py:579 — code_review_graph/uninstall.py changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in uninstall._clean_hook_data at line 579. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/uninstall.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/spring_resolver.py code_review_graph/spring_resolver.py:30 — code_review_graph/spring_resolver.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in spring_resolver.resolve_spring_di_calls at line 30. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/spring_resolver.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/flows.py code_review_graph/flows.py:808 — code_review_graph/flows.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in flows.incremental_trace_flows at line 808. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/flows.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/render_pr_comment.py scripts/render_pr_comment.py:374 — scripts/render_pr_comment.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in render_pr_comment.render_markdown at line 374. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- scripts/render_pr_comment.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/communities.py code_review_graph/communities.py:604 — code_review_graph/communities.py changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in communities._split_oversized at line 604. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/communities.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/csharp_resolver.py code_review_graph/csharp_resolver.py:121 — code_review_graph/csharp_resolver.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in csharp_resolver.resolve_csharp_calls at line 121. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/csharp_resolver.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/aop_resolver.py code_review_graph/aop_resolver.py:316 — code_review_graph/aop_resolver.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in aop_resolver.resolve_aop_advice at line 316. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/aop_resolver.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/daemon_cli.py code_review_graph/daemon_cli.py:219 — code_review_graph/daemon_cli.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in daemon_cli._handle_status at line 219. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/daemon_cli.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code-review-graph-vscode/src/extension.ts code-review-graph-vscode/src/extension.ts:80 — code-review-graph-vscode/src/extension.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in extension.registerCommands at line 80. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code-review-graph-vscode/src/extension.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: code_review_graph/tools/context.py code_review_graph/tools/context.py:33 — code_review_graph/tools/context.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in context.get_minimal_context at line 33. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/tools/context.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/temporal_resolver.py code_review_graph/temporal_resolver.py:31 — code_review_graph/temporal_resolver.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in temporal_resolver.resolve_temporal_calls at line 31. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/temporal_resolver.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/scoped_resolver.py code_review_graph/scoped_resolver.py:235 — code_review_graph/scoped_resolver.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in scoped_resolver.resolve_scoped_calls at line 235. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/scoped_resolver.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/tsconfig_resolver.py code_review_graph/tsconfig_resolver.py:140 — code_review_graph/tsconfig_resolver.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in TsconfigResolver._resolve_extends at line 140. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/tsconfig_resolver.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 12 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×23
  • FileTooLong: code_review_graph/parser.py code_review_graph/parser.py — FileTooLong — 18396 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 17896 over it, 36.79× 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: code_review_graph/graph.py code_review_graph/graph.py — FileTooLong — 3986 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3486 over it, 7.97× 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: code_review_graph/incremental.py code_review_graph/incremental.py — FileTooLong — 3432 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2932 over it, 6.86× 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: code_review_graph/cli.py code_review_graph/cli.py — FileTooLong — 2586 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2086 over it, 5.17× 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: code_review_graph/skills.py code_review_graph/skills.py — FileTooLong — 2479 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1979 over it, 4.96× 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: code_review_graph/visualization.py code_review_graph/visualization.py — FileTooLong — 2267 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1767 over it, 4.53× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: code_review_graph/refactor.py code_review_graph/refactor.py — FileTooLong — 1903 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1403 over it, 3.81× 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: tools/query.py code_review_graph/tools/query.py — FileTooLong — 1661 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1161 over it, 3.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: code_review_graph/uninstall.py code_review_graph/uninstall.py — FileTooLong — 1342 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 842 over it, 2.68× 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: code_review_graph/changes.py code_review_graph/changes.py — FileTooLong — 1141 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 641 over it, 2.28× 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 — 1083 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 583 over it, 2.17× 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: code_review_graph/daemon.py code_review_graph/daemon.py — FileTooLong — 1056 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 556 over it, 2.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: code_review_graph/communities.py code_review_graph/communities.py — FileTooLong — 790 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 290 over it, 1.58× 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: code_review_graph/main.py code_review_graph/main.py — FileTooLong — 776 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 276 over it, 1.55× 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: tools/review.py code_review_graph/tools/review.py — FileTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 227 over it, 1.45× 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: code_review_graph/flows.py code_review_graph/flows.py — FileTooLong — 691 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 191 over it, 1.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tools/build.py code_review_graph/tools/build.py — FileTooLong — 678 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 178 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: webview/graph.ts code-review-graph-vscode/src/webview/graph.ts — FileTooLong — 662 significant lines (blank, comment-only and punctuation-only lines excluded). 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: code_review_graph/search.py code_review_graph/search.py — FileTooLong — 639 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 139 over it, 1.28× 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: code_review_graph/multi_worktree.py code_review_graph/multi_worktree.py — FileTooLong — 629 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 129 over it, 1.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: code_review_graph/doctor.py code_review_graph/doctor.py — FileTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 123 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/extension.ts code-review-graph-vscode/src/extension.ts — FileTooLong — 580 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: registerCommands (80-773). The bar is 500 significant lines; this is 80 over it, 1.16× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: diagrams/generate_diagrams.py diagrams/generate_diagrams.py — FileTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 14 over it, 1.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
R4 · Test Coverage · No test reaches this file · ×15
  • No test reaches this file code-review-graph-vscode/src/extension.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 code-review-graph-vscode/src/webview/graph.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 code-review-graph-vscode/src/views/graphWebview.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 code-review-graph-vscode/src/views/treeView.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 code-review-graph-vscode/src/views/treeItems.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 code-review-graph-vscode/src/features/navigation.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 code-review-graph-vscode/src/features/scmDecorations.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 code-review-graph-vscode/src/features/search.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 code-review-graph-vscode/src/features/reviewAssistant.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 code-review-graph-vscode/src/onboarding/installer.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 code-review-graph-vscode/src/onboarding/welcome.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 code-review-graph-vscode/src/views/statusBar.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 code-review-graph-vscode/src/features/blastRadius.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 code-review-graph-vscode/esbuild.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 code-review-graph-vscode/src/features/cursorResolver.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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×7
  • Repeated repair: code_review_graph/daemon.py code_review_graph/daemon.py:1668 — code_review_graph/daemon.py changed 15 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is WatchDaemon._start_watcher at line 1668), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(daemon): stop keeps the health file of a live replacement watcher”; “fix(daemon): stop clears the health files of watchers killed outright”; “added up the tests in deamon_test and made the suggested fix”; “Merge origin/staging; fix the review findings on #262”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/daemon.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: code_review_graph/uncertainty.py code_review_graph/uncertainty.py:404 — code_review_graph/uncertainty.py changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is uncertainty._staleness at line 404), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: an edge that names no node says so, and confidence means something”; “fix: changelog entry and a true gap note for npm aliases (review of #880)”; “fix: withdraw the claim on a failed scan and apply the graph's own file rules (review of #987)”; “fix(uncertainty): count only untracked source under the graph root that the graph does not hold”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/uncertainty.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: code_review_graph/tools/_common.py code_review_graph/tools/_common.py:60 — code_review_graph/tools/_common.py changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is _common.graph_provenance at line 60), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: leave source confinement to #269 and stop reconcile reading linked folders (review of #1101)”; “fix: address writer lock review feedback”; “fix: unknown-risk guidance, linear dedupe and clean paths for unmatched files (review of #1084)”; “fix(review): report unknown risk when requested paths are not indexed”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/tools/_common.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: code_review_graph/hook_update.py code_review_graph/hook_update.py:36 — code_review_graph/hook_update.py changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is hook_update._payload_file at line 36), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Codex edit hook never builds a new graph”; “fix: hooks read their JSON input as UTF-8 on Windows”; “fix: edit hook trusts a shared graph only for its own repo and sees legacy graphs”; “fix: edit hook updates the repo that holds the edited file (#311)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/hook_update.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: code_review_graph/tools/docs.py code_review_graph/tools/docs.py:144 — code_review_graph/tools/docs.py changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is docs.get_docs_section at line 144), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: quote every pip extra hint so zsh can run it”; “fix(lock): keep forget previews, legacy moves, embed paths and watch idle honest”; “fix(lock): make forget, embed and watch obey the write lock”; “Integrate PR #962: fix(embeddings): enumerate nodes independently of stored paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/tools/docs.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: code_review_graph/locking.py code_review_graph/locking.py:148 — code_review_graph/locking.py changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is WriteLock.acquire at line 148), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(lock): make forget, embed and watch obey the write lock”; “fix: no flock support runs unlocked, and update and postprocess keep accepting plain directories (review of #1126)”; “fix: address writer lock review feedback”; “fix: report only real contention and keep the lock out of forked workers (review of #1126)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code_review_graph/locking.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: code-review-graph-vscode/src/backend/cli.ts code-review-graph-vscode/src/backend/cli.ts:98 — code-review-graph-vscode/src/backend/cli.ts 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 CliWrapper.watchGraph at line 98), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(vscode): computing embeddings has no time limit”; “fix(vscode): watch mode keeps running until you stop it”; “fix(vscode): walkthrough build reports failure, and builds have no time limit”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 20:25:55 +04:00' --until='2026-11-12 20:25:55 +04:00' --full-history --no-merges -- code-review-graph-vscode/src/backend/cli.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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×6
  • Duplicated block (11 lines × 2) code_review_graph/flows.py:275 — code_review_graph/flows.py:275-285 | code_review_graph/flows.py:288-298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) code_review_graph/graph.py:4343 — code_review_graph/graph.py:4343-4353 | code_review_graph/graph.py:4385-4395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/graph.py:4343` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) code_review_graph/incremental.py:182 — code_review_graph/incremental.py:182-192 | code_review_graph/incremental.py:217-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) code_review_graph/parser.py:7233 — code_review_graph/parser.py:7233-7243 | code_review_graph/parser.py:7284-7294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) code_review_graph/parser.py:12791 — code_review_graph/parser.py:12791-12801 | code_review_graph/parser.py:14119-14129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:12791` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) code_review_graph/parser.py:15345 — code_review_graph/parser.py:15345-15355 | code_review_graph/parser.py:15666-15676 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D10 · Test Quality · No assertions · ×5
  • No assertions: constructs a service tests/fixtures/sample_mocha.test.ts:6 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: returns undefined for unknown id tests/fixtures/sample_mocha.test.ts:11 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should create a user tests/fixtures/sample_vitest.test.ts:4 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should find a user by id tests/fixtures/sample_vitest.test.ts:9 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: alternative test syntax tests/fixtures/sample_vitest.test.ts:15 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D30 · Dependency Vulnerabilities · Medium CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×5
  • Duplicated block (7 lines × 2) code_review_graph/graph.py:5592 — code_review_graph/graph.py:5592-5599 | code_review_graph/graph.py:5607-5613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/graph.py:5607` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) code_review_graph/parser.py:8159 — code_review_graph/parser.py:8159-8165 | code_review_graph/parser.py:8193-8204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:8193` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) code_review_graph/parser.py:15320 — code_review_graph/parser.py:15320-15326 | code_review_graph/parser.py:15603-15609 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) code_review_graph/parser.py:15330 — code_review_graph/parser.py:15330-15336 | code_review_graph/parser.py:15655-15661 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) code_review_graph/parser.py:20445 — code_review_graph/parser.py:20445-20451 | code_review_graph/parser.py:23902-23908 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) code_review_graph/communities.py:489 — code_review_graph/communities.py:489-502 | code_review_graph/communities.py:581-594 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) code_review_graph/parser.py:13873 — code_review_graph/parser.py:13873-13886 | code_review_graph/parser.py:14529-14542 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:13873` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) code_review_graph/parser.py:14049 — code_review_graph/parser.py:14049-14062 | code_review_graph/parser.py:14094-14107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:14049` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) code_review_graph/tools/query.py:1618 — code_review_graph/tools/query.py:1618-1631 | code_review_graph/tools/query.py:1659-1672 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D3 · God Classes · FunctionTooLong · ×3
  • FunctionTooLong: extension.registerCommands code-review-graph-vscode/src/extension.ts:80 — FunctionTooLong — registerCommands runs 419 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 319 over it, 4.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: graph.buildGraph code-review-graph-vscode/src/webview/graph.ts:384 — FunctionTooLong — buildGraph runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: navigation.registerNavigationCommands code-review-graph-vscode/src/features/navigation.ts:8 — FunctionTooLong — registerNavigationCommands runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× 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.
D31 · IaC & Container Security · Medium IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×3
  • Duplicated block (9 lines × 3) code_review_graph/daemon.py:410 — code_review_graph/daemon.py:410-418 | code_review_graph/registry.py:84-92 | code_review_graph/tools/_common.py:185-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/registry.py:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 3) code_review_graph/graph.py:5262 — code_review_graph/graph.py:5262-5270 | code_review_graph/graph.py:5363-5371 | code_review_graph/graph.py:5383-5391 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) code_review_graph/parser.py:4834 — code_review_graph/parser.py:4834-4842 | code_review_graph/parser.py:5768-5776 | code_review_graph/parser.py:6910-6918 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:4834` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (13 lines × 2 locations) · ×3
  • Duplicated block (13 lines × 2 locations) code-review-graph-vscode/src/extension.ts:111 — code-review-graph-vscode/src/extension.ts:111 · code-review-graph-vscode/src/extension.ts:646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2 locations) code-review-graph-vscode/src/extension.ts:467 — code-review-graph-vscode/src/extension.ts:467 · code-review-graph-vscode/src/extension.ts:586 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (13 lines × 2 locations) code-review-graph-vscode/src/webview/graph.ts:328 — code-review-graph-vscode/src/webview/graph.ts:328 · code-review-graph-vscode/src/webview/graph.ts:367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: CodeParser code_review_graph/parser.py:3801 — TooManyMethods — 384 methods. The bar is 30 methods; this is 354 over it, 12.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GraphStore code_review_graph/graph.py:1006 — TooManyMethods — 147 methods. The bar is 30 methods; this is 117 over it, 4.90× 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) code_review_graph/communities.py:396 — code_review_graph/communities.py:396-505 | code_review_graph/communities.py:519-596 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) code_review_graph/eval/token_benchmark.py:81 — code_review_graph/eval/token_benchmark.py:81-105 | code_review_graph/eval/token_benchmark.py:109-131 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) code_review_graph/parser.py:15345 — code_review_graph/parser.py:15345-15360 | code_review_graph/parser.py:15666-15682 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) code_review_graph/incremental.py:1655 — code_review_graph/incremental.py:1655-1670 | code_review_graph/incremental.py:1674-1693 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) code_review_graph/parser.py:3477 — code_review_graph/parser.py:3477-3495 | code_review_graph/parser.py:3569-3585 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) code_review_graph/parser.py:23604 — code_review_graph/parser.py:23604-23620 | code_review_graph/parser.py:23750-23768 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) code_review_graph/uninstall.py:873 — code_review_graph/uninstall.py:873-885 | code_review_graph/uninstall.py:895-910 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) code_review_graph/parser.py:19202 — code_review_graph/parser.py:19202-19219 | code_review_graph/parser.py:19290-19302 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) code_review_graph/parser.py:2831 — code_review_graph/parser.py:2831-2849 | code_review_graph/parser.py:15305-15316 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) code_review_graph/parser.py:13743 — code_review_graph/parser.py:13743-13754 | code_review_graph/parser.py:14727-14742 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) code_review_graph/parser.py:15004 — code_review_graph/parser.py:15004-15030 | code_review_graph/parser.py:15231-15257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:15004` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) code_review_graph/spring_resolver.py:152 — code_review_graph/spring_resolver.py:152-178 | code_review_graph/temporal_resolver.py:120-146 — before extracting anything, compare `code_review_graph/spring_resolver.py` and `code_review_graph/temporal_resolver.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×2
  • Duplicated block (18–19 lines × 2) code_review_graph/cli.py:2039 — code_review_graph/cli.py:2039-2057 | code_review_graph/cli.py:2132-2149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/cli.py:2039` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) code_review_graph/parser.py:9261 — code_review_graph/parser.py:9261-9279 | code_review_graph/parser.py:9810-9827 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:9261` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) code_review_graph/change_details.py:78 — code_review_graph/change_details.py:78-94 | scripts/render_pr_comment.py:501-516 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16–17 lines × 2) code_review_graph/uninstall.py:267 — code_review_graph/uninstall.py:267-283 | code_review_graph/uninstall.py:769-784 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/uninstall.py:267` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) REDACTED:468 — REDACTED:468-484 | REDACTED:702-718 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:719` calls `_wait_for_rate_limit_slot` and `REDACTED:485` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) code_review_graph/skills.py:3749 — code_review_graph/skills.py:3749-3765 | code_review_graph/skills.py:3769-3785 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) code_review_graph/cli.py:1907 — code_review_graph/cli.py:1907-1920 | code_review_graph/cli.py:1947-1961 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/cli.py:1907` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `code_review_graph/cli.py:1906` calls `add_parser`, `add_argument` and `code_review_graph/cli.py:1947` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14–15 lines × 2) code_review_graph/parser.py:14109 — code_review_graph/parser.py:14109-14122 | code_review_graph/parser.py:14530-14544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:14109` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) code_review_graph/parser.py:9857 — code_review_graph/parser.py:9857-9869 | code_review_graph/parser.py:10424-10436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) code_review_graph/parser.py:19369 — code_review_graph/parser.py:19369-19381 | code_review_graph/parser.py:19413-19425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:19369` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×2
  • Duplicated block (12 lines × 2) code_review_graph/cli.py:1307 — code_review_graph/cli.py:1307-1318 | code_review_graph/cli.py:1354-1365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/cli.py:1307` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) code_review_graph/parser.py:21567 — code_review_graph/parser.py:21567-21578 | code_review_graph/parser.py:21584-21595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×2
  • Duplicated block (10 lines × 2) code_review_graph/graph.py:2833 — code_review_graph/graph.py:2833-2842 | code_review_graph/graph.py:2884-2893 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) code_review_graph/incremental.py:1048 — code_review_graph/incremental.py:1048-1057 | code_review_graph/incremental.py:1061-1070 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×2
  • Duplicated block (9 lines × 2) code_review_graph/parser.py:9533 — code_review_graph/parser.py:9533-9541 | code_review_graph/parser.py:9673-9681 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:9533` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) code_review_graph/parser.py:14695 — code_review_graph/parser.py:14695-14704 | code_review_graph/parser.py:25099-25107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:14695` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) code_review_graph/parser.py:2805 — code_review_graph/parser.py:2805-2811 | code_review_graph/parser.py:16884-16891 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–8 lines × 2) code_review_graph/refactor.py:2126 — code_review_graph/refactor.py:2126-2133 | code_review_graph/refactor.py:2136-2142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×2
  • Duplicated block (8 lines × 2) code_review_graph/parser.py:23162 — code_review_graph/parser.py:23162-23169 | code_review_graph/parser.py:24762-24769 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) code_review_graph/skills.py:3253 — code_review_graph/skills.py:3253-3260 | code_review_graph/skills.py:3344-3352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/skills.py:3253` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×2
  • Duplicated block (6 lines × 2) code_review_graph/cli.py:2482 — code_review_graph/cli.py:2482-2487 | code_review_graph/cli.py:2498-2503 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `code_review_graph/cli.py:2481` calls `add_argument` and `code_review_graph/cli.py:2497` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) code_review_graph/graph.py:1225 — code_review_graph/graph.py:1225-1230 | code_review_graph/graph.py:1915-1920 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/graph.py:1225` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×2
  • Duplicated block (5 lines × 2) code_review_graph/graph.py:106 — code_review_graph/graph.py:106-110 | code_review_graph/inheritance.py:43-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) code_review_graph/csharp_resolver.py:40 — code_review_graph/csharp_resolver.py:40-44 | code_review_graph/jedi_resolver.py:289-293 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `raw` to `str | None` in one and `Optional[str]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
R10 · Code Duplication · Duplicated block (19 lines × 2 locations) · ×2
  • Duplicated block (19 lines × 2 locations) code-review-graph-vscode/src/extension.ts:221 — code-review-graph-vscode/src/extension.ts:221 · code-review-graph-vscode/src/extension.ts:450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2 locations) code-review-graph-vscode/src/extension.ts:282 — code-review-graph-vscode/src/extension.ts:282 · code-review-graph-vscode/src/features/navigation.ts:118 — 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 (18 lines × 2 locations) · ×2
  • Duplicated block (18 lines × 2 locations) code-review-graph-vscode/src/extension.ts:612 — code-review-graph-vscode/src/extension.ts:612 · code-review-graph-vscode/src/features/navigation.ts:174 — 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 (18 lines × 2 locations) code-review-graph-vscode/src/views/treeView.ts:81 — code-review-graph-vscode/src/views/treeView.ts:81 · code-review-graph-vscode/src/views/treeView.ts:101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×2
  • Duplicated block (14 lines × 2 locations) code-review-graph-vscode/src/features/navigation.ts:36 — code-review-graph-vscode/src/features/navigation.ts:36 · code-review-graph-vscode/src/features/navigation.ts:114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2 locations) code-review-graph-vscode/src/webview/graph.ts:716 — code-review-graph-vscode/src/webview/graph.ts:716 · code-review-graph-vscode/src/webview/graph.ts:739 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 13, cognitive 15) · ×2
  • Complex function (anonymous) (cyclomatic 13, cognitive 15) code-review-graph-vscode/src/extension.ts:317 — (anonymous) has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function (anonymous) (cyclomatic 13, cognitive 15) code-review-graph-vscode/src/features/navigation.ts:75 — (anonymous) has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
D1 · Cyclomatic Complexity · query.query_graph (cyclomatic 196) · ×1
  • query.query_graph (cyclomatic 196) code_review_graph/tools/query.py:1019 — query.query_graph has cyclomatic complexity 196 (threshold 15). To reduce it, separate the cases: extract each independent 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._dispatch (cyclomatic 165) · ×1
  • cli._dispatch (cyclomatic 165) code_review_graph/cli.py:2721 — cli._dispatch has cyclomatic complexity 165 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._get_name (cyclomatic 139) · ×1
  • CodeParser._get_name (cyclomatic 139) code_review_graph/parser.py:22976 — CodeParser._get_name has cyclomatic complexity 139 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._get_bases (cyclomatic 119) · ×1
  • CodeParser._get_bases (cyclomatic 119) code_review_graph/parser.py:23802 — CodeParser._get_bases has cyclomatic complexity 119 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._extract_import (cyclomatic 107) · ×1
  • CodeParser._extract_import (cyclomatic 107) code_review_graph/parser.py:24256 — CodeParser._extract_import has cyclomatic complexity 107 (threshold 15). To reduce it, separate the cases: extract each independent 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 · incremental.incremental_update (cyclomatic 105) · ×1
  • incremental.incremental_update (cyclomatic 105) code_review_graph/incremental.py:3173 — incremental.incremental_update has cyclomatic complexity 105 (threshold 15). To reduce it, separate the cases: extract each independent 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 · refactor.find_dead_code (cyclomatic 98) · ×1
  • refactor.find_dead_code (cyclomatic 98) code_review_graph/refactor.py:1955 — refactor.find_dead_code has cyclomatic complexity 98 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._do_resolve_module (cyclomatic 88) · ×1
  • CodeParser._do_resolve_module (cyclomatic 88) code_review_graph/parser.py:21348 — CodeParser._do_resolve_module has cyclomatic complexity 88 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._get_call_name (cyclomatic 79) · ×1
  • CodeParser._get_call_name (cyclomatic 79) code_review_graph/parser.py:24579 — CodeParser._get_call_name has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · extension.registerCommands (cyclomatic 77) · ×1
  • extension.registerCommands (cyclomatic 77) code-review-graph-vscode/src/extension.ts:80 — extension.registerCommands has cyclomatic complexity 77 (threshold 15). Most of this is not in the body itself: 1 of the 77 points is its own statement and the rest belongs to 18 function literals inside it that branch (lines 658, 317, 246, …). 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 · CodeParser._extract_functions (cyclomatic 75) · ×1
  • CodeParser._extract_functions (cyclomatic 75) code_review_graph/parser.py:16850 — CodeParser._extract_functions has cyclomatic complexity 75 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeParser._extract_verilog_constructs (cyclomatic 68) · ×1
  • CodeParser._extract_verilog_constructs (cyclomatic 68) code_review_graph/parser.py:19627 — CodeParser._extract_verilog_constructs has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeParser._extract_calls (cyclomatic 67) · ×1
  • CodeParser._extract_calls (cyclomatic 67) code_review_graph/parser.py:17274 — CodeParser._extract_calls has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeParser._resolve_call_targets (cyclomatic 66) · ×1
  • CodeParser._resolve_call_targets (cyclomatic 66) code_review_graph/parser.py:8024 — CodeParser._resolve_call_targets has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._extract_bytes (cyclomatic 64) · ×1
  • CodeParser._extract_bytes (cyclomatic 64) code_review_graph/parser.py:4133 — CodeParser._extract_bytes has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._extract_classes (cyclomatic 64) · ×1
  • CodeParser._extract_classes (cyclomatic 64) code_review_graph/parser.py:16553 — CodeParser._extract_classes has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._parse_rescript (cyclomatic 63) · ×1
  • CodeParser._parse_rescript (cyclomatic 63) code_review_graph/parser.py:6550 — CodeParser._parse_rescript has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._parse_robot (cyclomatic 61) · ×1
  • CodeParser._parse_robot (cyclomatic 61) code_review_graph/parser.py:6234 — CodeParser._parse_robot has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._extract_julia_constructs (cyclomatic 60) · ×1
  • CodeParser._extract_julia_constructs (cyclomatic 60) code_review_graph/parser.py:13765 — CodeParser._extract_julia_constructs has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._get_member_call_receiver_method (cyclomatic 58) · ×1
  • CodeParser._get_member_call_receiver_method (cyclomatic 58) code_review_graph/parser.py:17582 — CodeParser._get_member_call_receiver_method has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CodeParser._collect_import_names (cyclomatic 57) · ×1
  • CodeParser._collect_import_names (cyclomatic 57) code_review_graph/parser.py:21043 — CodeParser._collect_import_names has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent 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.hybrid_search (cyclomatic 57) · ×1
  • search.hybrid_search (cyclomatic 57) code_review_graph/search.py:995 — search.hybrid_search has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent 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 · GraphStore._resolve_bare_endpoints (cyclomatic 55) · ×1
  • GraphStore._resolve_bare_endpoints (cyclomatic 55) code_review_graph/graph.py:3969 — GraphStore._resolve_bare_endpoints has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · spring_resolver.resolve_spring_di_calls (cyclomatic 53) · ×1
  • spring_resolver.resolve_spring_di_calls (cyclomatic 53) code_review_graph/spring_resolver.py:30 — spring_resolver.resolve_spring_di_calls has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build.build_or_update_graph (cyclomatic 53) · ×1
  • build.build_or_update_graph (cyclomatic 53) code_review_graph/tools/build.py:486 — build.build_or_update_graph has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeParser._extract_from_tree (cyclomatic 52) · ×1
  • CodeParser._extract_from_tree (cyclomatic 52) code_review_graph/parser.py:12324 — CodeParser._extract_from_tree has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · changes.analyze_changes (cyclomatic 50) · ×1
  • changes.analyze_changes (cyclomatic 50) code_review_graph/changes.py:1482 — changes.analyze_changes has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · skills._install_platform_configs (cyclomatic 49) · ×1
  • skills._install_platform_configs (cyclomatic 49) code_review_graph/skills.py:1291 — skills._install_platform_configs 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 · graph.buildGraph (cyclomatic 44) · ×1
  • graph.buildGraph (cyclomatic 44) code-review-graph-vscode/src/webview/graph.ts:384 — graph.buildGraph has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 15 of the 44 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 466, 532, 426, …). 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 · _PyRenameScan._visit (cyclomatic 43) · ×1
  • _PyRenameScan._visit (cyclomatic 43) code_review_graph/refactor.py:602 — _PyRenameScan._visit 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 · cli._plan_integrations (cyclomatic 42) · ×1
  • cli._plan_integrations (cyclomatic 42) code_review_graph/cli.py:666 — cli._plan_integrations 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 · CodeParser._parse_vbnet (cyclomatic 42) · ×1
  • CodeParser._parse_vbnet (cyclomatic 42) code_review_graph/parser.py:5888 — CodeParser._parse_vbnet 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 · CodeParser._typed_bindings_from_node (cyclomatic 42) · ×1
  • CodeParser._typed_bindings_from_node (cyclomatic 42) code_review_graph/parser.py:8809 — CodeParser._typed_bindings_from_node 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 · cli._handle_init (cyclomatic 41) · ×1
  • cli._handle_init (cyclomatic 41) code_review_graph/cli.py:458 — cli._handle_init has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GraphStore.get_transitive_tests (cyclomatic 41) · ×1
  • GraphStore.get_transitive_tests (cyclomatic 41) code_review_graph/graph.py:2316 — GraphStore.get_transitive_tests has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeParser._collect_file_scope (cyclomatic 40) · ×1
  • CodeParser._collect_file_scope (cyclomatic 40) code_review_graph/parser.py:19968 — CodeParser._collect_file_scope has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · query.get_impact_radius (cyclomatic 39) · ×1
  • query.get_impact_radius (cyclomatic 39) code_review_graph/tools/query.py:738 — query.get_impact_radius has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GraphStore.get_caller_test_routes (cyclomatic 38) · ×1
  • GraphStore.get_caller_test_routes (cyclomatic 38) code_review_graph/graph.py:2734 — GraphStore.get_caller_test_routes 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 · aop_resolver.resolve_aop_advice (cyclomatic 35) · ×1
  • aop_resolver.resolve_aop_advice (cyclomatic 35) code_review_graph/aop_resolver.py:316 — aop_resolver.resolve_aop_advice 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 · MultiWorktreeRouter.handle (cyclomatic 35) · ×1
  • MultiWorktreeRouter.handle (cyclomatic 35) code_review_graph/multi_worktree.py:543 — MultiWorktreeRouter.handle 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 · jedi_resolver.enrich_jedi_calls (cyclomatic 34) · ×1
  • jedi_resolver.enrich_jedi_calls (cyclomatic 34) code_review_graph/jedi_resolver.py:28 — jedi_resolver.enrich_jedi_calls 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 · refactor._rename_edits (cyclomatic 34) · ×1
  • refactor._rename_edits (cyclomatic 34) code_review_graph/refactor.py:1745 — refactor._rename_edits 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 · CodeParser._go_receiver_binding_index (cyclomatic 33) · ×1
  • CodeParser._go_receiver_binding_index (cyclomatic 33) code_review_graph/parser.py:23390 — CodeParser._go_receiver_binding_index has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · temporal_resolver.resolve_temporal_calls (cyclomatic 33) · ×1
  • temporal_resolver.resolve_temporal_calls (cyclomatic 33) code_review_graph/temporal_resolver.py:31 — temporal_resolver.resolve_temporal_calls has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GraphStore._import_evidence (cyclomatic 32) · ×1
  • GraphStore._import_evidence (cyclomatic 32) code_review_graph/graph.py:3788 — GraphStore._import_evidence 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 · CodeParser._emit_laravel_endpoint_nodes (cyclomatic 32) · ×1
  • CodeParser._emit_laravel_endpoint_nodes (cyclomatic 32) code_review_graph/parser.py:18579 — CodeParser._emit_laravel_endpoint_nodes 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 · embeddings.get_provider (cyclomatic 31) · ×1
  • embeddings.get_provider (cyclomatic 31) REDACTED:881 — embeddings.get_provider 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 · GraphStore.resolve_cpp_scoped_call_targets (cyclomatic 31) · ×1
  • GraphStore.resolve_cpp_scoped_call_targets (cyclomatic 31) code_review_graph/graph.py:3535 — GraphStore.resolve_cpp_scoped_call_targets 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 · graph.node_to_dict (cyclomatic 31) · ×1
  • graph.node_to_dict (cyclomatic 31) code_review_graph/graph.py:5886 — graph.node_to_dict 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 · npm_alias_resolver._token_comparators (cyclomatic 31) · ×1
  • npm_alias_resolver._token_comparators (cyclomatic 31) code_review_graph/npm_alias_resolver.py:362 — npm_alias_resolver._token_comparators 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 · review.get_review_context (cyclomatic 31) · ×1
  • review.get_review_context (cyclomatic 31) code_review_graph/tools/review.py:434 — review.get_review_context 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 · CodeParser._emit_spring_field_injection (cyclomatic 30) · ×1
  • CodeParser._emit_spring_field_injection (cyclomatic 30) code_review_graph/parser.py:15473 — CodeParser._emit_spring_field_injection 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 · CodeParser._rust_project_context (cyclomatic 30) · ×1
  • CodeParser._rust_project_context (cyclomatic 30) code_review_graph/parser.py:22266 — CodeParser._rust_project_context 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 · scoped_resolver.resolve_scoped_calls (cyclomatic 30) · ×1
  • scoped_resolver.resolve_scoped_calls (cyclomatic 30) code_review_graph/scoped_resolver.py:235 — scoped_resolver.resolve_scoped_calls 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 · skills._merge_yaml_mcp_server (cyclomatic 30) · ×1
  • skills._merge_yaml_mcp_server (cyclomatic 30) code_review_graph/skills.py:940 — skills._merge_yaml_mcp_server 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 · custom_languages._validate_entry (cyclomatic 29) · ×1
  • custom_languages._validate_entry (cyclomatic 29) code_review_graph/custom_languages.py:201 — custom_languages._validate_entry 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 · CodeParser._parse_sql (cyclomatic 29) · ×1
  • CodeParser._parse_sql (cyclomatic 29) code_review_graph/parser.py:7315 — CodeParser._parse_sql 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 · CodeParser._parse_ansible_tasks (cyclomatic 29) · ×1
  • CodeParser._parse_ansible_tasks (cyclomatic 29) code_review_graph/parser.py:12093 — CodeParser._parse_ansible_tasks 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 · CodeParser._extract_elixir_constructs (cyclomatic 29) · ×1
  • CodeParser._extract_elixir_constructs (cyclomatic 29) code_review_graph/parser.py:12686 — CodeParser._extract_elixir_constructs 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 · CodeParser._php_route_group_settings (cyclomatic 29) · ×1
  • CodeParser._php_route_group_settings (cyclomatic 29) code_review_graph/parser.py:18448 — CodeParser._php_route_group_settings 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 · csharp_resolver.resolve_csharp_calls (cyclomatic 28) · ×1
  • csharp_resolver.resolve_csharp_calls (cyclomatic 28) code_review_graph/csharp_resolver.py:121 — csharp_resolver.resolve_csharp_calls has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OpenAIEmbeddingProvider._call_api (cyclomatic 28) · ×1
  • OpenAIEmbeddingProvider._call_api (cyclomatic 28) REDACTED:451 — OpenAIEmbeddingProvider._call_api has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GraphStore._plan_file_identities (cyclomatic 28) · ×1
  • GraphStore._plan_file_identities (cyclomatic 28) code_review_graph/graph.py:1341 — GraphStore._plan_file_identities has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GraphStore._resolve_inherited_endpoints (cyclomatic 28) · ×1
  • GraphStore._resolve_inherited_endpoints (cyclomatic 28) code_review_graph/graph.py:3274 — GraphStore._resolve_inherited_endpoints has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeParser._parse_svelte (cyclomatic 28) · ×1
  • CodeParser._parse_svelte (cyclomatic 28) code_review_graph/parser.py:4852 — CodeParser._parse_svelte has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeParser._parse_html (cyclomatic 28) · ×1
  • CodeParser._parse_html (cyclomatic 28) code_review_graph/parser.py:4983 — CodeParser._parse_html has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeParser._extract_solidity_constructs (cyclomatic 28) · ×1
  • CodeParser._extract_solidity_constructs (cyclomatic 28) code_review_graph/parser.py:19304 — CodeParser._extract_solidity_constructs has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parser._strip_rescript_noise (cyclomatic 28) · ×1
  • parser._strip_rescript_noise (cyclomatic 28) code_review_graph/parser.py:2349 — parser._strip_rescript_noise has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · refactor._lexical_sites (cyclomatic 28) · ×1
  • refactor._lexical_sites (cyclomatic 28) code_review_graph/refactor.py:1539 — refactor._lexical_sites has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rescript_resolver.resolve_rescript_cross_module (cyclomatic 28) · ×1
  • rescript_resolver.resolve_rescript_cross_module (cyclomatic 28) code_review_graph/rescript_resolver.py:39 — rescript_resolver.resolve_rescript_cross_module has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build._run_postprocess (cyclomatic 28) · ×1
  • build._run_postprocess (cyclomatic 28) code_review_graph/tools/build.py:231 — build._run_postprocess 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 · wiki._generate_community_page (cyclomatic 28) · ×1
  • wiki._generate_community_page (cyclomatic 28) code_review_graph/wiki.py:49 — wiki._generate_community_page has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · crg_readonly._command_args (cyclomatic 27) · ×1
  • crg_readonly._command_args (cyclomatic 27) code_review_graph/assets/code-review-graph/scripts/crg_readonly.py:177 — crg_readonly._command_args 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.
D1 · Cyclomatic Complexity · flows.incremental_trace_flows (cyclomatic 27) · ×1
  • flows.incremental_trace_flows (cyclomatic 27) code_review_graph/flows.py:808 — flows.incremental_trace_flows 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.
D1 · Cyclomatic Complexity · CodeParser._mask_cpp_qt_macros (cyclomatic 27) · ×1
  • CodeParser._mask_cpp_qt_macros (cyclomatic 27) code_review_graph/parser.py:4449 — CodeParser._mask_cpp_qt_macros 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.
D1 · Cyclomatic Complexity · CodeParser._parse_vue (cyclomatic 27) · ×1
  • CodeParser._parse_vue (cyclomatic 27) code_review_graph/parser.py:4740 — CodeParser._parse_vue 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.
D1 · Cyclomatic Complexity · CodeParser._python_expression_class_evidence (cyclomatic 27) · ×1
  • CodeParser._python_expression_class_evidence (cyclomatic 27) code_review_graph/parser.py:9926 — CodeParser._python_expression_class_evidence 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.
D1 · Cyclomatic Complexity · CodeParser._emit_kafka_edges_from_class (cyclomatic 27) · ×1
  • CodeParser._emit_kafka_edges_from_class (cyclomatic 27) code_review_graph/parser.py:16306 — CodeParser._emit_kafka_edges_from_class 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.
D1 · Cyclomatic Complexity · CodeParser._resolve_exported_symbol (cyclomatic 27) · ×1
  • CodeParser._resolve_exported_symbol (cyclomatic 27) code_review_graph/parser.py:22758 — CodeParser._resolve_exported_symbol 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.
D1 · Cyclomatic Complexity · python_resolver.resolve_python_imports (cyclomatic 27) · ×1
  • python_resolver.resolve_python_imports (cyclomatic 27) code_review_graph/python_resolver.py:34 — python_resolver.resolve_python_imports 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.
D1 · Cyclomatic Complexity · _JsScan.run (cyclomatic 27) · ×1
  • _JsScan.run (cyclomatic 27) code_review_graph/refactor.py:1129 — _JsScan.run 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.
D1 · Cyclomatic Complexity · _PyRenameScan._visit_import_from (cyclomatic 26) · ×1
  • _PyRenameScan._visit_import_from (cyclomatic 26) code_review_graph/refactor.py:804 — _PyRenameScan._visit_import_from 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 · graph.getVisibleData (cyclomatic 26) · ×1
  • graph.getVisibleData (cyclomatic 26) code-review-graph-vscode/src/webview/graph.ts:288 — graph.getVisibleData has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 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 · cli._handle_build_update (cyclomatic 25) · ×1
  • cli._handle_build_update (cyclomatic 25) code_review_graph/cli.py:1301 — cli._handle_build_update 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 · VoyageEmbeddingProvider._call_api (cyclomatic 25) · ×1
  • VoyageEmbeddingProvider._call_api (cyclomatic 25) REDACTED:686 — VoyageEmbeddingProvider._call_api 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 · enrich._format_node_context (cyclomatic 25) · ×1
  • enrich._format_node_context (cyclomatic 25) code_review_graph/enrich.py:101 — enrich._format_node_context 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 · reporter.generate_readme_tables (cyclomatic 25) · ×1
  • reporter.generate_readme_tables (cyclomatic 25) code_review_graph/eval/reporter.py:181 — reporter.generate_readme_tables 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 · hcl_resolver.resolve_hcl_module_references (cyclomatic 25) · ×1
  • hcl_resolver.resolve_hcl_module_references (cyclomatic 25) code_review_graph/hcl_resolver.py:18 — hcl_resolver.resolve_hcl_module_references 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 · analysis.find_surprising_connections (cyclomatic 24) · ×1
  • analysis.find_surprising_connections (cyclomatic 24) code_review_graph/analysis.py:349 — analysis.find_surprising_connections 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 · InheritanceIndex.resolve_type (cyclomatic 24) · ×1
  • InheritanceIndex.resolve_type (cyclomatic 24) code_review_graph/inheritance.py:177 — InheritanceIndex.resolve_type 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 · install_gitignore.repo_files (cyclomatic 24) · ×1
  • install_gitignore.repo_files (cyclomatic 24) code_review_graph/install_gitignore.py:75 — install_gitignore.repo_files 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 · CodeParser._parse_json (cyclomatic 24) · ×1
  • CodeParser._parse_json (cyclomatic 24) code_review_graph/parser.py:11493 — CodeParser._parse_json 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 · CodeParser._read_python_module_alias (cyclomatic 24) · ×1
  • CodeParser._read_python_module_alias (cyclomatic 24) code_review_graph/parser.py:20570 — CodeParser._read_python_module_alias 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 · context.get_minimal_context (cyclomatic 24) · ×1
  • context.get_minimal_context (cyclomatic 24) code_review_graph/tools/context.py:33 — context.get_minimal_context has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GraphStore._get_impact_radius_networkx (cyclomatic 23) · ×1
  • GraphStore._get_impact_radius_networkx (cyclomatic 23) code_review_graph/graph.py:4906 — GraphStore._get_impact_radius_networkx 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 · CodeParser._parse_databricks_py_notebook (cyclomatic 23) · ×1
  • CodeParser._parse_databricks_py_notebook (cyclomatic 23) code_review_graph/parser.py:5786 — CodeParser._parse_databricks_py_notebook 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 · refactor._python_rename_sites (cyclomatic 23) · ×1
  • refactor._python_rename_sites (cyclomatic 23) code_review_graph/refactor.py:890 — refactor._python_rename_sites 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 · refactor.apply_refactor (cyclomatic 23) · ×1
  • refactor.apply_refactor (cyclomatic 23) code_review_graph/refactor.py:2563 — refactor.apply_refactor 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 · uninstall._remove_yaml_entry (cyclomatic 23) · ×1
  • uninstall._remove_yaml_entry (cyclomatic 23) code_review_graph/uninstall.py:379 — uninstall._remove_yaml_entry has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · install_gitignore.apply (cyclomatic 22) · ×1
  • install_gitignore.apply (cyclomatic 22) code_review_graph/install_gitignore.py:369 — install_gitignore.apply 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 · CodeParser._strip_plsql_noise (cyclomatic 22) · ×1
  • CodeParser._strip_plsql_noise (cyclomatic 22) code_review_graph/parser.py:7092 — CodeParser._strip_plsql_noise 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 · CodeParser._handle_zig_var_decl (cyclomatic 22) · ×1
  • CodeParser._handle_zig_var_decl (cyclomatic 22) code_review_graph/parser.py:14550 — CodeParser._handle_zig_var_decl 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 · CodeParser._extract_js_var_functions (cyclomatic 22) · ×1
  • CodeParser._extract_js_var_functions (cyclomatic 22) code_review_graph/parser.py:14935 — CodeParser._extract_js_var_functions 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 · CodeParser._resolve_rust_module_file (cyclomatic 22) · ×1
  • CodeParser._resolve_rust_module_file (cyclomatic 22) code_review_graph/parser.py:22415 — CodeParser._resolve_rust_module_file 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 · visualization._aggregate_community (cyclomatic 22) · ×1
  • visualization._aggregate_community (cyclomatic 22) code_review_graph/visualization.py:571 — visualization._aggregate_community 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 · doctor.resolve_mcp_entry (cyclomatic 21) · ×1
  • doctor.resolve_mcp_entry (cyclomatic 21) code_review_graph/doctor.py:384 — doctor.resolve_mcp_entry 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 · jsonc.tokenize (cyclomatic 21) · ×1
  • jsonc.tokenize (cyclomatic 21) code_review_graph/jsonc.py:129 — jsonc.tokenize 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 · CodeParser._parse_notebook_cells (cyclomatic 21) · ×1
  • CodeParser._parse_notebook_cells (cyclomatic 21) code_review_graph/parser.py:5651 — CodeParser._parse_notebook_cells 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 · parser._python_type_checking_aliases (cyclomatic 21) · ×1
  • parser._python_type_checking_aliases (cyclomatic 21) code_review_graph/parser.py:274 — parser._python_type_checking_aliases 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 · skills._copilot_vscode_detected (cyclomatic 21) · ×1
  • skills._copilot_vscode_detected (cyclomatic 21) code_review_graph/skills.py:47 — skills._copilot_vscode_detected 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 · review.detect_changes_func (cyclomatic 21) · ×1
  • review.detect_changes_func (cyclomatic 21) code_review_graph/tools/review.py:975 — review.detect_changes_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.
D1 · Cyclomatic Complexity · codex_skill.install_codex_skill (cyclomatic 20) · ×1
  • codex_skill.install_codex_skill (cyclomatic 20) code_review_graph/codex_skill.py:136 — codex_skill.install_codex_skill 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 · exports.export_obsidian_vault (cyclomatic 20) · ×1
  • exports.export_obsidian_vault (cyclomatic 20) code_review_graph/exports.py:266 — exports.export_obsidian_vault 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 · GraphStore.__init__ (cyclomatic 20) · ×1
  • GraphStore.__init__ (cyclomatic 20) code_review_graph/graph.py:1009 — GraphStore.__init__ 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 · GraphStore.get_ambiguous_call_tests (cyclomatic 20) · ×1
  • GraphStore.get_ambiguous_call_tests (cyclomatic 20) code_review_graph/graph.py:2542 — GraphStore.get_ambiguous_call_tests 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 · _WatchSupervisor._replan_if_requested (cyclomatic 20) · ×1
  • _WatchSupervisor._replan_if_requested (cyclomatic 20) code_review_graph/incremental.py:4186 — _WatchSupervisor._replan_if_requested 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 · CodeParser._add_xslt_apply (cyclomatic 20) · ×1
  • CodeParser._add_xslt_apply (cyclomatic 20) code_review_graph/parser.py:5506 — CodeParser._add_xslt_apply 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 · CodeParser._plsql_member_signature (cyclomatic 20) · ×1
  • CodeParser._plsql_member_signature (cyclomatic 20) code_review_graph/parser.py:7259 — CodeParser._plsql_member_signature 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 · CodeParser._resolve_julia_call_targets (cyclomatic 20) · ×1
  • CodeParser._resolve_julia_call_targets (cyclomatic 20) code_review_graph/parser.py:8387 — CodeParser._resolve_julia_call_targets 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 · CodeParser._extract_nix_constructs (cyclomatic 20) · ×1
  • CodeParser._extract_nix_constructs (cyclomatic 20) code_review_graph/parser.py:13048 — CodeParser._extract_nix_constructs 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 · CodeParser._handle_lua_variable_declaration (cyclomatic 20) · ×1
  • CodeParser._handle_lua_variable_declaration (cyclomatic 20) code_review_graph/parser.py:14205 — CodeParser._handle_lua_variable_declaration 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 · CodeParser._js_wrapped_function (cyclomatic 20) · ×1
  • CodeParser._js_wrapped_function (cyclomatic 20) code_review_graph/parser.py:14861 — CodeParser._js_wrapped_function 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 · CodeParser._get_csharp_receiver_method (cyclomatic 20) · ×1
  • CodeParser._get_csharp_receiver_method (cyclomatic 20) code_review_graph/parser.py:17747 — CodeParser._get_csharp_receiver_method 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 · CodeParser._python_name_bindings (cyclomatic 20) · ×1
  • CodeParser._python_name_bindings (cyclomatic 20) code_review_graph/parser.py:20662 — CodeParser._python_name_bindings 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 · uninstall._clean_hook_data (cyclomatic 20) · ×1
  • uninstall._clean_hook_data (cyclomatic 20) code_review_graph/uninstall.py:579 — uninstall._clean_hook_data 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 · uninstall._process_platform_configs (cyclomatic 20) · ×1
  • uninstall._process_platform_configs (cyclomatic 20) code_review_graph/uninstall.py:1270 — uninstall._process_platform_configs 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 · visualization._export_seeded (cyclomatic 20) · ×1
  • visualization._export_seeded (cyclomatic 20) code_review_graph/visualization.py:360 — visualization._export_seeded 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 · workspace_resolver._exports_targets (cyclomatic 20) · ×1
  • workspace_resolver._exports_targets (cyclomatic 20) code_review_graph/workspace_resolver.py:551 — workspace_resolver._exports_targets 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 · navigation.registerNavigationCommands (cyclomatic 20) · ×1
  • navigation.registerNavigationCommands (cyclomatic 20) code-review-graph-vscode/src/features/navigation.ts:8 — navigation.registerNavigationCommands 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 4 function literals inside it that branch (lines 75, 16, 153, …). 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 · graph.bindToolbarEvents (cyclomatic 20) · ×1
  • graph.bindToolbarEvents (cyclomatic 20) code-review-graph-vscode/src/webview/graph.ts:824 — graph.bindToolbarEvents has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 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.
D1 · Cyclomatic Complexity · changes._review_pure_deletions (cyclomatic 19) · ×1
  • changes._review_pure_deletions (cyclomatic 19) code_review_graph/changes.py:1134 — changes._review_pure_deletions 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 · communities._split_oversized (cyclomatic 19) · ×1
  • communities._split_oversized (cyclomatic 19) code_review_graph/communities.py:604 — communities._split_oversized 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 · daemon_cli._handle_status (cyclomatic 19) · ×1
  • daemon_cli._handle_status (cyclomatic 19) code_review_graph/daemon_cli.py:219 — daemon_cli._handle_status 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 · doctor.check_hooks (cyclomatic 19) · ×1
  • doctor.check_hooks (cyclomatic 19) code_review_graph/doctor.py:724 — doctor.check_hooks 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 · GraphStore._align_edge_with_collisions (cyclomatic 19) · ×1
  • GraphStore._align_edge_with_collisions (cyclomatic 19) code_review_graph/graph.py:2024 — GraphStore._align_edge_with_collisions has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GraphStore._receiver_backed_candidates (cyclomatic 19) · ×1
  • GraphStore._receiver_backed_candidates (cyclomatic 19) code_review_graph/graph.py:2969 — GraphStore._receiver_backed_candidates 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 · incremental._walk_symlinked_dirs (cyclomatic 19) · ×1
  • incremental._walk_symlinked_dirs (cyclomatic 19) code_review_graph/incremental.py:2235 — incremental._walk_symlinked_dirs 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 · InheritanceIndex.__init__ (cyclomatic 19) · ×1
  • InheritanceIndex.__init__ (cyclomatic 19) code_review_graph/inheritance.py:82 — InheritanceIndex.__init__ 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 · main.main (cyclomatic 19) · ×1
  • main.main (cyclomatic 19) code_review_graph/main.py:1624 — main.main 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 · neighbourhood.extract (cyclomatic 19) · ×1
  • neighbourhood.extract (cyclomatic 19) code_review_graph/neighbourhood.py:535 — neighbourhood.extract has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _PythonUnreachableCallVisitor._visit_statements (cyclomatic 19) · ×1
  • _PythonUnreachableCallVisitor._visit_statements (cyclomatic 19) code_review_graph/parser.py:486 — _PythonUnreachableCallVisitor._visit_statements 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 · CodeParser._parse_ansible_playbook (cyclomatic 19) · ×1
  • CodeParser._parse_ansible_playbook (cyclomatic 19) code_review_graph/parser.py:11977 — CodeParser._parse_ansible_playbook 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 · CodeParser._emit_temporal_stub_fields (cyclomatic 19) · ×1
  • CodeParser._emit_temporal_stub_fields (cyclomatic 19) code_review_graph/parser.py:16218 — CodeParser._emit_temporal_stub_fields 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 · CodeParser._php_import_bindings (cyclomatic 19) · ×1
  • CodeParser._php_import_bindings (cyclomatic 19) code_review_graph/parser.py:18226 — CodeParser._php_import_bindings 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 · _PyRenameScan._collect_all (cyclomatic 19) · ×1
  • _PyRenameScan._collect_all (cyclomatic 19) code_review_graph/refactor.py:572 — _PyRenameScan._collect_all 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 · _JsScan.visit_import (cyclomatic 19) · ×1
  • _JsScan.visit_import (cyclomatic 19) code_review_graph/refactor.py:1313 — _JsScan.visit_import 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 · skills._merge_hook_entries (cyclomatic 19) · ×1
  • skills._merge_hook_entries (cyclomatic 19) code_review_graph/skills.py:3017 — skills._merge_hook_entries 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 · build.run_postprocess (cyclomatic 19) · ×1
  • build.run_postprocess (cyclomatic 19) code_review_graph/tools/build.py:865 — build.run_postprocess has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · flows_tools.get_flow (cyclomatic 19) · ×1
  • flows_tools.get_flow (cyclomatic 19) code_review_graph/tools/flows_tools.py:111 — flows_tools.get_flow 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 · query.semantic_search_nodes (cyclomatic 19) · ×1
  • query.semantic_search_nodes (cyclomatic 19) code_review_graph/tools/query.py:1980 — query.semantic_search_nodes 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 · review._file_regions (cyclomatic 19) · ×1
  • review._file_regions (cyclomatic 19) code_review_graph/tools/review.py:272 — review._file_regions 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 · change_details._coupling (cyclomatic 18) · ×1
  • change_details._coupling (cyclomatic 18) code_review_graph/change_details.py:279 — change_details._coupling 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 · communities._reassign_test_nodes (cyclomatic 18) · ×1
  • communities._reassign_test_nodes (cyclomatic 18) code_review_graph/communities.py:271 — communities._reassign_test_nodes 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 · embeddings._node_to_text (cyclomatic 18) · ×1
  • embeddings._node_to_text (cyclomatic 18) REDACTED:1136 — embeddings._node_to_text 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 · GraphStore._get_test_helper_routes (cyclomatic 18) · ×1
  • GraphStore._get_test_helper_routes (cyclomatic 18) code_review_graph/graph.py:2654 — GraphStore._get_test_helper_routes 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 · incremental.get_staged_and_unstaged (cyclomatic 18) · ×1
  • incremental.get_staged_and_unstaged (cyclomatic 18) code_review_graph/incremental.py:1557 — incremental.get_staged_and_unstaged 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 · incremental.full_build (cyclomatic 18) · ×1
  • incremental.full_build (cyclomatic 18) code_review_graph/incremental.py:2988 — incremental.full_build 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 · install_plan.render (cyclomatic 18) · ×1
  • install_plan.render (cyclomatic 18) code_review_graph/install_plan.py:427 — install_plan.render 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 · neighbourhood._select_within_budget (cyclomatic 18) · ×1
  • neighbourhood._select_within_budget (cyclomatic 18) code_review_graph/neighbourhood.py:411 — neighbourhood._select_within_budget 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 · CodeParser._xslt_template (cyclomatic 18) · ×1
  • CodeParser._xslt_template (cyclomatic 18) code_review_graph/parser.py:5402 — CodeParser._xslt_template 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 · CodeParser._parse_notebook (cyclomatic 18) · ×1
  • CodeParser._parse_notebook (cyclomatic 18) code_review_graph/parser.py:5567 — CodeParser._parse_notebook 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 · CodeParser._extract_hcl_constructs (cyclomatic 18) · ×1
  • CodeParser._extract_hcl_constructs (cyclomatic 18) code_review_graph/parser.py:13192 — CodeParser._extract_hcl_constructs 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 · CodeParser._emit_spring_config_edges (cyclomatic 18) · ×1
  • CodeParser._emit_spring_config_edges (cyclomatic 18) code_review_graph/parser.py:15362 — CodeParser._emit_spring_config_edges 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 · CodeParser._php_endpoint_handler (cyclomatic 18) · ×1
  • CodeParser._php_endpoint_handler (cyclomatic 18) code_review_graph/parser.py:18541 — CodeParser._php_endpoint_handler 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 · CodeParser._get_java_method_and_receiver (cyclomatic 18) · ×1
  • CodeParser._get_java_method_and_receiver (cyclomatic 18) code_review_graph/parser.py:18844 — CodeParser._get_java_method_and_receiver 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 · CodeParser._parse_rust_use_node (cyclomatic 18) · ×1
  • CodeParser._parse_rust_use_node (cyclomatic 18) code_review_graph/parser.py:19492 — CodeParser._parse_rust_use_node 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 · skills._merge_toml_mcp_server (cyclomatic 18) · ×1
  • skills._merge_toml_mcp_server (cyclomatic 18) code_review_graph/skills.py:784 — skills._merge_toml_mcp_server 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 · uninstall._remove_mcp_entry (cyclomatic 18) · ×1
  • uninstall._remove_mcp_entry (cyclomatic 18) code_review_graph/uninstall.py:219 — uninstall._remove_mcp_entry 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 · communities._detect_leiden (cyclomatic 17) · ×1
  • communities._detect_leiden (cyclomatic 17) code_review_graph/communities.py:390 — communities._detect_leiden 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 · event_resolver.resolve_spring_events (cyclomatic 17) · ×1
  • event_resolver.resolve_spring_events (cyclomatic 17) code_review_graph/event_resolver.py:46 — event_resolver.resolve_spring_events 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 · flows.expand_changed_file_paths (cyclomatic 17) · ×1
  • flows.expand_changed_file_paths (cyclomatic 17) code_review_graph/flows.py:37 — flows.expand_changed_file_paths 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 · GraphStore._class_backed_candidates (cyclomatic 17) · ×1
  • GraphStore._class_backed_candidates (cyclomatic 17) code_review_graph/graph.py:3035 — GraphStore._class_backed_candidates 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 · _WatchSupervisor.sync_watches (cyclomatic 17) · ×1
  • _WatchSupervisor.sync_watches (cyclomatic 17) code_review_graph/incremental.py:4289 — _WatchSupervisor.sync_watches 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 · incremental.get_changed_files (cyclomatic 17) · ×1
  • incremental.get_changed_files (cyclomatic 17) code_review_graph/incremental.py:1323 — incremental.get_changed_files 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 · incremental._prewarm_parser_probes (cyclomatic 17) · ×1
  • incremental._prewarm_parser_probes (cyclomatic 17) code_review_graph/incremental.py:2843 — incremental._prewarm_parser_probes 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 · CodeParser._plsql_is_forward_decl (cyclomatic 17) · ×1
  • CodeParser._plsql_is_forward_decl (cyclomatic 17) code_review_graph/parser.py:7208 — CodeParser._plsql_is_forward_decl 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 · CodeParser._python_module_class_identities (cyclomatic 17) · ×1
  • CodeParser._python_module_class_identities (cyclomatic 17) code_review_graph/parser.py:9770 — CodeParser._python_module_class_identities 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 · CodeParser._cpp_function_identity (cyclomatic 17) · ×1
  • CodeParser._cpp_function_identity (cyclomatic 17) code_review_graph/parser.py:23547 — CodeParser._cpp_function_identity 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 · parser._python_static_truth (cyclomatic 17) · ×1
  • parser._python_static_truth (cyclomatic 17) code_review_graph/parser.py:316 — parser._python_static_truth 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 · parser._read_go_mod (cyclomatic 17) · ×1
  • parser._read_go_mod (cyclomatic 17) code_review_graph/parser.py:1020 — parser._read_go_mod 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 · review._generate_review_guidance (cyclomatic 17) · ×1
  • review._generate_review_guidance (cyclomatic 17) code_review_graph/tools/review.py:769 — review._generate_review_guidance 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 · TsconfigResolver._resolve_extends (cyclomatic 17) · ×1
  • TsconfigResolver._resolve_extends (cyclomatic 17) code_review_graph/tsconfig_resolver.py:140 — TsconfigResolver._resolve_extends 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 · daemon_cli._handle_stop (cyclomatic 16) · ×1
  • daemon_cli._handle_stop (cyclomatic 16) code_review_graph/daemon_cli.py:95 — daemon_cli._handle_stop 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 · doctor.check_graph (cyclomatic 16) · ×1
  • doctor.check_graph (cyclomatic 16) code_review_graph/doctor.py:535 — doctor.check_graph 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 · http_origin_guard.split_host_port (cyclomatic 16) · ×1
  • http_origin_guard.split_host_port (cyclomatic 16) code_review_graph/http_origin_guard.py:68 — http_origin_guard.split_host_port 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 · incremental._load_ignore_patterns (cyclomatic 16) · ×1
  • incremental._load_ignore_patterns (cyclomatic 16) code_review_graph/incremental.py:813 — incremental._load_ignore_patterns 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 · incremental._scan_nested_output_dirs (cyclomatic 16) · ×1
  • incremental._scan_nested_output_dirs (cyclomatic 16) code_review_graph/incremental.py:915 — incremental._scan_nested_output_dirs 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 · incremental.watch (cyclomatic 16) · ×1
  • incremental.watch (cyclomatic 16) code_review_graph/incremental.py:5177 — incremental.watch 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 · NpmAliasResolver._aliases_for_file (cyclomatic 16) · ×1
  • NpmAliasResolver._aliases_for_file (cyclomatic 16) code_review_graph/npm_alias_resolver.py:128 — NpmAliasResolver._aliases_for_file 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 · CodeParser._extract_html_scripts (cyclomatic 16) · ×1
  • CodeParser._extract_html_scripts (cyclomatic 16) code_review_graph/parser.py:5151 — CodeParser._extract_html_scripts 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 · CodeParser._resolve_typed_method_target (cyclomatic 16) · ×1
  • CodeParser._resolve_typed_method_target (cyclomatic 16) code_review_graph/parser.py:9046 — CodeParser._resolve_typed_method_target 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 · CodeParser._apply_typed_call_targets (cyclomatic 16) · ×1
  • CodeParser._apply_typed_call_targets (cyclomatic 16) code_review_graph/parser.py:9100 — CodeParser._apply_typed_call_targets 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 · CodeParser._resolve_java_method_reference_target (cyclomatic 16) · ×1
  • CodeParser._resolve_java_method_reference_target (cyclomatic 16) code_review_graph/parser.py:15838 — CodeParser._resolve_java_method_reference_target 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 · CodeParser._preceding_doc_comment (cyclomatic 16) · ×1
  • CodeParser._preceding_doc_comment (cyclomatic 16) code_review_graph/parser.py:16501 — CodeParser._preceding_doc_comment 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 · parser._read_php_composer_psr4 (cyclomatic 16) · ×1
  • parser._read_php_composer_psr4 (cyclomatic 16) code_review_graph/parser.py:1110 — parser._read_php_composer_psr4 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 · refactor._js_rename_sites (cyclomatic 16) · ×1
  • refactor._js_rename_sites (cyclomatic 16) code_review_graph/refactor.py:1425 — refactor._js_rename_sites 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 · query.traverse_graph_func (cyclomatic 16) · ×1
  • query.traverse_graph_func (cyclomatic 16) code_review_graph/tools/query.py:2322 — query.traverse_graph_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.
D1 · Cyclomatic Complexity · review._risk_by_file (cyclomatic 16) · ×1
  • review._risk_by_file (cyclomatic 16) code_review_graph/tools/review.py:192 — review._risk_by_file 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 · TsconfigResolver._strip_jsonc_comments (cyclomatic 16) · ×1
  • TsconfigResolver._strip_jsonc_comments (cyclomatic 16) code_review_graph/tsconfig_resolver.py:208 — TsconfigResolver._strip_jsonc_comments 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 · SqliteReader.getImpactRadius (cyclomatic 16) · ×1
  • SqliteReader.getImpactRadius (cyclomatic 16) code-review-graph-vscode/src/backend/sqlite.ts:440 — SqliteReader.getImpactRadius 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 · CodeParser._get_name (cognitive 435) · ×1
  • CodeParser._get_name (cognitive 435) code_review_graph/parser.py:22976 — CodeParser._get_name has cognitive complexity 435 (threshold 15). Drivers by points: if/else 82 (273 pts), loops 38 (144 pts), boolean chains 18 (nesting depth added 297). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · query.query_graph (cognitive 413) · ×1
  • query.query_graph (cognitive 413) code_review_graph/tools/query.py:1019 — query.query_graph has cognitive complexity 413 (threshold 15). Drivers by points: if/else 101 (273 pts), loops 32 (77 pts), boolean chains 34, ternaries 11 (29 pts) (nesting depth added 235). 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 · CodeParser._get_bases (cognitive 364) · ×1
  • CodeParser._get_bases (cognitive 364) code_review_graph/parser.py:23802 — CodeParser._get_bases has cognitive complexity 364 (threshold 15). Drivers by points: if/else 53 (218 pts), loops 38 (134 pts), boolean chains 8, ternaries 2 (4 pts) (nesting depth added 263). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · cli._dispatch (cognitive 332) · ×1
  • cli._dispatch (cognitive 332) code_review_graph/cli.py:2721 — cli._dispatch has cognitive complexity 332 (threshold 15). Drivers by points: if/else 112 (216 pts), ternaries 19 (54 pts), boolean chains 28, error handling 8 (25 pts), loops 3 (9 pts) (nesting depth added 162). 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 · CodeParser._extract_import (cognitive 238) · ×1
  • CodeParser._extract_import (cognitive 238) code_review_graph/parser.py:24256 — CodeParser._extract_import has cognitive complexity 238 (threshold 15). Drivers by points: if/else 49 (169 pts), loops 20 (55 pts), ternaries 2 (9 pts), boolean chains 5 (nesting depth added 162). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · refactor.find_dead_code (cognitive 236) · ×1
  • refactor.find_dead_code (cognitive 236) code_review_graph/refactor.py:1955 — refactor.find_dead_code has cognitive complexity 236 (threshold 15). Drivers by points: if/else 59 (177 pts), boolean chains 25, loops 8 (24 pts), error handling 1 (5 pts), ternaries 3 (5 pts) (nesting depth added 140). 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 · CodeParser._do_resolve_module (cognitive 203) · ×1
  • CodeParser._do_resolve_module (cognitive 203) code_review_graph/parser.py:21348 — CodeParser._do_resolve_module has cognitive complexity 203 (threshold 15). Drivers by points: if/else 51 (137 pts), loops 12 (33 pts), error handling 7 (18 pts), boolean chains 10, ternaries 2 (5 pts) (nesting depth added 121). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_julia_constructs (cognitive 181) · ×1
  • CodeParser._extract_julia_constructs (cognitive 181) code_review_graph/parser.py:13765 — CodeParser._extract_julia_constructs has cognitive complexity 181 (threshold 15). Drivers by points: if/else 34 (105 pts), loops 11 (39 pts), ternaries 10 (32 pts), boolean chains 5 (nesting depth added 121). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._get_call_name (cognitive 162) · ×1
  • CodeParser._get_call_name (cognitive 162) code_review_graph/parser.py:24579 — CodeParser._get_call_name has cognitive complexity 162 (threshold 15). Drivers by points: if/else 50 (111 pts), loops 14 (37 pts), boolean chains 14 (nesting depth added 84). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._resolve_call_targets (cognitive 154) · ×1
  • CodeParser._resolve_call_targets (cognitive 154) code_review_graph/parser.py:8024 — CodeParser._resolve_call_targets has cognitive complexity 154 (threshold 15). Drivers by points: if/else 39 (104 pts), loops 7 (20 pts), boolean chains 19, ternaries 2 (11 pts) (nesting depth added 87). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_verilog_constructs (cognitive 151) · ×1
  • CodeParser._extract_verilog_constructs (cognitive 151) code_review_graph/parser.py:19627 — CodeParser._extract_verilog_constructs has cognitive complexity 151 (threshold 15). Drivers by points: if/else 36 (92 pts), loops 18 (48 pts), ternaries 4 (8 pts), boolean chains 3 (nesting depth added 90). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · incremental.incremental_update (cognitive 148) · ×1
  • incremental.incremental_update (cognitive 148) code_review_graph/incremental.py:3173 — incremental.incremental_update has cognitive complexity 148 (threshold 15). Drivers by points: if/else 46 (73 pts), boolean chains 34, error handling 6 (17 pts), ternaries 15 (16 pts), loops 5 (8 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills._install_platform_configs (cognitive 124) · ×1
  • skills._install_platform_configs (cognitive 124) code_review_graph/skills.py:1291 — skills._install_platform_configs has cognitive complexity 124 (threshold 15). Drivers by points: if/else 39 (94 pts), ternaries 5 (14 pts), boolean chains 8, error handling 1 (4 pts), loops 2 (4 pts) (nesting depth added 69). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore._resolve_bare_endpoints (cognitive 120) · ×1
  • GraphStore._resolve_bare_endpoints (cognitive 120) code_review_graph/graph.py:3969 — GraphStore._resolve_bare_endpoints has cognitive complexity 120 (threshold 15). Drivers by points: if/else 33 (73 pts), ternaries 8 (22 pts), boolean chains 11, loops 4 (9 pts), error handling 2 (5 pts) (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._parse_robot (cognitive 120) · ×1
  • CodeParser._parse_robot (cognitive 120) code_review_graph/parser.py:6234 — CodeParser._parse_robot has cognitive complexity 120 (threshold 15). Drivers by points: if/else 37 (88 pts), loops 9 (17 pts), boolean chains 12, ternaries 1 (3 pts) (nesting depth added 61). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._collect_import_names (cognitive 117) · ×1
  • CodeParser._collect_import_names (cognitive 117) code_review_graph/parser.py:21043 — CodeParser._collect_import_names has cognitive complexity 117 (threshold 15). Drivers by points: if/else 25 (83 pts), loops 7 (17 pts), ternaries 3 (9 pts), boolean chains 8 (nesting depth added 74). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._parse_rescript (cognitive 112) · ×1
  • CodeParser._parse_rescript (cognitive 112) code_review_graph/parser.py:6550 — CodeParser._parse_rescript has cognitive complexity 112 (threshold 15). Drivers by points: if/else 29 (68 pts), loops 22 (34 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_functions (cognitive 112) · ×1
  • CodeParser._extract_functions (cognitive 112) code_review_graph/parser.py:16850 — CodeParser._extract_functions has cognitive complexity 112 (threshold 15). Drivers by points: if/else 45 (76 pts), boolean chains 16, loops 6 (14 pts), ternaries 5 (6 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_classes (cognitive 107) · ×1
  • CodeParser._extract_classes (cognitive 107) code_review_graph/parser.py:16553 — CodeParser._extract_classes has cognitive complexity 107 (threshold 15). Drivers by points: if/else 40 (71 pts), ternaries 6 (15 pts), boolean chains 12, loops 4 (9 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · search.hybrid_search (cognitive 101) · ×1
  • search.hybrid_search (cognitive 101) code_review_graph/search.py:995 — search.hybrid_search has cognitive complexity 101 (threshold 15). Drivers by points: if/else 34 (73 pts), boolean chains 13, ternaries 4 (9 pts), loops 4 (5 pts), error handling 1 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._extract_calls (cognitive 100) · ×1
  • CodeParser._extract_calls (cognitive 100) code_review_graph/parser.py:17274 — CodeParser._extract_calls has cognitive complexity 100 (threshold 15). Drivers by points: if/else 25 (54 pts), boolean chains 31, ternaries 6 (15 pts) (nesting depth added 38). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · aop_resolver.resolve_aop_advice (cognitive 94) · ×1
  • aop_resolver.resolve_aop_advice (cognitive 94) code_review_graph/aop_resolver.py:316 — aop_resolver.resolve_aop_advice has cognitive complexity 94 (threshold 15). Drivers by points: if/else 21 (66 pts), loops 9 (18 pts), ternaries 1 (6 pts), boolean chains 4 (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch 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.build_or_update_graph (cognitive 91) · ×1
  • build.build_or_update_graph (cognitive 91) code_review_graph/tools/build.py:486 — build.build_or_update_graph has cognitive complexity 91 (threshold 15). Drivers by points: if/else 26 (53 pts), boolean chains 18, ternaries 7 (18 pts), error handling 1 (2 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GraphStore.get_caller_test_routes (cognitive 90) · ×1
  • GraphStore.get_caller_test_routes (cognitive 90) code_review_graph/graph.py:2734 — GraphStore.get_caller_test_routes has cognitive complexity 90 (threshold 15). Drivers by points: if/else 21 (58 pts), loops 13 (29 pts), boolean chains 3 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._extract_bytes (cognitive 90) · ×1
  • CodeParser._extract_bytes (cognitive 90) code_review_graph/parser.py:4133 — CodeParser._extract_bytes has cognitive complexity 90 (threshold 15). Drivers by points: if/else 51 (75 pts), boolean chains 8, loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · spring_resolver.resolve_spring_di_calls (cognitive 90) · ×1
  • spring_resolver.resolve_spring_di_calls (cognitive 90) code_review_graph/spring_resolver.py:30 — spring_resolver.resolve_spring_di_calls has cognitive complexity 90 (threshold 15). Drivers by points: if/else 26 (49 pts), boolean chains 14, ternaries 6 (13 pts), error handling 4 (8 pts), loops 6 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.registerCommands (cognitive 90) · ×1
  • extension.registerCommands (cognitive 90) code-review-graph-vscode/src/extension.ts:80 — extension.registerCommands has cognitive complexity 90 (threshold 15). Drivers by points: if/else 66 (73 pts), ternaries 6 (8 pts), boolean chains 4, loops 3 (4 pts), error handling 1 (nesting depth added 10). None of this is in the body itself: all 90 points belong to 18 function literals inside it that branch (lines 658, 317, 139, …). 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 · GraphStore.get_transitive_tests (cognitive 87) · ×1
  • GraphStore.get_transitive_tests (cognitive 87) code_review_graph/graph.py:2316 — GraphStore.get_transitive_tests has cognitive complexity 87 (threshold 15). Drivers by points: if/else 18 (53 pts), loops 12 (24 pts), boolean chains 5, ternaries 3, error handling 1 (2 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._collect_file_scope (cognitive 87) · ×1
  • CodeParser._collect_file_scope (cognitive 87) code_review_graph/parser.py:19968 — CodeParser._collect_file_scope has cognitive complexity 87 (threshold 15). Drivers by points: if/else 19 (53 pts), loops 5 (14 pts), boolean chains 12, ternaries 2 (8 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._emit_kafka_edges_from_class (cognitive 86) · ×1
  • CodeParser._emit_kafka_edges_from_class (cognitive 86) code_review_graph/parser.py:16306 — CodeParser._emit_kafka_edges_from_class has cognitive complexity 86 (threshold 15). Drivers by points: if/else 12 (56 pts), loops 7 (28 pts), boolean chains 2 (nesting depth added 65). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._parse_vbnet (cognitive 85) · ×1
  • CodeParser._parse_vbnet (cognitive 85) code_review_graph/parser.py:5888 — CodeParser._parse_vbnet has cognitive complexity 85 (threshold 15). Drivers by points: if/else 21 (49 pts), loops 10 (22 pts), boolean chains 10, ternaries 1 (4 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_from_tree (cognitive 85) · ×1
  • CodeParser._extract_from_tree (cognitive 85) code_review_graph/parser.py:12324 — CodeParser._extract_from_tree has cognitive complexity 85 (threshold 15). Drivers by points: if/else 29 (63 pts), boolean chains 21, loops 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._get_member_call_receiver_method (cognitive 81) · ×1
  • CodeParser._get_member_call_receiver_method (cognitive 81) code_review_graph/parser.py:17582 — CodeParser._get_member_call_receiver_method has cognitive complexity 81 (threshold 15). Drivers by points: if/else 32 (53 pts), boolean chains 22, loops 3 (6 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · cli._plan_integrations (cognitive 72) · ×1
  • cli._plan_integrations (cognitive 72) code_review_graph/cli.py:666 — cli._plan_integrations has cognitive complexity 72 (threshold 15). Drivers by points: if/else 27 (49 pts), error handling 5 (11 pts), boolean chains 7, loops 2 (4 pts), ternaries 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · refactor._lexical_sites (cognitive 72) · ×1
  • refactor._lexical_sites (cognitive 72) code_review_graph/refactor.py:1539 — refactor._lexical_sites has cognitive complexity 72 (threshold 15). Drivers by points: if/else 15 (45 pts), loops 5 (12 pts), ternaries 2 (9 pts), boolean chains 6 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CodeParser._parse_svelte (cognitive 71) · ×1
  • CodeParser._parse_svelte (cognitive 71) code_review_graph/parser.py:4852 — CodeParser._parse_svelte has cognitive complexity 71 (threshold 15). Drivers by points: if/else 14 (43 pts), loops 9 (26 pts), boolean chains 2 (nesting depth added 46). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._php_route_group_settings (cognitive 71) · ×1
  • CodeParser._php_route_group_settings (cognitive 71) code_review_graph/parser.py:18448 — CodeParser._php_route_group_settings has cognitive complexity 71 (threshold 15). Drivers by points: if/else 17 (55 pts), ternaries 2 (8 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 46). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._parse_vue (cognitive 70) · ×1
  • CodeParser._parse_vue (cognitive 70) code_review_graph/parser.py:4740 — CodeParser._parse_vue has cognitive complexity 70 (threshold 15). Drivers by points: if/else 13 (42 pts), loops 9 (26 pts), boolean chains 2 (nesting depth added 46). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · jedi_resolver.enrich_jedi_calls (cognitive 69) · ×1
  • jedi_resolver.enrich_jedi_calls (cognitive 69) code_review_graph/jedi_resolver.py:28 — jedi_resolver.enrich_jedi_calls has cognitive complexity 69 (threshold 15). Drivers by points: if/else 25 (50 pts), error handling 5 (11 pts), loops 4 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · changes.analyze_changes (cognitive 68) · ×1
  • changes.analyze_changes (cognitive 68) code_review_graph/changes.py:1482 — changes.analyze_changes has cognitive complexity 68 (threshold 15). Drivers by points: if/else 32 (44 pts), loops 6 (11 pts), boolean chains 8, ternaries 3, error handling 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._typed_bindings_from_node (cognitive 68) · ×1
  • CodeParser._typed_bindings_from_node (cognitive 68) code_review_graph/parser.py:8809 — CodeParser._typed_bindings_from_node has cognitive complexity 68 (threshold 15). Drivers by points: if/else 18 (50 pts), boolean chains 14, loops 2 (4 pts) (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · GraphStore._import_evidence (cognitive 63) · ×1
  • GraphStore._import_evidence (cognitive 63) code_review_graph/graph.py:3788 — GraphStore._import_evidence has cognitive complexity 63 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 9 (19 pts), boolean chains 5, error handling 2 (5 pts), ternaries 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiWorktreeRouter.handle (cognitive 63) · ×1
  • MultiWorktreeRouter.handle (cognitive 63) code_review_graph/multi_worktree.py:543 — MultiWorktreeRouter.handle has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (37 pts), error handling 6 (17 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 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 · CodeParser._go_receiver_binding_index (cognitive 63) · ×1
  • CodeParser._go_receiver_binding_index (cognitive 63) code_review_graph/parser.py:23390 — CodeParser._go_receiver_binding_index has cognitive complexity 63 (threshold 15). Drivers by points: if/else 19 (45 pts), boolean chains 10, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._emit_spring_field_injection (cognitive 62) · ×1
  • CodeParser._emit_spring_field_injection (cognitive 62) code_review_graph/parser.py:15473 — CodeParser._emit_spring_field_injection has cognitive complexity 62 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 7 (21 pts), boolean chains 3 (nesting depth added 40). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · cli._handle_init (cognitive 61) · ×1
  • cli._handle_init (cognitive 61) code_review_graph/cli.py:458 — cli._handle_init has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (32 pts), loops 5 (11 pts), ternaries 5 (9 pts), boolean chains 6, error handling 2 (3 pts) (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 · GraphStore.resolve_cpp_scoped_call_targets (cognitive 61) · ×1
  • GraphStore.resolve_cpp_scoped_call_targets (cognitive 61) code_review_graph/graph.py:3535 — GraphStore.resolve_cpp_scoped_call_targets has cognitive complexity 61 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 9 (20 pts), ternaries 2 (6 pts), boolean chains 5, error handling 2 (4 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graph.node_to_dict (cognitive 61) · ×1
  • graph.node_to_dict (cognitive 61) code_review_graph/graph.py:5886 — graph.node_to_dict has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (43 pts), loops 4 (9 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._extract_solidity_constructs (cognitive 61) · ×1
  • CodeParser._extract_solidity_constructs (cognitive 61) code_review_graph/parser.py:19304 — CodeParser._extract_solidity_constructs has cognitive complexity 61 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 6 (16 pts), ternaries 3 (12 pts), boolean chains 1 (nesting depth added 38). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._strip_rescript_noise (cognitive 60) · ×1
  • parser._strip_rescript_noise (cognitive 60) code_review_graph/parser.py:2349 — parser._strip_rescript_noise has cognitive complexity 60 (threshold 15). Drivers by points: if/else 9 (23 pts), ternaries 4 (15 pts), loops 5 (13 pts), boolean chains 9 (nesting depth added 33). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · GraphStore._plan_file_identities (cognitive 59) · ×1
  • GraphStore._plan_file_identities (cognitive 59) code_review_graph/graph.py:1341 — GraphStore._plan_file_identities has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 11 (23 pts), boolean chains 4 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._mask_cpp_qt_macros (cognitive 58) · ×1
  • CodeParser._mask_cpp_qt_macros (cognitive 58) code_review_graph/parser.py:4449 — CodeParser._mask_cpp_qt_macros has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (39 pts), loops 3 (7 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._parse_ansible_tasks (cognitive 58) · ×1
  • CodeParser._parse_ansible_tasks (cognitive 58) code_review_graph/parser.py:12093 — CodeParser._parse_ansible_tasks has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (37 pts), ternaries 4 (9 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._emit_spring_config_edges (cognitive 57) · ×1
  • CodeParser._emit_spring_config_edges (cognitive 57) code_review_graph/parser.py:15362 — CodeParser._emit_spring_config_edges has cognitive complexity 57 (threshold 15). Drivers by points: if/else 8 (30 pts), loops 9 (27 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · refactor._rename_edits (cognitive 57) · ×1
  • refactor._rename_edits (cognitive 57) code_review_graph/refactor.py:1745 — refactor._rename_edits has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 8 (14 pts), boolean chains 8, ternaries 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CodeParser._resolve_exported_symbol (cognitive 56) · ×1
  • CodeParser._resolve_exported_symbol (cognitive 56) code_review_graph/parser.py:22758 — CodeParser._resolve_exported_symbol has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (47 pts), loops 3 (6 pts), boolean chains 2, error handling 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · _PyRenameScan._visit (cognitive 56) · ×1
  • _PyRenameScan._visit (cognitive 56) code_review_graph/refactor.py:602 — _PyRenameScan._visit has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 6 (12 pts), ternaries 4 (11 pts), boolean chains 5 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graph.getVisibleData (cognitive 55) · ×1
  • graph.getVisibleData (cognitive 55) code-review-graph-vscode/src/webview/graph.ts:288 — graph.getVisibleData has cognitive complexity 55 (threshold 15). Drivers by points: if/else 8 (22 pts), ternaries 4 (16 pts), loops 4 (11 pts), boolean chains 6 (nesting depth added 33). Of this number, 54 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 · OpenAIEmbeddingProvider._call_api (cognitive 53) · ×1
  • OpenAIEmbeddingProvider._call_api (cognitive 53) REDACTED:451 — OpenAIEmbeddingProvider._call_api has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (28 pts), error handling 4 (10 pts), boolean chains 7, ternaries 2 (7 pts), loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._extract_elixir_constructs (cognitive 53) · ×1
  • CodeParser._extract_elixir_constructs (cognitive 53) code_review_graph/parser.py:12686 — CodeParser._extract_elixir_constructs has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (36 pts), loops 5 (10 pts), ternaries 3 (5 pts), boolean chains 2 (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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · temporal_resolver.resolve_temporal_calls (cognitive 53) · ×1
  • temporal_resolver.resolve_temporal_calls (cognitive 53) code_review_graph/temporal_resolver.py:31 — temporal_resolver.resolve_temporal_calls has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 6, error handling 3 (6 pts), loops 6, ternaries 1 (3 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 · query.get_impact_radius (cognitive 52) · ×1
  • query.get_impact_radius (cognitive 52) code_review_graph/tools/query.py:738 — query.get_impact_radius has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (38 pts), boolean chains 7, ternaries 4, loops 2, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cli._handle_build_update (cognitive 51) · ×1
  • cli._handle_build_update (cognitive 51) code_review_graph/cli.py:1301 — cli._handle_build_update has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (38 pts), ternaries 4 (8 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 28). 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 · jsonc.tokenize (cognitive 50) · ×1
  • jsonc.tokenize (cognitive 50) code_review_graph/jsonc.py:129 — jsonc.tokenize has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (30 pts), ternaries 2 (8 pts), loops 3 (6 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · review.get_review_context (cognitive 50) · ×1
  • review.get_review_context (cognitive 50) code_review_graph/tools/review.py:434 — review.get_review_context has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 6, ternaries 5, error handling 2 (4 pts), 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 · VoyageEmbeddingProvider._call_api (cognitive 49) · ×1
  • VoyageEmbeddingProvider._call_api (cognitive 49) REDACTED:686 — VoyageEmbeddingProvider._call_api has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (25 pts), error handling 4 (10 pts), ternaries 2 (7 pts), boolean chains 6, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._parse_json (cognitive 49) · ×1
  • CodeParser._parse_json (cognitive 49) code_review_graph/parser.py:11493 — CodeParser._parse_json has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 3 (7 pts), ternaries 2 (7 pts), boolean chains 4 (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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._emit_temporal_stub_fields (cognitive 49) · ×1
  • CodeParser._emit_temporal_stub_fields (cognitive 49) code_review_graph/parser.py:16218 — CodeParser._emit_temporal_stub_fields has cognitive complexity 49 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 5 (16 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · python_resolver.resolve_python_imports (cognitive 49) · ×1
  • python_resolver.resolve_python_imports (cognitive 49) code_review_graph/python_resolver.py:34 — python_resolver.resolve_python_imports has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 4, loops 3 (4 pts), ternaries 2 (4 pts), error handling 1 (3 pts) (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 · scoped_resolver.resolve_scoped_calls (cognitive 49) · ×1
  • scoped_resolver.resolve_scoped_calls (cognitive 49) code_review_graph/scoped_resolver.py:235 — scoped_resolver.resolve_scoped_calls has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 6 (7 pts), boolean chains 4, error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._emit_laravel_endpoint_nodes (cognitive 48) · ×1
  • CodeParser._emit_laravel_endpoint_nodes (cognitive 48) code_review_graph/parser.py:18579 — CodeParser._emit_laravel_endpoint_nodes has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (31 pts), ternaries 4 (7 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · GraphStore._get_impact_radius_networkx (cognitive 47) · ×1
  • GraphStore._get_impact_radius_networkx (cognitive 47) code_review_graph/graph.py:4906 — GraphStore._get_impact_radius_networkx has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 3 (6 pts), boolean chains 5, ternaries 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._parse_html (cognitive 47) · ×1
  • CodeParser._parse_html (cognitive 47) code_review_graph/parser.py:4983 — CodeParser._parse_html has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 6 (11 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._get_kafka_annotation_topics (cognitive 47) · ×1
  • CodeParser._get_kafka_annotation_topics (cognitive 47) code_review_graph/parser.py:16276 — CodeParser._get_kafka_annotation_topics has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (36 pts), loops 4 (11 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · csharp_resolver.resolve_csharp_calls (cognitive 46) · ×1
  • csharp_resolver.resolve_csharp_calls (cognitive 46) code_review_graph/csharp_resolver.py:121 — csharp_resolver.resolve_csharp_calls has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 5 (8 pts), boolean chains 7, 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 · CodeParser._strip_plsql_noise (cognitive 46) · ×1
  • CodeParser._strip_plsql_noise (cognitive 46) code_review_graph/parser.py:7092 — CodeParser._strip_plsql_noise has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (23 pts), ternaries 5 (16 pts), boolean chains 6, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · wiki._generate_community_page (cognitive 46) · ×1
  • wiki._generate_community_page (cognitive 46) code_review_graph/wiki.py:49 — wiki._generate_community_page has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (29 pts), loops 7 (13 pts), boolean chains 2, error handling 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · embeddings.get_provider (cognitive 45) · ×1
  • embeddings.get_provider (cognitive 45) REDACTED:881 — embeddings.get_provider has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 7 (13 pts), boolean chains 7, error handling 2 (3 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 · flows.incremental_trace_flows (cognitive 45) · ×1
  • flows.incremental_trace_flows (cognitive 45) code_review_graph/flows.py:808 — flows.incremental_trace_flows has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 7 (14 pts), error handling 2 (4 pts), boolean chains 3 (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 · install_gitignore.repo_files (cognitive 45) · ×1
  • install_gitignore.repo_files (cognitive 45) code_review_graph/install_gitignore.py:75 — install_gitignore.repo_files has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 3 (6 pts), error handling 1 (3 pts), boolean chains 1, ternaries 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 · _PythonUnreachableCallVisitor._visit_statements (cognitive 45) · ×1
  • _PythonUnreachableCallVisitor._visit_statements (cognitive 45) code_review_graph/parser.py:486 — _PythonUnreachableCallVisitor._visit_statements has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (31 pts), loops 4 (12 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._parse_databricks_py_notebook (cognitive 45) · ×1
  • CodeParser._parse_databricks_py_notebook (cognitive 45) code_review_graph/parser.py:5786 — CodeParser._parse_databricks_py_notebook has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 4 (6 pts), boolean chains 3, ternaries 1 (3 pts) (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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · reporter.generate_readme_tables (cognitive 44) · ×1
  • reporter.generate_readme_tables (cognitive 44) code_review_graph/eval/reporter.py:181 — reporter.generate_readme_tables has cognitive complexity 44 (threshold 15). Drivers by points: loops 8 (16 pts), if/else 8 (12 pts), error handling 2 (6 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flows.expand_changed_file_paths (cognitive 43) · ×1
  • flows.expand_changed_file_paths (cognitive 43) code_review_graph/flows.py:37 — flows.expand_changed_file_paths has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 6 (15 pts), error handling 2 (7 pts), ternaries 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 · GraphStore._get_test_helper_routes (cognitive 43) · ×1
  • GraphStore._get_test_helper_routes (cognitive 43) code_review_graph/graph.py:2654 — GraphStore._get_test_helper_routes has cognitive complexity 43 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 7 (18 pts), boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._rust_project_context (cognitive 43) · ×1
  • CodeParser._rust_project_context (cognitive 43) code_review_graph/parser.py:22266 — CodeParser._rust_project_context has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 4, error handling 3 (4 pts), loops 2, 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · _PyRenameScan._visit_import_from (cognitive 43) · ×1
  • _PyRenameScan._visit_import_from (cognitive 43) code_review_graph/refactor.py:804 — _PyRenameScan._visit_import_from has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 5, loops 3 (5 pts), ternaries 2 (3 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 · _JsScan.run (cognitive 43) · ×1
  • _JsScan.run (cognitive 43) code_review_graph/refactor.py:1129 — _JsScan.run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 9, loops 3 (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 · skills._merge_yaml_mcp_server (cognitive 43) · ×1
  • skills._merge_yaml_mcp_server (cognitive 43) code_review_graph/skills.py:940 — skills._merge_yaml_mcp_server has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 11, ternaries 3 (5 pts), error handling 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 · CodeParser._parse_notebook_cells (cognitive 42) · ×1
  • CodeParser._parse_notebook_cells (cognitive 42) code_review_graph/parser.py:5651 — CodeParser._parse_notebook_cells has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 9 (18 pts), ternaries 1 (3 pts), boolean chains 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · skills._copilot_vscode_detected (cognitive 42) · ×1
  • skills._copilot_vscode_detected (cognitive 42) code_review_graph/skills.py:47 — skills._copilot_vscode_detected has cognitive complexity 42 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 6 (15 pts), error handling 3 (8 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · incremental.full_build (cognitive 41) · ×1
  • incremental.full_build (cognitive 41) code_review_graph/incremental.py:2988 — incremental.full_build has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (27 pts), error handling 2 (6 pts), loops 2 (4 pts), boolean chains 3, ternaries 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 · InheritanceIndex.resolve_type (cognitive 41) · ×1
  • InheritanceIndex.resolve_type (cognitive 41) code_review_graph/inheritance.py:177 — InheritanceIndex.resolve_type has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (30 pts), ternaries 1 (5 pts), boolean chains 3, loops 1 (3 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 · CodeParser._handle_zig_var_decl (cognitive 41) · ×1
  • CodeParser._handle_zig_var_decl (cognitive 41) code_review_graph/parser.py:14550 — CodeParser._handle_zig_var_decl has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 5 (11 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · hcl_resolver.resolve_hcl_module_references (cognitive 40) · ×1
  • hcl_resolver.resolve_hcl_module_references (cognitive 40) code_review_graph/hcl_resolver.py:18 — hcl_resolver.resolve_hcl_module_references has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 2 (5 pts), boolean chains 4, error handling 2 (4 pts), loops 4 (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 · npm_alias_resolver._token_comparators (cognitive 40) · ×1
  • npm_alias_resolver._token_comparators (cognitive 40) code_review_graph/npm_alias_resolver.py:362 — npm_alias_resolver._token_comparators has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 14, ternaries 3 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._parse_sql (cognitive 40) · ×1
  • CodeParser._parse_sql (cognitive 40) code_review_graph/parser.py:7315 — CodeParser._parse_sql has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 9 (12 pts), ternaries 5 (7 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._emit_spring_event_listener_edges (cognitive 40) · ×1
  • CodeParser._emit_spring_event_listener_edges (cognitive 40) code_review_graph/parser.py:16088 — CodeParser._emit_spring_event_listener_edges has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (31 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 26). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._collect_js_import_names (cognitive 40) · ×1
  • CodeParser._collect_js_import_names (cognitive 40) code_review_graph/parser.py:21243 — CodeParser._collect_js_import_names has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (26 pts), loops 3 (7 pts), ternaries 1 (6 pts), boolean chains 1 (nesting depth added 29). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · rescript_resolver.resolve_rescript_cross_module (cognitive 40) · ×1
  • rescript_resolver.resolve_rescript_cross_module (cognitive 40) code_review_graph/rescript_resolver.py:39 — rescript_resolver.resolve_rescript_cross_module has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 7, error handling 2 (4 pts), loops 4 (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 · uninstall._clean_hook_data (cognitive 40) · ×1
  • uninstall._clean_hook_data (cognitive 40) code_review_graph/uninstall.py:579 — uninstall._clean_hook_data has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (6 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._parse_ansible_playbook (cognitive 39) · ×1
  • CodeParser._parse_ansible_playbook (cognitive 39) code_review_graph/parser.py:11977 — CodeParser._parse_ansible_playbook has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._python_name_bindings (cognitive 39) · ×1
  • CodeParser._python_name_bindings (cognitive 39) code_review_graph/parser.py:20662 — CodeParser._python_name_bindings has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 3 (7 pts), ternaries 1 (5 pts), boolean chains 3 (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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · review.detect_changes_func (cognitive 39) · ×1
  • review.detect_changes_func (cognitive 39) code_review_graph/tools/review.py:975 — review.detect_changes_func has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 3 (7 pts), error handling 2 (6 pts), boolean chains 4, loops 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 · uninstall._process_platform_configs (cognitive 39) · ×1
  • uninstall._process_platform_configs (cognitive 39) code_review_graph/uninstall.py:1270 — uninstall._process_platform_configs has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (6 pts), ternaries 2 (5 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · enrich._format_node_context (cognitive 38) · ×1
  • enrich._format_node_context (cognitive 38) code_review_graph/enrich.py:101 — enrich._format_node_context has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 6, loops 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore._resolve_inherited_endpoints (cognitive 38) · ×1
  • GraphStore._resolve_inherited_endpoints (cognitive 38) code_review_graph/graph.py:3274 — GraphStore._resolve_inherited_endpoints has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 7 (10 pts), boolean chains 6, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install_plan.render (cognitive 38) · ×1
  • install_plan.render (cognitive 38) code_review_graph/install_plan.py:427 — install_plan.render has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 4 (14 pts), boolean chains 6, loops 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CodeParser._handle_lua_variable_declaration (cognitive 38) · ×1
  • CodeParser._handle_lua_variable_declaration (cognitive 38) code_review_graph/parser.py:14205 — CodeParser._handle_lua_variable_declaration has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 3 (10 pts), loops 6 (8 pts), boolean chains 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._read_php_composer_psr4 (cognitive 38) · ×1
  • parser._read_php_composer_psr4 (cognitive 38) code_review_graph/parser.py:1110 — parser._read_php_composer_psr4 has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (6 pts), ternaries 2 (6 pts), error handling 2 (5 pts) (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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._php_attribute_aliases (cognitive 38) · ×1
  • parser._php_attribute_aliases (cognitive 38) code_review_graph/parser.py:2855 — parser._php_attribute_aliases has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (35 pts), loops 2, boolean chains 1 (nesting depth added 27). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · query._attach_neighbors (cognitive 38) · ×1
  • query._attach_neighbors (cognitive 38) code_review_graph/tools/query.py:1926 — query._attach_neighbors has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (29 pts), loops 3 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · daemon_cli._handle_status (cognitive 37) · ×1
  • daemon_cli._handle_status (cognitive 37) code_review_graph/daemon_cli.py:219 — daemon_cli._handle_status has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 7 (19 pts), if/else 8 (11 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore.get_ambiguous_call_tests (cognitive 37) · ×1
  • GraphStore.get_ambiguous_call_tests (cognitive 37) code_review_graph/graph.py:2542 — GraphStore.get_ambiguous_call_tests has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (5 pts), boolean chains 4, error handling 1 (3 pts), ternaries 1 (3 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 · CodeParser._plsql_member_signature (cognitive 37) · ×1
  • CodeParser._plsql_member_signature (cognitive 37) code_review_graph/parser.py:7259 — CodeParser._plsql_member_signature has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 2 (6 pts), boolean chains 5, loops 3 (5 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._python_expression_class_evidence (cognitive 37) · ×1
  • CodeParser._python_expression_class_evidence (cognitive 37) code_review_graph/parser.py:9926 — CodeParser._python_expression_class_evidence has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 6, ternaries 2 (6 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · exports.export_obsidian_vault (cognitive 36) · ×1
  • exports.export_obsidian_vault (cognitive 36) code_review_graph/exports.py:266 — exports.export_obsidian_vault has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 9 (16 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · incremental._load_ignore_patterns (cognitive 36) · ×1
  • incremental._load_ignore_patterns (cognitive 36) code_review_graph/incremental.py:813 — incremental._load_ignore_patterns has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (29 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CodeParser._extract_dart_calls_from_children (cognitive 36) · ×1
  • CodeParser._extract_dart_calls_from_children (cognitive 36) code_review_graph/parser.py:13430 — CodeParser._extract_dart_calls_from_children has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 3 (9 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_js_var_functions (cognitive 36) · ×1
  • CodeParser._extract_js_var_functions (cognitive 36) code_review_graph/parser.py:14935 — CodeParser._extract_js_var_functions has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (6 pts), boolean chains 4, ternaries 2 (4 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._r_first_string_arg (cognitive 36) · ×1
  • CodeParser._r_first_string_arg (cognitive 36) code_review_graph/parser.py:24909 — CodeParser._r_first_string_arg has cognitive complexity 36 (threshold 15). Drivers by points: if/else 4 (20 pts), loops 4 (16 pts) (nesting depth added 28). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · custom_languages._validate_entry (cognitive 35) · ×1
  • custom_languages._validate_entry (cognitive 35) code_review_graph/custom_languages.py:201 — custom_languages._validate_entry has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 7, ternaries 2 (3 pts), loops 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parser._python_type_checking_aliases (cognitive 35) · ×1
  • parser._python_type_checking_aliases (cognitive 35) code_review_graph/parser.py:274 — parser._python_type_checking_aliases has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (8 pts), boolean chains 6 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · _JsScan.visit_import (cognitive 35) · ×1
  • _JsScan.visit_import (cognitive 35) code_review_graph/refactor.py:1313 — _JsScan.visit_import has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 2 (4 pts), boolean chains 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 · refactor.apply_refactor (cognitive 35) · ×1
  • refactor.apply_refactor (cognitive 35) code_review_graph/refactor.py:2563 — refactor.apply_refactor has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (20 pts), error handling 3 (6 pts), loops 5 (6 pts), ternaries 1 (2 pts), boolean chains 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 · build._run_postprocess (cognitive 35) · ×1
  • build._run_postprocess (cognitive 35) code_review_graph/tools/build.py:231 — build._run_postprocess has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (19 pts), error handling 6 (8 pts), boolean chains 7, loops 1 (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 · changes._review_pure_deletions (cognitive 34) · ×1
  • changes._review_pure_deletions (cognitive 34) code_review_graph/changes.py:1134 — changes._review_pure_deletions has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 4 (5 pts), boolean chains 4 (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 · incremental._scan_nested_output_dirs (cognitive 34) · ×1
  • incremental._scan_nested_output_dirs (cognitive 34) code_review_graph/incremental.py:915 — incremental._scan_nested_output_dirs has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 3 (6 pts), boolean chains 3 (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 · CodeParser._get_jsx_component_reference (cognitive 34) · ×1
  • CodeParser._get_jsx_component_reference (cognitive 34) code_review_graph/parser.py:24819 — CodeParser._get_jsx_component_reference has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 3 (7 pts), boolean chains 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · refactor.suggest_refactorings (cognitive 34) · ×1
  • refactor.suggest_refactorings (cognitive 34) code_review_graph/refactor.py:2411 — refactor.suggest_refactorings has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 5 (11 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills._merge_hook_entries (cognitive 34) · ×1
  • skills._merge_hook_entries (cognitive 34) code_review_graph/skills.py:3017 — skills._merge_hook_entries has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (6 pts), boolean chains 4, ternaries 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 · analysis.find_surprising_connections (cognitive 33) · ×1
  • analysis.find_surprising_connections (cognitive 33) code_review_graph/analysis.py:349 — analysis.find_surprising_connections has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 9, ternaries 2 (4 pts), 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 · communities._split_oversized (cognitive 33) · ×1
  • communities._split_oversized (cognitive 33) code_review_graph/communities.py:604 — communities._split_oversized has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4 (7 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._parse_notebook (cognitive 33) · ×1
  • CodeParser._parse_notebook (cognitive 33) code_review_graph/parser.py:5567 — CodeParser._parse_notebook has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (6 pts), boolean chains 3, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._resolve_julia_call_targets (cognitive 33) · ×1
  • CodeParser._resolve_julia_call_targets (cognitive 33) code_review_graph/parser.py:8387 — CodeParser._resolve_julia_call_targets has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 3 (7 pts), loops 4 (5 pts), boolean chains 4 (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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._get_csharp_receiver_method (cognitive 33) · ×1
  • CodeParser._get_csharp_receiver_method (cognitive 33) code_review_graph/parser.py:17747 — CodeParser._get_csharp_receiver_method has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._php_import_bindings (cognitive 33) · ×1
  • CodeParser._php_import_bindings (cognitive 33) code_review_graph/parser.py:18226 — CodeParser._php_import_bindings has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · refactor._python_rename_sites (cognitive 33) · ×1
  • refactor._python_rename_sites (cognitive 33) code_review_graph/refactor.py:890 — refactor._python_rename_sites has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 6, loops 3 (5 pts), ternaries 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 · skills._merge_toml_mcp_server (cognitive 33) · ×1
  • skills._merge_toml_mcp_server (cognitive 33) code_review_graph/skills.py:784 — skills._merge_toml_mcp_server has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (28 pts), error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · changes.map_changes_to_nodes (cognitive 32) · ×1
  • changes.map_changes_to_nodes (cognitive 32) code_review_graph/changes.py:761 — changes.map_changes_to_nodes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 4 (9 pts), boolean chains 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 · InheritanceIndex.__init__ (cognitive 32) · ×1
  • InheritanceIndex.__init__ (cognitive 32) code_review_graph/inheritance.py:82 — InheritanceIndex.__init__ has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 3 (9 pts), loops 6 (7 pts), boolean chains 3 (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 · CodeParser._add_html_script_import (cognitive 32) · ×1
  • CodeParser._add_html_script_import (cognitive 32) code_review_graph/parser.py:5252 — CodeParser._add_html_script_import has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), error handling 1 (3 pts), loops 1 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 18). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._php_attribute_names (cognitive 32) · ×1
  • parser._php_attribute_names (cognitive 32) code_review_graph/parser.py:2906 — parser._php_attribute_names has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 4 (10 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · flows_tools.get_flow (cognitive 32) · ×1
  • flows_tools.get_flow (cognitive 32) code_review_graph/tools/flows_tools.py:111 — flows_tools.get_flow has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, error handling 2 (5 pts), loops 2 (4 pts), ternaries 1 (3 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 · crg_readonly._command_args (cognitive 31) · ×1
  • crg_readonly._command_args (cognitive 31) code_review_graph/assets/code-review-graph/scripts/crg_readonly.py:177 — crg_readonly._command_args has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WatchSupervisor.sync_watches (cognitive 31) · ×1
  • _WatchSupervisor.sync_watches (cognitive 31) code_review_graph/incremental.py:4289 — _WatchSupervisor.sync_watches has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (7 pts), boolean chains 2 (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 · NpmAliasResolver._aliases_for_file (cognitive 31) · ×1
  • NpmAliasResolver._aliases_for_file (cognitive 31) code_review_graph/npm_alias_resolver.py:128 — NpmAliasResolver._aliases_for_file has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (8 pts), boolean chains 3, error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._r_iter_args (cognitive 31) · ×1
  • CodeParser._r_iter_args (cognitive 31) code_review_graph/parser.py:24924 — CodeParser._r_iter_args has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 4 (11 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · skills._strip_jsonc (cognitive 31) · ×1
  • skills._strip_jsonc (cognitive 31) code_review_graph/skills.py:1119 — skills._strip_jsonc has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · review._risk_by_file (cognitive 31) · ×1
  • review._risk_by_file (cognitive 31) code_review_graph/tools/review.py:192 — review._risk_by_file has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 4 (6 pts), boolean chains 1, error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · visualization._export_seeded (cognitive 31) · ×1
  • visualization._export_seeded (cognitive 31) code_review_graph/visualization.py:360 — visualization._export_seeded has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4 (5 pts), boolean chains 3, 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 · communities._dedupe_community_names (cognitive 30) · ×1
  • communities._dedupe_community_names (cognitive 30) code_review_graph/communities.py:770 — communities._dedupe_community_names has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 5 (11 pts), boolean chains 2 (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 · WatchDaemon._start_watcher (cognitive 30) · ×1
  • WatchDaemon._start_watcher (cognitive 30) code_review_graph/daemon.py:1668 — WatchDaemon._start_watcher has cognitive complexity 30 (threshold 15). Drivers by points: error handling 7 (19 pts), if/else 6 (9 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doctor.resolve_mcp_entry (cognitive 30) · ×1
  • doctor.resolve_mcp_entry (cognitive 30) code_review_graph/doctor.py:384 — doctor.resolve_mcp_entry has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 6 (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 · incremental.get_staged_and_unstaged (cognitive 30) · ×1
  • incremental.get_staged_and_unstaged (cognitive 30) code_review_graph/incremental.py:1557 — incremental.get_staged_and_unstaged has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 2 (5 pts), boolean chains 3, error handling 1, 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 · incremental._walk_symlinked_dirs (cognitive 30) · ×1
  • incremental._walk_symlinked_dirs (cognitive 30) code_review_graph/incremental.py:2235 — incremental._walk_symlinked_dirs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · neighbourhood._select_within_budget (cognitive 30) · ×1
  • neighbourhood._select_within_budget (cognitive 30) code_review_graph/neighbourhood.py:411 — neighbourhood._select_within_budget has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._php_route_enclosing_groups (cognitive 30) · ×1
  • CodeParser._php_route_enclosing_groups (cognitive 30) code_review_graph/parser.py:18513 — CodeParser._php_route_enclosing_groups has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (20 pts), boolean chains 4, ternaries 1 (4 pts), loops 2 (nesting depth added 18). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · skills.install_git_sync_hooks (cognitive 30) · ×1
  • skills.install_git_sync_hooks (cognitive 30) code_review_graph/skills.py:2665 — skills.install_git_sync_hooks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · review._file_regions (cognitive 30) · ×1
  • review._file_regions (cognitive 30) code_review_graph/tools/review.py:272 — review._file_regions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 4, loops 2 (3 pts), 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 · SqliteReader.getImpactRadius (cognitive 30) · ×1
  • SqliteReader.getImpactRadius (cognitive 30) code-review-graph-vscode/src/backend/sqlite.ts:440 — SqliteReader.getImpactRadius has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 8 (14 pts), boolean chains 1, ternaries 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 · change_details._coupling (cognitive 29) · ×1
  • change_details._coupling (cognitive 29) code_review_graph/change_details.py:279 — change_details._coupling has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · enrich.extract_pattern (cognitive 29) · ×1
  • enrich.extract_pattern (cognitive 29) code_review_graph/enrich.py:33 — enrich.extract_pattern has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 2 (5 pts), loops 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 · GraphStore._receiver_backed_candidates (cognitive 29) · ×1
  • GraphStore._receiver_backed_candidates (cognitive 29) code_review_graph/graph.py:2969 — GraphStore._receiver_backed_candidates has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 7, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _PyRenameScan._collect_all (cognitive 29) · ×1
  • _PyRenameScan._collect_all (cognitive 29) code_review_graph/refactor.py:572 — _PyRenameScan._collect_all has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (9 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · query.traverse_graph_func (cognitive 29) · ×1
  • query.traverse_graph_func (cognitive 29) code_review_graph/tools/query.py:2322 — query.traverse_graph_func has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (5 pts), boolean chains 2, 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 · TsconfigResolver._strip_jsonc_comments (cognitive 29) · ×1
  • TsconfigResolver._strip_jsonc_comments (cognitive 29) code_review_graph/tsconfig_resolver.py:208 — TsconfigResolver._strip_jsonc_comments has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (10 pts), boolean chains 5 (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 · graph.bindToolbarEvents (cognitive 29) · ×1
  • graph.bindToolbarEvents (cognitive 29) code-review-graph-vscode/src/webview/graph.ts:824 — graph.bindToolbarEvents has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 3, loops 1 (nesting depth added 10). Most of this is not in the body itself: 10 of the 29 points are its own statements and the rest belongs to 6 function items inside it that branch (toggle, a function literal at line 854, a function literal at line 868, …). 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 · communities._reassign_test_nodes (cognitive 28) · ×1
  • communities._reassign_test_nodes (cognitive 28) code_review_graph/communities.py:271 — communities._reassign_test_nodes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (6 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doctor.check_hooks (cognitive 28) · ×1
  • doctor.check_hooks (cognitive 28) code_review_graph/doctor.py:724 — doctor.check_hooks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (4 pts), error handling 1 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore.__init__ (cognitive 28) · ×1
  • GraphStore.__init__ (cognitive 28) code_review_graph/graph.py:1009 — GraphStore.__init__ has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (18 pts), error handling 3 (5 pts), boolean chains 4, 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 · incremental._should_ignore (cognitive 28) · ×1
  • incremental._should_ignore (cognitive 28) code_review_graph/incremental.py:859 — incremental._should_ignore has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 3, ternaries 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 · MultiWorktreeRouter.get_child (cognitive 28) · ×1
  • MultiWorktreeRouter.get_child (cognitive 28) code_review_graph/multi_worktree.py:473 — MultiWorktreeRouter.get_child has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _PythonUnreachableCallVisitor._visit_function (cognitive 28) · ×1
  • _PythonUnreachableCallVisitor._visit_function (cognitive 28) code_review_graph/parser.py:435 — _PythonUnreachableCallVisitor._visit_function has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 5 (10 pts), boolean chains 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._plsql_is_forward_decl (cognitive 28) · ×1
  • CodeParser._plsql_is_forward_decl (cognitive 28) code_review_graph/parser.py:7208 — CodeParser._plsql_is_forward_decl has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 2 (6 pts), boolean chains 5, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._emit_spring_constructor_injection (cognitive 28) · ×1
  • CodeParser._emit_spring_constructor_injection (cognitive 28) code_review_graph/parser.py:15560 — CodeParser._emit_spring_constructor_injection has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (6 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._read_python_module_alias (cognitive 28) · ×1
  • CodeParser._read_python_module_alias (cognitive 28) code_review_graph/parser.py:20570 — CodeParser._read_python_module_alias has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 7, error handling 2, 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · visualization._aggregate_community (cognitive 28) · ×1
  • visualization._aggregate_community (cognitive 28) code_review_graph/visualization.py:571 — visualization._aggregate_community has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 10 (11 pts), 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 · GraphStore._settle_unbound_endpoints (cognitive 27) · ×1
  • GraphStore._settle_unbound_endpoints (cognitive 27) code_review_graph/graph.py:3403 — GraphStore._settle_unbound_endpoints has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 5 (8 pts), boolean chains 1, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · incremental._get_svn_changed_files (cognitive 27) · ×1
  • incremental._get_svn_changed_files (cognitive 27) code_review_graph/incremental.py:1475 — incremental._get_svn_changed_files has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), ternaries 1 (4 pts), error handling 2, boolean chains 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 · main.main (cognitive 27) · ×1
  • main.main (cognitive 27) code_review_graph/main.py:1624 — main.main has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 2, 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 · memory.list_memories (cognitive 27) · ×1
  • memory.list_memories (cognitive 27) code_review_graph/memory.py:77 — memory.list_memories has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (7 pts), error handling 1 (2 pts), boolean chains 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 · CodeParser._extract_html_scripts (cognitive 27) · ×1
  • CodeParser._extract_html_scripts (cognitive 27) code_review_graph/parser.py:5151 — CodeParser._extract_html_scripts has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 5 (7 pts), ternaries 1 (2 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_nix_constructs (cognitive 27) · ×1
  • CodeParser._extract_nix_constructs (cognitive 27) code_review_graph/parser.py:13048 — CodeParser._extract_nix_constructs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (6 pts), boolean chains 4, ternaries 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_zig_calls_in_subtree (cognitive 27) · ×1
  • CodeParser._extract_zig_calls_in_subtree (cognitive 27) code_review_graph/parser.py:14744 — CodeParser._extract_zig_calls_in_subtree has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 3 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._spring_mapping_methods (cognitive 27) · ×1
  • CodeParser._spring_mapping_methods (cognitive 27) code_review_graph/parser.py:15684 — CodeParser._spring_mapping_methods has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._python_static_truth (cognitive 27) · ×1
  • parser._python_static_truth (cognitive 27) code_review_graph/parser.py:316 — parser._python_static_truth has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 3 (8 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · refactor._js_rename_sites (cognitive 27) · ×1
  • refactor._js_rename_sites (cognitive 27) code_review_graph/refactor.py:1425 — refactor._js_rename_sites has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, ternaries 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 · daemon_cli._handle_stop (cognitive 26) · ×1
  • daemon_cli._handle_stop (cognitive 26) code_review_graph/daemon_cli.py:95 — daemon_cli._handle_stop has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (6 pts), error handling 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WatchSupervisor._replan_if_requested (cognitive 26) · ×1
  • _WatchSupervisor._replan_if_requested (cognitive 26) code_review_graph/incremental.py:4186 — _WatchSupervisor._replan_if_requested has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 5 (6 pts), boolean chains 5, 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 · incremental.watch (cognitive 26) · ×1
  • incremental.watch (cognitive 26) code_review_graph/incremental.py:5177 — incremental.watch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 pts), boolean chains 2, error handling 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jsonc.has_unclosed_comment (cognitive 26) · ×1
  • jsonc.has_unclosed_comment (cognitive 26) code_review_graph/jsonc.py:92 — jsonc.has_unclosed_comment has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._walk_hcl_expressions (cognitive 26) · ×1
  • CodeParser._walk_hcl_expressions (cognitive 26) code_review_graph/parser.py:13329 — CodeParser._walk_hcl_expressions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (3 pts), boolean chains 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._emit_kafka_edges_from_method (cognitive 26) · ×1
  • CodeParser._emit_kafka_edges_from_method (cognitive 26) code_review_graph/parser.py:16388 — CodeParser._emit_kafka_edges_from_method has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (10 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_ts_type_reference (cognitive 26) · ×1
  • CodeParser._extract_ts_type_reference (cognitive 26) code_review_graph/parser.py:19021 — CodeParser._extract_ts_type_reference has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._parse_rust_use_node (cognitive 26) · ×1
  • CodeParser._parse_rust_use_node (cognitive 26) code_review_graph/parser.py:19492 — CodeParser._parse_rust_use_node has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._resolve_rust_module_file (cognitive 26) · ×1
  • CodeParser._resolve_rust_module_file (cognitive 26) code_review_graph/parser.py:22415 — CodeParser._resolve_rust_module_file has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._hcl_dynamic_iterator_name (cognitive 26) · ×1
  • parser._hcl_dynamic_iterator_name (cognitive 26) code_review_graph/parser.py:3216 — parser._hcl_dynamic_iterator_name has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · refactor._apply_file_edits (cognitive 26) · ×1
  • refactor._apply_file_edits (cognitive 26) code_review_graph/refactor.py:2504 — refactor._apply_file_edits has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build.run_postprocess (cognitive 26) · ×1
  • build.run_postprocess (cognitive 26) code_review_graph/tools/build.py:865 — build.run_postprocess has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 5 (8 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 · cli._match_files_to_forget (cognitive 25) · ×1
  • cli._match_files_to_forget (cognitive 25) code_review_graph/cli.py:312 — cli._match_files_to_forget has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · communities._detect_leiden (cognitive 25) · ×1
  • communities._detect_leiden (cognitive 25) code_review_graph/communities.py:390 — communities._detect_leiden has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 5 (6 pts), ternaries 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 · event_resolver.resolve_spring_events (cognitive 25) · ×1
  • event_resolver.resolve_spring_events (cognitive 25) code_review_graph/event_resolver.py:46 — event_resolver.resolve_spring_events has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 5 (8 pts), boolean chains 4, ternaries 2 (3 pts), error handling 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 · CodeParser._apply_typed_call_targets (cognitive 25) · ×1
  • CodeParser._apply_typed_call_targets (cognitive 25) code_review_graph/parser.py:9100 — CodeParser._apply_typed_call_targets has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._read_go_mod (cognitive 25) · ×1
  • parser._read_go_mod (cognitive 25) code_review_graph/parser.py:1020 — parser._read_go_mod has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._scan_rescript_modules (cognitive 25) · ×1
  • parser._scan_rescript_modules (cognitive 25) code_review_graph/parser.py:2434 — parser._scan_rescript_modules has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._csharp_namespace_context (cognitive 25) · ×1
  • parser._csharp_namespace_context (cognitive 25) code_review_graph/parser.py:3017 — parser._csharp_namespace_context has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._html_first_heading (cognitive 25) · ×1
  • parser._html_first_heading (cognitive 25) code_review_graph/parser.py:3515 — parser._html_first_heading has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · _common._resolve_graph_file_paths_with_unmatched (cognitive 25) · ×1
  • _common._resolve_graph_file_paths_with_unmatched (cognitive 25) code_review_graph/tools/_common.py:284 — _common._resolve_graph_file_paths_with_unmatched has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (10 pts), error handling 1 (3 pts), boolean chains 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 · context.get_minimal_context (cognitive 25) · ×1
  • context.get_minimal_context (cognitive 25) code_review_graph/tools/context.py:33 — context.get_minimal_context has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12, error handling 4 (5 pts), boolean chains 4, 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, 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 · query.semantic_search_nodes (cognitive 25) · ×1
  • query.semantic_search_nodes (cognitive 25) code_review_graph/tools/query.py:1980 — query.semantic_search_nodes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 7 (9 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workspace_resolver._exports_targets (cognitive 25) · ×1
  • workspace_resolver._exports_targets (cognitive 25) code_review_graph/workspace_resolver.py:551 — workspace_resolver._exports_targets has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · changes._parse_unified_diff (cognitive 24) · ×1
  • changes._parse_unified_diff (cognitive 24) code_review_graph/changes.py:472 — changes._parse_unified_diff has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore._settle_collision_endpoints (cognitive 24) · ×1
  • GraphStore._settle_collision_endpoints (cognitive 24) code_review_graph/graph.py:1580 — GraphStore._settle_collision_endpoints has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (9 pts), boolean chains 1, 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 · graph._ordered_pairs (cognitive 24) · ×1
  • graph._ordered_pairs (cognitive 24) code_review_graph/graph.py:155 — graph._ordered_pairs has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 6 (10 pts), ternaries 2, 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 · http_origin_guard.split_host_port (cognitive 24) · ×1
  • http_origin_guard.split_host_port (cognitive 24) code_review_graph/http_origin_guard.py:68 — http_origin_guard.split_host_port has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), error handling 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 · CodeParser._lua_get_require_target (cognitive 24) · ×1
  • CodeParser._lua_get_require_target (cognitive 24) code_review_graph/parser.py:14392 — CodeParser._lua_get_require_target has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (9 pts), boolean chains 1, ternaries 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._php_endpoint_handler (cognitive 24) · ×1
  • CodeParser._php_endpoint_handler (cognitive 24) code_review_graph/parser.py:18541 — CodeParser._php_endpoint_handler has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · refactor._js_declaration_scope (cognitive 24) · ×1
  • refactor._js_declaration_scope (cognitive 24) code_review_graph/refactor.py:1033 — refactor._js_declaration_scope has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills.install_git_hook (cognitive 24) · ×1
  • skills.install_git_hook (cognitive 24) code_review_graph/skills.py:2476 — skills.install_git_hook has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, error handling 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 · review._generate_review_guidance (cognitive 24) · ×1
  • review._generate_review_guidance (cognitive 24) code_review_graph/tools/review.py:769 — review._generate_review_guidance has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), error handling 1 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TsconfigResolver._resolve_extends (cognitive 24) · ×1
  • TsconfigResolver._resolve_extends (cognitive 24) code_review_graph/tsconfig_resolver.py:140 — TsconfigResolver._resolve_extends has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (3 pts), boolean chains 2, error handling 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 · workspace_resolver._declared_names (cognitive 24) · ×1
  • workspace_resolver._declared_names (cognitive 24) code_review_graph/workspace_resolver.py:509 — workspace_resolver._declared_names has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graph.buildGraph (cognitive 24) · ×1
  • graph.buildGraph (cognitive 24) code-review-graph-vscode/src/webview/graph.ts:384 — graph.buildGraph has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (8 pts), ternaries 2 (5 pts) (nesting depth added 5). Of this number, 13 points are the body's own statements and 11 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 · changes._removed_flow_criticalities (cognitive 23) · ×1
  • changes._removed_flow_criticalities (cognitive 23) code_review_graph/changes.py:1032 — changes._removed_flow_criticalities has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 6 (9 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex_skill.install_codex_skill (cognitive 23) · ×1
  • codex_skill.install_codex_skill (cognitive 23) code_review_graph/codex_skill.py:136 — codex_skill.install_codex_skill has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · communities._detect_file_based (cognitive 23) · ×1
  • communities._detect_file_based (cognitive 23) code_review_graph/communities.py:513 — communities._detect_file_based has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (6 pts), 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 · GraphStore._impact_seed_qns (cognitive 23) · ×1
  • GraphStore._impact_seed_qns (cognitive 23) code_review_graph/graph.py:4447 — GraphStore._impact_seed_qns has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (13 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore._build_networkx_graph (cognitive 23) · ×1
  • GraphStore._build_networkx_graph (cognitive 23) code_review_graph/graph.py:5740 — GraphStore._build_networkx_graph has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install_gitignore.apply (cognitive 23) · ×1
  • install_gitignore.apply (cognitive 23) code_review_graph/install_gitignore.py:369 — install_gitignore.apply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, error handling 3 (4 pts), ternaries 3 (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, 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 · CodeParser._add_xslt_apply (cognitive 23) · ×1
  • CodeParser._add_xslt_apply (cognitive 23) code_review_graph/parser.py:5506 — CodeParser._add_xslt_apply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 4 (6 pts), boolean chains 4, 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._get_java_method_and_receiver (cognitive 23) · ×1
  • CodeParser._get_java_method_and_receiver (cognitive 23) code_review_graph/parser.py:18844 — CodeParser._get_java_method_and_receiver has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, 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 file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._resolve_php_composer_module (cognitive 23) · ×1
  • CodeParser._resolve_php_composer_module (cognitive 23) code_review_graph/parser.py:22490 — CodeParser._resolve_php_composer_module has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · _RouteGraph._guessed_hops (cognitive 23) · ×1
  • _RouteGraph._guessed_hops (cognitive 23) code_review_graph/tools/query.py:477 — _RouteGraph._guessed_hops has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 3 (8 pts), loops 2 (4 pts), boolean chains 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 · uninstall._remove_yaml_entry (cognitive 23) · ×1
  • uninstall._remove_yaml_entry (cognitive 23) code_review_graph/uninstall.py:379 — uninstall._remove_yaml_entry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6, error handling 2, loops 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · doctor._settings_hook_events (cognitive 22) · ×1
  • doctor._settings_hook_events (cognitive 22) code_review_graph/doctor.py:659 — doctor._settings_hook_events has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts), ternaries 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hints._track_result (cognitive 22) · ×1
  • hints._track_result (cognitive 22) code_review_graph/hints.py:285 — hints._track_result has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (5 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 · incremental._usable_review_base (cognitive 22) · ×1
  • incremental._usable_review_base (cognitive 22) code_review_graph/incremental.py:1717 — incremental._usable_review_base has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · incremental.files_hold_commits (cognitive 22) · ×1
  • incremental.files_hold_commits (cognitive 22) code_review_graph/incremental.py:1864 — incremental.files_hold_commits has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 2 (4 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 · incremental._reconcile_stale_files (cognitive 22) · ×1
  • incremental._reconcile_stale_files (cognitive 22) code_review_graph/incremental.py:2671 — incremental._reconcile_stale_files has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, error handling 1 (3 pts), 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 · CodeParser._js_wrapped_function (cognitive 22) · ×1
  • CodeParser._js_wrapped_function (cognitive 22) code_review_graph/parser.py:14861 — CodeParser._js_wrapped_function has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8, loops 1, ternaries 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._preceding_doc_comment (cognitive 22) · ×1
  • CodeParser._preceding_doc_comment (cognitive 22) code_review_graph/parser.py:16501 — CodeParser._preceding_doc_comment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3, boolean chains 2, 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · uninstall._remove_mcp_entry (cognitive 22) · ×1
  • uninstall._remove_mcp_entry (cognitive 22) code_review_graph/uninstall.py:219 — uninstall._remove_mcp_entry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · visualization._aggregate_file (cognitive 22) · ×1
  • visualization._aggregate_file (cognitive 22) code_review_graph/visualization.py:685 — visualization._aggregate_file has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (6 pts), loops 4, 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 · workspace_resolver._target_candidates (cognitive 22) · ×1
  • workspace_resolver._target_candidates (cognitive 22) code_review_graph/workspace_resolver.py:605 — workspace_resolver._target_candidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, 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 · navigation.registerNavigationCommands (cognitive 22) · ×1
  • navigation.registerNavigationCommands (cognitive 22) code-review-graph-vscode/src/features/navigation.ts:8 — navigation.registerNavigationCommands has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (15 pts), loops 4 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 22 points belong to 4 function literals inside it that branch (lines 75, 16, 153, …). 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 · runner.run_eval (cognitive 21) · ×1
  • runner.run_eval (cognitive 21) code_review_graph/eval/runner.py:268 — runner.run_eval has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (5 pts), loops 3 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · incremental._svn_revision_info (cognitive 21) · ×1
  • incremental._svn_revision_info (cognitive 21) code_review_graph/incremental.py:1074 — incremental._svn_revision_info has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (6 pts), boolean chains 1, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · incremental.get_changed_files (cognitive 21) · ×1
  • incremental.get_changed_files (cognitive 21) code_review_graph/incremental.py:1323 — incremental.get_changed_files has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, ternaries 1 (2 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.
D2 · Cognitive Complexity · _Child.stop (cognitive 21) · ×1
  • _Child.stop (cognitive 21) code_review_graph/multi_worktree.py:333 — _Child.stop has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 5 (10 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 · neighbourhood.extract (cognitive 21) · ×1
  • neighbourhood.extract (cognitive 21) code_review_graph/neighbourhood.py:535 — neighbourhood.extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, loops 3, ternaries 2 (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 · CodeParser._extract_hcl_constructs (cognitive 21) · ×1
  • CodeParser._extract_hcl_constructs (cognitive 21) code_review_graph/parser.py:13192 — CodeParser._extract_hcl_constructs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 2 (4 pts), boolean chains 3 (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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._spring_config_annotation_values (cognitive 21) · ×1
  • CodeParser._spring_config_annotation_values (cognitive 21) code_review_graph/parser.py:15340 — CodeParser._spring_config_annotation_values has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (3 pts), boolean chains 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._spring_mapping_paths (cognitive 21) · ×1
  • CodeParser._spring_mapping_paths (cognitive 21) code_review_graph/parser.py:15665 — CodeParser._spring_mapping_paths has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (3 pts), boolean chains 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._emit_spring_endpoint_nodes (cognitive 21) · ×1
  • CodeParser._emit_spring_endpoint_nodes (cognitive 21) code_review_graph/parser.py:15716 — CodeParser._emit_spring_endpoint_nodes has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (6 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._collect_js_exported_local_names (cognitive 21) · ×1
  • CodeParser._collect_js_exported_local_names (cognitive 21) code_review_graph/parser.py:20904 — CodeParser._collect_js_exported_local_names has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (9 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._csharp_namespaces (cognitive 21) · ×1
  • parser._csharp_namespaces (cognitive 21) code_review_graph/parser.py:3062 — parser._csharp_namespaces has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (11 pts), ternaries 1 (6 pts), loops 2 (4 pts) (nesting depth added 15). 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · analysis.find_knowledge_gaps (cognitive 20) · ×1
  • analysis.find_knowledge_gaps (cognitive 20) code_review_graph/analysis.py:247 — analysis.find_knowledge_gaps has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 6, 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 · embeddings._node_to_text (cognitive 20) · ×1
  • embeddings._node_to_text (cognitive 20) REDACTED:1136 — embeddings._node_to_text has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, ternaries 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 · GraphStore._class_backed_candidates (cognitive 20) · ×1
  • GraphStore._class_backed_candidates (cognitive 20) code_review_graph/graph.py:3035 — GraphStore._class_backed_candidates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, 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 · InheritanceIndex._only_declaration (cognitive 20) · ×1
  • InheritanceIndex._only_declaration (cognitive 20) code_review_graph/inheritance.py:312 — InheritanceIndex._only_declaration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (6 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 · CodeParser._resolve_typed_method_target (cognitive 20) · ×1
  • CodeParser._resolve_typed_method_target (cognitive 20) code_review_graph/parser.py:9046 — CodeParser._resolve_typed_method_target has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._strip_vbnet_noise (cognitive 20) · ×1
  • parser._strip_vbnet_noise (cognitive 20) code_review_graph/parser.py:2109 — parser._strip_vbnet_noise has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._html_attributes (cognitive 20) · ×1
  • parser._html_attributes (cognitive 20) code_review_graph/parser.py:3476 — parser._html_attributes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (7 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · scoped_resolver._scope_and_method (cognitive 20) · ×1
  • scoped_resolver._scope_and_method (cognitive 20) code_review_graph/scoped_resolver.py:191 — scoped_resolver._scope_and_method has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 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 · review._allocate_regions (cognitive 20) · ×1
  • review._allocate_regions (cognitive 20) code_review_graph/tools/review.py:354 — review._allocate_regions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 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 · TsconfigResolver._load_tsconfig_for_file (cognitive 20) · ×1
  • TsconfigResolver._load_tsconfig_for_file (cognitive 20) code_review_graph/tsconfig_resolver.py:103 — TsconfigResolver._load_tsconfig_for_file has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 3 (7 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · analysis.find_import_cycles (cognitive 19) · ×1
  • analysis.find_import_cycles (cognitive 19) code_review_graph/analysis.py:148 — analysis.find_import_cycles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2, ternaries 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · communities._compute_cohesion_batch (cognitive 19) · ×1
  • communities._compute_cohesion_batch (cognitive 19) code_review_graph/communities.py:197 — communities._compute_cohesion_batch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jedi_resolver._walk_calls (cognitive 19) · ×1
  • jedi_resolver._walk_calls (cognitive 19) code_review_graph/jedi_resolver.py:320 — jedi_resolver._walk_calls has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (7 pts), boolean chains 2, 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 · jsonc.removal_ranges (cognitive 19) · ×1
  • jsonc.removal_ranges (cognitive 19) code_review_graph/jsonc.py:276 — jsonc.removal_ranges has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._extract_plsql_calls (cognitive 19) · ×1
  • CodeParser._extract_plsql_calls (cognitive 19) code_review_graph/parser.py:7874 — CodeParser._extract_plsql_calls has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._elixir_function_name_and_params (cognitive 19) · ×1
  • CodeParser._elixir_function_name_and_params (cognitive 19) code_review_graph/parser.py:12639 — CodeParser._elixir_function_name_and_params has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._java_annotation_attributes (cognitive 19) · ×1
  • CodeParser._java_annotation_attributes (cognitive 19) code_review_graph/parser.py:15632 — CodeParser._java_annotation_attributes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_imports (cognitive 19) · ×1
  • CodeParser._extract_imports (cognitive 19) code_review_graph/parser.py:17175 — CodeParser._extract_imports has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (4 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._collect_js_require_names (cognitive 19) · ×1
  • CodeParser._collect_js_require_names (cognitive 19) code_review_graph/parser.py:21015 — CodeParser._collect_js_require_names has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._xml_attributes (cognitive 19) · ×1
  • parser._xml_attributes (cognitive 19) code_review_graph/parser.py:3568 — parser._xml_attributes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · skills._yaml_section_bounds (cognitive 19) · ×1
  • skills._yaml_section_bounds (cognitive 19) code_review_graph/skills.py:863 — skills._yaml_section_bounds has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, 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 · skills._write_merged_settings (cognitive 19) · ×1
  • skills._write_merged_settings (cognitive 19) code_review_graph/skills.py:3191 — skills._write_merged_settings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _common.graph_provenance (cognitive 19) · ×1
  • _common.graph_provenance (cognitive 19) code_review_graph/tools/_common.py:60 — _common.graph_provenance has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wiki.generate_wiki (cognitive 19) · ×1
  • wiki.generate_wiki (cognitive 19) code_review_graph/wiki.py:204 — wiki.generate_wiki has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cli._report_gitignore_block (cognitive 18) · ×1
  • cli._report_gitignore_block (cognitive 18) code_review_graph/cli.py:420 — cli._report_gitignore_block has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (7 pts), 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 · cli._handle_forget (cognitive 18) · ×1
  • cli._handle_forget (cognitive 18) code_review_graph/cli.py:1492 — cli._handle_forget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (3 pts), error handling 1 (2 pts), 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 · WatchDaemon.reconcile (cognitive 18) · ×1
  • WatchDaemon.reconcile (cognitive 18) code_review_graph/daemon.py:1263 — WatchDaemon.reconcile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (7 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 · flows.compute_criticality (cognitive 18) · ×1
  • flows.compute_criticality (cognitive 18) code_review_graph/flows.py:670 — flows.compute_criticality has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore._resolve_edge_identities (cognitive 18) · ×1
  • GraphStore._resolve_edge_identities (cognitive 18) code_review_graph/graph.py:1533 — GraphStore._resolve_edge_identities has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore._align_edge_with_collisions (cognitive 18) · ×1
  • GraphStore._align_edge_with_collisions (cognitive 18) code_review_graph/graph.py:2024 — GraphStore._align_edge_with_collisions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore.get_impact_radius_sql (cognitive 18) · ×1
  • GraphStore.get_impact_radius_sql (cognitive 18) code_review_graph/graph.py:4663 — GraphStore.get_impact_radius_sql has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4, 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 · NpmAliasResolver._local_package_roots (cognitive 18) · ×1
  • NpmAliasResolver._local_package_roots (cognitive 18) code_review_graph/npm_alias_resolver.py:178 — NpmAliasResolver._local_package_roots has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · npm_alias_resolver._set_matches (cognitive 18) · ×1
  • npm_alias_resolver._set_matches (cognitive 18) code_review_graph/npm_alias_resolver.py:426 — npm_alias_resolver._set_matches has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, 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 · CodeParser._has_cpp_header_evidence (cognitive 18) · ×1
  • CodeParser._has_cpp_header_evidence (cognitive 18) code_review_graph/parser.py:4402 — CodeParser._has_cpp_header_evidence has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._xslt_template (cognitive 18) · ×1
  • CodeParser._xslt_template (cognitive 18) code_review_graph/parser.py:5402 — CodeParser._xslt_template has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_sql_ddl (cognitive 18) · ×1
  • CodeParser._extract_sql_ddl (cognitive 18) code_review_graph/parser.py:7960 — CodeParser._extract_sql_ddl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._python_module_class_identities (cognitive 18) · ×1
  • CodeParser._python_module_class_identities (cognitive 18) code_review_graph/parser.py:9770 — CodeParser._python_module_class_identities has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, loops 3 (4 pts), error handling 2 (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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._resolve_java_method_reference_target (cognitive 18) · ×1
  • CodeParser._resolve_java_method_reference_target (cognitive 18) code_review_graph/parser.py:15838 — CodeParser._resolve_java_method_reference_target has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._js_static_module_target (cognitive 18) · ×1
  • CodeParser._js_static_module_target (cognitive 18) code_review_graph/parser.py:20920 — CodeParser._js_static_module_target has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._get_base_call_name (cognitive 18) · ×1
  • CodeParser._get_base_call_name (cognitive 18) code_review_graph/parser.py:24873 — CodeParser._get_base_call_name has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · _JsScan.visit_reexport (cognitive 18) · ×1
  • _JsScan.visit_reexport (cognitive 18) code_review_graph/refactor.py:1365 — _JsScan.visit_reexport has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills._splice_merged_settings (cognitive 18) · ×1
  • skills._splice_merged_settings (cognitive 18) code_review_graph/skills.py:3150 — skills._splice_merged_settings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 2, ternaries 1 (2 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.
D2 · Cognitive Complexity · docs.get_docs_section (cognitive 18) · ×1
  • docs.get_docs_section (cognitive 18) code_review_graph/tools/docs.py:144 — docs.get_docs_section has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 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 · ScmDecorationProvider.update (cognitive 18) · ×1
  • ScmDecorationProvider.update (cognitive 18) code-review-graph-vscode/src/features/scmDecorations.ts:31 — ScmDecorationProvider.update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), error handling 2, boolean chains 1 (nesting depth added 8). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch 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._apply_steering_choice (cognitive 17) · ×1
  • cli._apply_steering_choice (cognitive 17) code_review_graph/cli.py:378 — cli._apply_steering_choice has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context_savings.format_context_savings_panel (cognitive 17) · ×1
  • context_savings.format_context_savings_panel (cognitive 17) code_review_graph/context_savings.py:231 — context_savings.format_context_savings_panel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · incremental.get_data_dir (cognitive 17) · ×1
  • incremental.get_data_dir (cognitive 17) code_review_graph/incremental.py:675 — incremental.get_data_dir has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 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 · jsonc.has_comments (cognitive 17) · ×1
  • jsonc.has_comments (cognitive 17) code_review_graph/jsonc.py:69 — jsonc.has_comments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 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 · jsonc.object_members (cognitive 17) · ×1
  • jsonc.object_members (cognitive 17) code_review_graph/jsonc.py:208 — jsonc.object_members has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, 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 · CodeParser._detect_language_from_shebang (cognitive 17) · ×1
  • CodeParser._detect_language_from_shebang (cognitive 17) code_review_graph/parser.py:4022 — CodeParser._detect_language_from_shebang has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._base_type_name (cognitive 17) · ×1
  • CodeParser._base_type_name (cognitive 17) code_review_graph/parser.py:9016 — CodeParser._base_type_name has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._python_binding_evidence (cognitive 17) · ×1
  • CodeParser._python_binding_evidence (cognitive 17) code_review_graph/parser.py:10096 — CodeParser._python_binding_evidence 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._python_from_import_bindings (cognitive 17) · ×1
  • CodeParser._python_from_import_bindings (cognitive 17) code_review_graph/parser.py:10491 — CodeParser._python_from_import_bindings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 2, 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._resolve_ansible_notify_targets (cognitive 17) · ×1
  • CodeParser._resolve_ansible_notify_targets (cognitive 17) code_review_graph/parser.py:11931 — CodeParser._resolve_ansible_notify_targets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (4 pts), boolean chains 3, 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._julia_string_arg (cognitive 17) · ×1
  • CodeParser._julia_string_arg (cognitive 17) code_review_graph/parser.py:13742 — CodeParser._julia_string_arg has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 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. This shape REPEATS in the file: one other method here (CodeParser._get_java_annotations) 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._extract_js_member_functions (cognitive 17) · ×1
  • CodeParser._extract_js_member_functions (cognitive 17) code_review_graph/parser.py:15161 — CodeParser._extract_js_member_functions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 2, loops 1 (2 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._get_java_annotations (cognitive 17) · ×1
  • CodeParser._get_java_annotations (cognitive 17) code_review_graph/parser.py:15304 — CodeParser._get_java_annotations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 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. This shape REPEATS in the file: one other method here (CodeParser._julia_string_arg) 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._index_ambiguous_method_scopes (cognitive 17) · ×1
  • CodeParser._index_ambiguous_method_scopes (cognitive 17) code_review_graph/parser.py:16821 — CodeParser._index_ambiguous_method_scopes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 1 (4 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · parser._is_in_rust_dead_guard (cognitive 17) · ×1
  • parser._is_in_rust_dead_guard (cognitive 17) code_review_graph/parser.py:701 — parser._is_in_rust_dead_guard has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · _PyRenameScan.run (cognitive 17) · ×1
  • _PyRenameScan.run (cognitive 17) code_review_graph/refactor.py:479 — _PyRenameScan.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _PyRenameScan._visit_import (cognitive 17) · ×1
  • _PyRenameScan._visit_import (cognitive 17) code_review_graph/refactor.py:784 — _PyRenameScan._visit_import has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills._yaml_child_bounds (cognitive 17) · ×1
  • skills._yaml_child_bounds (cognitive 17) code_review_graph/skills.py:904 — skills._yaml_child_bounds has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 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 · _RouteGraph.hops_from (cognitive 17) · ×1
  • _RouteGraph.hops_from (cognitive 17) code_review_graph/tools/query.py:503 — _RouteGraph.hops_from has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uninstall._safe_path (cognitive 17) · ×1
  • uninstall._safe_path (cognitive 17) code_review_graph/uninstall.py:78 — uninstall._safe_path has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (3 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 · uninstall._process_repo_files (cognitive 17) · ×1
  • uninstall._process_repo_files (cognitive 17) code_review_graph/uninstall.py:1441 — uninstall._process_repo_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 6 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uninstall._registry_repo_paths (cognitive 17) · ×1
  • uninstall._registry_repo_paths (cognitive 17) code_review_graph/uninstall.py:1660 — uninstall._registry_repo_paths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (5 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · workspace_resolver._workspace_patterns (cognitive 17) · ×1
  • workspace_resolver._workspace_patterns (cognitive 17) code_review_graph/workspace_resolver.py:372 — workspace_resolver._workspace_patterns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (4 pts), error handling 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workspace_resolver._expand_patterns (cognitive 17) · ×1
  • workspace_resolver._expand_patterns (cognitive 17) code_review_graph/workspace_resolver.py:443 — workspace_resolver._expand_patterns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cli._handle_context_history (cognitive 16) · ×1
  • cli._handle_context_history (cognitive 16) code_review_graph/cli.py:1065 — cli._handle_context_history has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · communities.get_architecture_overview (cognitive 16) · ×1
  • communities.get_architecture_overview (cognitive 16) code_review_graph/communities.py:1203 — communities.get_architecture_overview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doctor.copies_on_path (cognitive 16) · ×1
  • doctor.copies_on_path (cognitive 16) code_review_graph/doctor.py:204 — doctor.copies_on_path has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), error handling 1 (3 pts), loops 2 (3 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 · graph._index_tokens (cognitive 16) · ×1
  • graph._index_tokens (cognitive 16) code_review_graph/graph.py:242 — graph._index_tokens has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WatchSupervisor.check_liveness (cognitive 16) · ×1
  • _WatchSupervisor.check_liveness (cognitive 16) code_review_graph/incremental.py:4542 — _WatchSupervisor.check_liveness has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 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 · MultiWorktreeRouter.child_message (cognitive 16) · ×1
  • MultiWorktreeRouter.child_message (cognitive 16) code_review_graph/multi_worktree.py:410 — MultiWorktreeRouter.child_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · neighbourhood.resolve_seeds (cognitive 16) · ×1
  • neighbourhood.resolve_seeds (cognitive 16) code_review_graph/neighbourhood.py:484 — neighbourhood.resolve_seeds has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeParser._liquid_statements (cognitive 16) · ×1
  • CodeParser._liquid_statements (cognitive 16) code_review_graph/parser.py:4604 — CodeParser._liquid_statements has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (7 pts), if/else 2 (5 pts), loops 2 (3 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._parse_liquid (cognitive 16) · ×1
  • CodeParser._parse_liquid (cognitive 16) code_review_graph/parser.py:4655 — CodeParser._parse_liquid has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._apply_python_receiver_evidence (cognitive 16) · ×1
  • CodeParser._apply_python_receiver_evidence (cognitive 16) code_review_graph/parser.py:10577 — CodeParser._apply_python_receiver_evidence has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (5 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._julia_short_func_name (cognitive 16) · ×1
  • CodeParser._julia_short_func_name (cognitive 16) code_review_graph/parser.py:13722 — CodeParser._julia_short_func_name has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._python_module_search (cognitive 16) · ×1
  • CodeParser._python_module_search (cognitive 16) code_review_graph/parser.py:20788 — CodeParser._python_module_search has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._ruby_load_path_additions (cognitive 16) · ×1
  • CodeParser._ruby_load_path_additions (cognitive 16) code_review_graph/parser.py:21921 — CodeParser._ruby_load_path_additions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (4 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._rust_dependency_specs (cognitive 16) · ×1
  • CodeParser._rust_dependency_specs (cognitive 16) code_review_graph/parser.py:22226 — CodeParser._rust_dependency_specs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CodeParser._cpp_function_identity (cognitive 16) · ×1
  • CodeParser._cpp_function_identity (cognitive 16) code_review_graph/parser.py:23547 — CodeParser._cpp_function_identity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 134 of the 344 methods over the threshold — including the worst — and 4603 of the 9399 points over it (49%), 7.3× the next-largest file (code_review_graph/graph.py at 629). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · skills._is_generated_hook_script (cognitive 16) · ×1
  • skills._is_generated_hook_script (cognitive 16) code_review_graph/skills.py:2922 — skills._is_generated_hook_script has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · community_tools.get_community_func (cognitive 16) · ×1
  • community_tools.get_community_func (cognitive 16) code_review_graph/tools/community_tools.py:126 — community_tools.get_community_func has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 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 · registry_tools.cross_repo_search_func (cognitive 16) · ×1
  • registry_tools.cross_repo_search_func (cognitive 16) code_review_graph/tools/registry_tools.py:126 — registry_tools.cross_repo_search_func has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 2 (3 pts), loops 2 (3 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 · graph.setData (cognitive 16) · ×1
  • graph.setData (cognitive 16) code-review-graph-vscode/src/webview/graph.ts:230 — graph.setData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · MethodTooLong · ×1
  • MethodTooLong: GraphWebviewPanel.getHtmlContent code-review-graph-vscode/src/views/graphWebview.ts:290 — MethodTooLong — getHtmlContent runs 259 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 159 over it, 2.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: GraphWebviewPanel code-review-graph-vscode/src/views/graphWebview.ts:14 — ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 31 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (74 shared lines) · ×1
  • Near-duplicate member pair (74 shared lines) code_review_graph/spring_resolver.py:31 — code_review_graph/spring_resolver.py:31-279 | code_review_graph/temporal_resolver.py:32-213 — These two members are variants of one another: 74 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) code_review_graph/graph.py:5256 — code_review_graph/graph.py:5256-5273 | code_review_graph/graph.py:5358-5373 | code_review_graph/graph.py:5378-5394 | code_review_graph/graph.py:5488-5501 | code_review_graph/graph.py:5506-5519 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) code_review_graph/graph.py:5590 — code_review_graph/graph.py:5590-5601 | code_review_graph/graph.py:5604-5616 | code_review_graph/graph.py:5639-5653 | code_review_graph/graph.py:5683-5696 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (124 corresponding lines) · ×1
  • Edited copy of a member (124 corresponding lines) REDACTED:452 — REDACTED:452-608 | REDACTED:687-810 — These two members are one piece of code written twice and then edited apart: 124 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (108 corresponding lines) · ×1
  • Edited copy of a member (108 corresponding lines) code_review_graph/parser.py:4743 — code_review_graph/parser.py:4743-4850 | code_review_graph/parser.py:4855-4981 — These two members are one piece of code written twice and then edited apart: 108 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 49+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 49+ corresponding lines) code_review_graph/parser.py:14328 — code_review_graph/parser.py:14328-14389 | code_review_graph/parser.py:15111-15159 | code_review_graph/parser.py:15175-15271 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 49 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) code_review_graph/graph.py:4331 — code_review_graph/graph.py:4331-4377 | code_review_graph/graph.py:4380-4415 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) code_review_graph/parser.py:14508 — code_review_graph/parser.py:14508-14548 | code_review_graph/parser.py:14680-14723 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 29+ corresponding lines) code_review_graph/parser.py:9740 — code_review_graph/parser.py:9740-9768 | code_review_graph/parser.py:10387-10419 | code_review_graph/parser.py:20169-20206 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) code_review_graph/parser.py:25094 — code_review_graph/parser.py:25094-25125 | code_review_graph/parser.py:25134-25166 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) code_review_graph/changes.py:138 — code_review_graph/changes.py:138-175 | code_review_graph/changes.py:242-279 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) code_review_graph/skills.py:3244 — code_review_graph/skills.py:3244-3271 | code_review_graph/skills.py:3330-3361 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) code_review_graph/postprocessing.py:208 — code_review_graph/postprocessing.py:208-232 | code_review_graph/tools/build.py:126-147 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) code_review_graph/graph.py:5529 — code_review_graph/graph.py:5529-5551 | code_review_graph/graph.py:5554-5574 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) code_review_graph/forget.py:40 — code_review_graph/forget.py:40-61 | code_review_graph/graph.py:2716-2732 | code_review_graph/graph.py:5230-5241 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) code_review_graph/communities.py:963 — code_review_graph/communities.py:963-991 | code_review_graph/flows.py:307-339 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×1
  • Edited copy of a member (7 corresponding lines) diagrams/generate_diagrams.py:75 — diagrams/generate_diagrams.py:75-81 | diagrams/generate_diagrams.py:84-90 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) code_review_graph/incremental.py:179 — code_review_graph/incremental.py:179-192 | code_review_graph/incremental.py:211-227 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×1
  • Edited copy of a member (9 corresponding lines) code_review_graph/parser.py:15330 — code_review_graph/parser.py:15330-15338 | code_review_graph/parser.py:15654-15663 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 43+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 43+ corresponding lines) code_review_graph/tools/analysis_tools.py:45 — code_review_graph/tools/analysis_tools.py:45-87 | code_review_graph/tools/analysis_tools.py:95-137 | code_review_graph/tools/analysis_tools.py:206-249 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 10+ corresponding lines) code_review_graph/postprocessing.py:147 — code_review_graph/postprocessing.py:147-163 | code_review_graph/postprocessing.py:171-180 | code_review_graph/postprocessing.py:188-197 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (63–85 lines × 2) · ×1
  • Duplicated block (63–85 lines × 2) REDACTED:485 — REDACTED:485-569 | REDACTED:720-782 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:719` calls `_wait_for_rate_limit_slot` and `REDACTED:484` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (44–45 lines × 2) · ×1
  • Duplicated block (44–45 lines × 2) code_review_graph/parser.py:4793 — code_review_graph/parser.py:4793-4837 | code_review_graph/parser.py:4921-4964 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:4921` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) code_review_graph/parser.py:4744 — code_review_graph/parser.py:4744-4784 | code_review_graph/parser.py:4867-4907 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:4867` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (25–33 lines × 2) · ×1
  • Duplicated block (25–33 lines × 2) REDACTED:576 — REDACTED:576-608 | REDACTED:786-810 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) code_review_graph/graph.py:4870 — code_review_graph/graph.py:4870-4902 | code_review_graph/graph.py:4994-5026 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) code_review_graph/flows.py:768 — code_review_graph/flows.py:768-798 | code_review_graph/flows.py:954-984 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `code_review_graph/flows.py:800` calls `execute` and `code_review_graph/flows.py:985` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (28–31 lines × 2) · ×1
  • Duplicated block (28–31 lines × 2) code_review_graph/spring_resolver.py:182 — code_review_graph/spring_resolver.py:182-212 | code_review_graph/temporal_resolver.py:149-176 — before extracting anything, compare `code_review_graph/spring_resolver.py` and `code_review_graph/temporal_resolver.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (27–29 lines × 2) · ×1
  • Duplicated block (27–29 lines × 2) code_review_graph/parser.py:16225 — code_review_graph/parser.py:16225-16251 | code_review_graph/parser.py:16313-16341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22–27 lines × 2) · ×1
  • Duplicated block (22–27 lines × 2) code_review_graph/cli.py:1918 — code_review_graph/cli.py:1918-1939 | code_review_graph/cli.py:1976-2002 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/cli.py:1918` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19–27 lines × 2) · ×1
  • Duplicated block (19–27 lines × 2) code_review_graph/registry.py:67 — code_review_graph/registry.py:67-93 | code_review_graph/tools/_common.py:178-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/registry.py:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `str` in one and `"Path | str"` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (23–25 lines × 2) · ×1
  • Duplicated block (23–25 lines × 2) code_review_graph/eval/token_benchmark.py:21 — code_review_graph/eval/token_benchmark.py:21-45 | code_review_graph/eval/token_benchmark.py:135-157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) code_review_graph/postprocessing.py:112 — code_review_graph/postprocessing.py:112-134 | code_review_graph/tools/build.py:318-340 | code_review_graph/tools/build.py:935-957 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `code_review_graph/tools/build.py:317` calls `perf_counter` and `code_review_graph/tools/build.py:933` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) code_review_graph/eval/reporter.py:200 — code_review_graph/eval/reporter.py:200-222 | code_review_graph/eval/reporter.py:284-305 | code_review_graph/eval/reporter.py:306-327 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) code_review_graph/parser.py:13875 — code_review_graph/parser.py:13875-13893 | code_review_graph/parser.py:17120-17141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:13875` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) code_review_graph/cli.py:1752 — code_review_graph/cli.py:1752-1771 | code_review_graph/cli.py:1804-1823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/cli.py:1752` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–20 lines × 2) · ×1
  • Duplicated block (16–20 lines × 2) code_review_graph/jsonc.py:70 — code_review_graph/jsonc.py:70-85 | code_review_graph/jsonc.py:93-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) code_review_graph/parser.py:17612 — code_review_graph/parser.py:17612-17631 | code_review_graph/parser.py:17642-17660 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) code_review_graph/spring_resolver.py:261 — code_review_graph/spring_resolver.py:261-279 | code_review_graph/temporal_resolver.py:195-213 — before extracting anything, compare `code_review_graph/spring_resolver.py` and `code_review_graph/temporal_resolver.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) code_review_graph/parser.py:10536 — code_review_graph/parser.py:10536-10553 | code_review_graph/parser.py:21116-21133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:10536` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–17 lines × 5) · ×1
  • Duplicated block (13–17 lines × 5) code_review_graph/parser.py:14293 — code_review_graph/parser.py:14293-14307 | code_review_graph/parser.py:14373-14386 | code_review_graph/parser.py:15142-15156 | code_review_graph/parser.py:15252-15268 | code_review_graph/parser.py:24999-25011 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:14293` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–17 lines × 5) · ×1
  • Duplicated block (15–17 lines × 5) code_review_graph/parser.py:14288 — code_review_graph/parser.py:14288-14302 | code_review_graph/parser.py:15020-15035 | code_review_graph/parser.py:15137-15151 | code_review_graph/parser.py:15247-15263 | code_review_graph/parser.py:24993-25008 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:14288` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–17 lines × 2) · ×1
  • Duplicated block (13–17 lines × 2) code_review_graph/parser.py:9740 — code_review_graph/parser.py:9740-9752 | code_review_graph/parser.py:10387-10403 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) code_review_graph/parser.py:7470 — code_review_graph/parser.py:7470-7485 | code_review_graph/parser.py:7500-7515 | code_review_graph/parser.py:7527-7542 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:7470` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) code_review_graph/parser.py:6697 — code_review_graph/parser.py:6697-6712 | code_review_graph/parser.py:6733-6748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:6697` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–15 lines × 4) · ×1
  • Duplicated block (14–15 lines × 4) code_review_graph/parser.py:12775 — code_review_graph/parser.py:12775-12788 | code_review_graph/parser.py:14282-14295 | code_review_graph/parser.py:15131-15144 | code_review_graph/parser.py:24987-25001 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:12775` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×1
  • Duplicated block (14–15 lines × 3) code_review_graph/scoped_resolver.py:400 — code_review_graph/scoped_resolver.py:400-413 | code_review_graph/spring_resolver.py:153-167 | code_review_graph/temporal_resolver.py:121-135 — before extracting anything, compare `code_review_graph/spring_resolver.py` and `code_review_graph/temporal_resolver.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) code_review_graph/parser.py:17376 — code_review_graph/parser.py:17376-17390 | code_review_graph/parser.py:25070-25082 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:17376` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) code_review_graph/tools/build.py:299 — code_review_graph/tools/build.py:299-313 | code_review_graph/tools/build.py:919-933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `code_review_graph/tools/build.py:317` calls `perf_counter` and `code_review_graph/tools/build.py:935` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) code_review_graph/parser.py:13870 — code_review_graph/parser.py:13870-13884 | code_review_graph/parser.py:14285-14298 | code_review_graph/parser.py:15134-15147 | code_review_graph/parser.py:24990-25004 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:13870` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) code_review_graph/parser.py:14274 — code_review_graph/parser.py:14274-14287 | code_review_graph/parser.py:14355-14368 | code_review_graph/parser.py:15123-15136 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:14274` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) code_review_graph/jsonc.py:294 — code_review_graph/jsonc.py:294-304 | code_review_graph/jsonc.py:311-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10–14 lines × 2) · ×1
  • Duplicated block (10–14 lines × 2) code_review_graph/parser.py:10506 — code_review_graph/parser.py:10506-10515 | code_review_graph/parser.py:21061-21074 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 7) · ×1
  • Duplicated block (13 lines × 7) code_review_graph/parser.py:13873 — code_review_graph/parser.py:13873-13886 | code_review_graph/parser.py:14288-14300 | code_review_graph/parser.py:14529-14542 | code_review_graph/parser.py:15020-15032 | code_review_graph/parser.py:15137-15149 | code_review_graph/parser.py:15247-15259 | code_review_graph/parser.py:24993-25006 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:13873` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) code_review_graph/parser.py:14298 — code_review_graph/parser.py:14298-14310 | code_review_graph/parser.py:14377-14389 | code_review_graph/parser.py:15147-15159 | code_review_graph/parser.py:15257-15271 | code_review_graph/parser.py:17381-17393 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:14298` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) code_review_graph/parser.py:7476 — code_review_graph/parser.py:7476-7488 | code_review_graph/parser.py:7506-7518 | code_review_graph/parser.py:7533-7545 | code_review_graph/parser.py:7574-7586 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:7476` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `code_review_graph/parser.py:7489` calls `_extract_plsql_calls`, `end` and `code_review_graph/parser.py:7562` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) code_review_graph/graph.py:2672 — code_review_graph/graph.py:2672-2683 | code_review_graph/graph.py:2819-2831 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) code_review_graph/parser.py:12778 — code_review_graph/parser.py:12778-12789 | code_review_graph/parser.py:13870-13882 | code_review_graph/parser.py:14285-14296 | code_review_graph/parser.py:15134-15145 | code_review_graph/parser.py:24990-25002 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:12778` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) code_review_graph/parser.py:13807 — code_review_graph/parser.py:13807-13818 | code_review_graph/parser.py:14051-14062 | code_review_graph/parser.py:14096-14107 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:13807` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `code_review_graph/parser.py:14049` calls `_julia_scope_join` and `code_review_graph/parser.py:13806` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) code_review_graph/parser.py:12736 — code_review_graph/parser.py:12736-12746 | code_review_graph/parser.py:12786-12797 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:12736` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) code_review_graph/parser.py:23866 — code_review_graph/parser.py:23866-23875 | code_review_graph/parser.py:23952-23963 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:23866` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) code_review_graph/parser.py:23909 — code_review_graph/parser.py:23909-23917 | code_review_graph/parser.py:23969-23980 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/parser.py:23909` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) code_review_graph/parser.py:12772 — code_review_graph/parser.py:12772-12782 | code_review_graph/parser.py:14279-14289 | code_review_graph/parser.py:14360-14370 | code_review_graph/parser.py:15128-15138 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `code_review_graph/parser.py:14277` calls `_get_params` and `code_review_graph/parser.py:12771` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) code_review_graph/doctor.py:313 — code_review_graph/doctor.py:313-322 | code_review_graph/skills.py:638-648 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) code_review_graph/graph.py:3380 — code_review_graph/graph.py:3380-3389 | code_review_graph/graph.py:3469-3476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/graph.py:3380` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7–9 lines × 4) · ×1
  • Duplicated block (7–9 lines × 4) code_review_graph/parser.py:23869 — code_review_graph/parser.py:23869-23877 | code_review_graph/parser.py:23958-23964 | code_review_graph/parser.py:24288-24296 | code_review_graph/parser.py:24353-24359 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) code_review_graph/graph.py:2723 — code_review_graph/graph.py:2723-2730 | code_review_graph/graph.py:2832-2839 | code_review_graph/graph.py:2883-2890 | code_review_graph/graph.py:4529-4536 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) code_review_graph/graph.py:5607 — code_review_graph/graph.py:5607-5614 | code_review_graph/graph.py:5644-5651 | code_review_graph/graph.py:5686-5693 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) code_review_graph/parser.py:23162 — code_review_graph/parser.py:23162-23168 | code_review_graph/parser.py:24762-24768 | code_review_graph/parser.py:24887-24893 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) code_review_graph/graph.py:5383 — code_review_graph/graph.py:5383-5388 | code_review_graph/graph.py:5490-5496 | code_review_graph/graph.py:5508-5514 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/graph.py:5383` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
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 node:test suite in code-review-graph-vscode/ ran and not one test passed (Error: Could not locate the bindings file. Tried:), so the coverage report describes the failed run, not the code. 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.
R10 · Code Duplication · Duplicated block (20 lines × 2 locations) · ×1
  • Duplicated block (20 lines × 2 locations) code-review-graph-vscode/src/features/navigation.ts:56 — code-review-graph-vscode/src/features/navigation.ts:56 · code-review-graph-vscode/src/features/navigation.ts:134 — 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 (19 lines × 3 locations) · ×1
  • Duplicated block (19 lines × 3 locations) code-review-graph-vscode/src/extension.ts:185 — code-review-graph-vscode/src/extension.ts:185 · code-review-graph-vscode/src/extension.ts:239 · code-review-graph-vscode/src/extension.ts:417 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×1
  • Duplicated block (16 lines × 2 locations) code-review-graph-vscode/src/features/navigation.ts:15 — code-review-graph-vscode/src/features/navigation.ts:15 · code-review-graph-vscode/src/features/navigation.ts:74 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (15 matched lines × 2 locations) code-review-graph-vscode/src/views/treeItems.ts:83 — code-review-graph-vscode/src/views/treeItems.ts:83 · code-review-graph-vscode/src/views/treeItems.ts:178 — the two spans are one implementation copied and then locally edited — 75 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×1
  • Duplicated block (12 lines × 2 locations) code-review-graph-vscode/src/views/treeView.ts:25 — code-review-graph-vscode/src/views/treeView.ts:25 · code-review-graph-vscode/src/views/treeView.ts:144 — 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 (10 lines × 2 locations) · ×1
  • Duplicated block (10 lines × 2 locations) code-review-graph-vscode/src/webview/graph.ts:303 — code-review-graph-vscode/src/webview/graph.ts:303 · code-review-graph-vscode/src/webview/graph.ts:355 — 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 (9 lines × 3 locations) · ×1
  • Duplicated block (9 lines × 3 locations) code-review-graph-vscode/src/extension.ts:83 — code-review-graph-vscode/src/extension.ts:83 · code-review-graph-vscode/src/features/blastRadius.ts:22 · code-review-graph-vscode/src/features/navigation.ts:11 — 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 (7 lines × 3 locations) · ×1
  • Duplicated block (7 lines × 3 locations) code-review-graph-vscode/src/extension.ts:68 — code-review-graph-vscode/src/extension.ts:68 · code-review-graph-vscode/src/features/cursorResolver.ts:31 · code-review-graph-vscode/src/features/search.ts:56 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×1
  • Duplicated block (6 lines × 2 locations) code-review-graph-vscode/src/views/treeView.ts:120 — code-review-graph-vscode/src/views/treeView.ts:120 · code-review-graph-vscode/src/views/treeView.ts:187 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block with local edits (5 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (5 matched lines × 2 locations) code-review-graph-vscode/src/features/blastRadius.ts:48 — code-review-graph-vscode/src/features/blastRadius.ts:48 · code-review-graph-vscode/src/features/scmDecorations.ts:59 — the two spans are one implementation copied and then locally edited — 53 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 28, cognitive 39) · ×1
  • Complex function (anonymous) (cyclomatic 28, cognitive 39) code-review-graph-vscode/src/webview/graph.ts:466 — (anonymous) has cyclomatic complexity 28 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getVisibleData (cyclomatic 20, cognitive 53) · ×1
  • Complex function getVisibleData (cyclomatic 20, cognitive 53) code-review-graph-vscode/src/webview/graph.ts:288 — getVisibleData has cyclomatic complexity 20 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 17, cognitive 23) · ×1
  • Complex function (anonymous) (cyclomatic 17, cognitive 23) code-review-graph-vscode/src/extension.ts:658 — (anonymous) has cyclomatic complexity 17 and cognitive complexity 23; 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 getImpactRadius (cyclomatic 16, cognitive 30) · ×1
  • Complex function getImpactRadius (cyclomatic 16, cognitive 30) code-review-graph-vscode/src/backend/sqlite.ts:440 — getImpactRadius has cyclomatic complexity 16 and cognitive complexity 30; 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 setData (cyclomatic 12, cognitive 16) · ×1
  • Complex function setData (cyclomatic 12, cognitive 16) code-review-graph-vscode/src/webview/graph.ts:230 — setData has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 · code-review-graph-vscode/src/webview/graph.ts · ×1
  • code-review-graph-vscode/src/webview/graph.ts: 872 lines of code code-review-graph-vscode/src/webview/graph.ts:1 — code-review-graph-vscode/src/webview/graph.ts has 872 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 · code-review-graph-vscode/src/extension.ts · ×1
  • code-review-graph-vscode/src/extension.ts: 862 lines of code code-review-graph-vscode/src/extension.ts:1 — code-review-graph-vscode/src/extension.ts has 862 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 · code-review-graph-vscode/src/views/graphWebview.ts · ×1
  • code-review-graph-vscode/src/views/graphWebview.ts: 571 lines of code code-review-graph-vscode/src/views/graphWebview.ts:1 — code-review-graph-vscode/src/views/graphWebview.ts has 571 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 · code-review-graph-vscode/src/backend/sqlite.ts · ×1
  • code-review-graph-vscode/src/backend/sqlite.ts: 525 lines of code code-review-graph-vscode/src/backend/sqlite.ts:1 — code-review-graph-vscode/src/backend/sqlite.ts has 525 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 (~196 LoC) · ×1
  • Dead file (~196 LoC) code-review-graph-vscode/src/features/navigation.ts — no import path from any entry point (4 application, 0 tooling, 12 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 (~131 LoC) · ×1
  • Dead file (~131 LoC) code-review-graph-vscode/src/features/search.ts — no import path from any entry point (4 application, 0 tooling, 12 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 (~117 LoC) · ×1
  • Dead file (~117 LoC) code-review-graph-vscode/src/features/reviewAssistant.ts — no import path from any entry point (4 application, 0 tooling, 12 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 (~70 LoC) · ×1
  • Dead file (~70 LoC) code-review-graph-vscode/src/features/blastRadius.ts — no import path from any entry point (4 application, 0 tooling, 12 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 (~60 LoC) · ×1
  • Dead file (~60 LoC) code-review-graph-vscode/src/backend/watcher.ts — no import path from any entry point (4 application, 0 tooling, 12 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 (~37 LoC) · ×1
  • Dead file (~37 LoC) code-review-graph-vscode/src/features/cursorResolver.ts — no import path from any entry point (4 application, 0 tooling, 12 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (code-review-graph-vscode/src/features/blastRadius.ts, code-review-graph-vscode/src/features/navigation.ts) — 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
Minor — 55 finding(s)
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×23
  • Silent fallback default on parse failure code_review_graph/aop_resolver.py:312 — `_load_extra` returns `{}` when `(json.JSONDecodeError, TypeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/csharp_resolver.py:42 — `_extra` returns `{}` when `(ValueError, TypeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/graph.py:108 — `_load_collision_extra` returns `{}` when `(TypeError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/graph.py:642 — `_load_edge_extra` returns `{}` when `(TypeError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/incremental.py:182 — `_load_pending_paths` returns `set()` when `(TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/incremental.py:217 — `_load_dependents_pending` returns `set()` when `(TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/incremental.py:1966 — `get_all_tracked_files` returns `[]` when `(FileNotFoundError, subprocess.TimeoutExpired, UnicodeDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/inheritance.py:45 — `_load_extra` returns `{}` when `(TypeError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/jedi_resolver.py:291 — `_edge_extra` returns `{}` when `(TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/npm_alias_resolver.py:138 — `_aliases_for_file` returns `{}` when `(OSError, ValueError, RuntimeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:9746 — `_python_module_property_return_annotations` returns `{}` when `(OSError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:9778 — `_python_module_class_identities` returns `{}` when `(OSError, RuntimeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:10397 — `_python_module_return_annotations` returns `{}` when `(OSError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:20173 — `_get_python_star_exports` returns `{}` when `(OSError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:20282 — `_extract_python_dunder_all` returns `set()` when `(SyntaxError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:22372 — `_rust_current_module_parts` returns `[]` when `(OSError, RuntimeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:195 — `_load_cargo_manifest` returns `{}` when `(OSError, RuntimeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:243 — `_python_function_scope_bindings` returns `{}` when `(SyntaxError, UnicodeDecodeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:540 — `_python_unreachable_call_positions` returns `frozenset()` when `(SyntaxError, UnicodeDecodeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:580 — `_python_unreachable_import_positions` returns `frozenset()` when `(SyntaxError, UnicodeDecodeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:1123 — `_read_php_composer_psr4` returns `()` when `(OSError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure code_review_graph/parser.py:2531 — `_resolved_dir` returns `''` when `(OSError, ValueError, RuntimeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure scripts/audit_python_imports.py:987 — `build_log_counters` returns `{}` when `(SyntaxError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
X10 · Duplicated predicate · Duplicated predicate · ×10
  • Duplicated predicate code_review_graph/changes.py:932 — `"ambiguous_targets" in extra or "unresolved_targets" in extra` appears character-identically in 2 files — code_review_graph/changes.py, code_review_graph/graph.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate code_review_graph/daemon.py:414 — `(resolved / ".git").exists() or (resolved / ".svn").exists() or (resolved / ".code-review-graph").exists()` appears character-identically in 3 files — code_review_graph/daemon.py, code_review_graph/registry.py, code_review_graph/tools/_common.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate code_review_graph/parser.py:227 — `alias.asname or alias.name.split(".", 1)[0]` appears character-identically in 3 files — code_review_graph/parser.py, code_review_graph/refactor.py, scripts/audit_python_imports.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate code_review_graph/communities.py:986 — `cur.rowcount is not None and cur.rowcount >= 0` appears character-identically in 2 files — code_review_graph/communities.py, code_review_graph/flows.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate code_review_graph/incremental.py:805 — `existing and not existing.endswith("\n")` appears character-identically in 2 files — code_review_graph/incremental.py, code_review_graph/skills.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate code_review_graph/context_history.py:90 — `isinstance(value, bool) or not isinstance(value, int)` appears character-identically in 2 files — code_review_graph/context_history.py, scripts/render_pr_comment.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate code_review_graph/change_details.py:86 — `name != "all" and name not in DETAIL_SECTIONS` appears character-identically in 2 files — code_review_graph/change_details.py, scripts/render_pr_comment.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate code_review_graph/parser.py:6301 — `not stripped or stripped.startswith("#")` appears character-identically in 2 files — code_review_graph/parser.py, code_review_graph/skills.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate code_review_graph/npm_alias_resolver.py:164 — `self._repo_root is not None and current == self._repo_root` appears character-identically in 2 files — code_review_graph/npm_alias_resolver.py, code_review_graph/parser.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate code_review_graph/analysis.py:395 — `src_cid is not None and tgt_cid is not None and src_cid != tgt_cid` appears character-identically in 3 files — code_review_graph/analysis.py, code_review_graph/change_details.py, code_review_graph/visualization.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D24 · Comment Value · redundant comment · ×6
  • redundant comment code-review-graph-vscode/src/extension.ts:894 — "Register walkthrough commands" repeats the code it sits on: 3 of its 3 words (register, walkthrough, commands) are already in `registerWalkthroughCommands(context, cli, installer);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment code-review-graph-vscode/src/extension.ts:906 — "Schema compatibility check" repeats the code it sits on: 3 of its 3 words (schema, compatibility, check) are already in `const schemaWarning = sqliteReader.checkSchemaCompatibility();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment code-review-graph-vscode/src/extension.ts:942 — "Create status bar" repeats the code it sits on: 3 of its 3 words (create, status, bar) are already in `const statusBar = new StatusBar();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment code-review-graph-vscode/src/features/navigation.ts:23 — "Resolve node at cursor" repeats the code it sits on: 3 of its 3 words (resolve, node, cursor) are already in `const node = resolveNodeAtCursor(reader);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment code-review-graph-vscode/src/features/navigation.ts:82 — "Resolve node at cursor" repeats the code it sits on: 3 of its 3 words (resolve, node, cursor) are already in `const node = resolveNodeAtCursor(reader);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment code-review-graph-vscode/src/webview/graph.ts:289 — "Filter edges by visible kinds" repeats the code it sits on: 4 of its 4 words (filter, edges, visible, kinds) are already in `let links = allEdges.filter((e) => visibleEdgeKinds.has(e.kind));`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 23 significant file(s) lose their only recent owner: code_review_graph/visualization.py, scripts/audit_python_imports.py, scripts/render_pr_comment.py, code_review_graph/eval/benchmarks/incremental_fidelity.py, code-review-graph-vscode/src/extension.ts, code-review-graph-vscode/src/webview/graph.ts, scripts/promotion_gate.py, code_review_graph/_legacy_instructions.py (+15 more). Pair on, review, or document these before any departure.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found pyproject.toml:59 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `pyproject.toml` makes this repository a deployable product (line 59).
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion pyproject.toml:1 — `(repository root)` (85110 LoC, 211 module-visible types across 7 directories) overshoots its size bounds. 1 of 2 build unit(s) (Python, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D27 · Navigability · Scattered collaborators · ×1
  • Scattered collaborators — 91 % of calls cross a namespace and only 17 % of collaborators are co-located — group each feature's code into a vertical slice so a call's collaborators sit together.
D30 · Dependency Vulnerabilities · Low vulnerability · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:6 — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 7 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · Dependabot does not watch npm/uv · ×1
  • Dependabot does not watch npm/uv REDACTED:2 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `uv`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
X5 · Nullable reference types · Nullable reference types not enabled everywhere · ×1
  • Nullable reference types not enabled everywhere — 0/1 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
X9 · Subsumed condition operand · Subsumed condition operand · ×1
  • Subsumed condition operand tests/test_parser.py:1232 — `n.name.startswith("describe:")` can never decide this `||` — every value satisfying `n.name.startswith("describe:")` also satisfies `n.name.startswith("describe")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-189e0c54325e41dfb11b467dbf7f49e5/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-189e0c54325e41dfb11b467dbf7f49e5/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=1076" --report-format json --report-path /tmp/watchdog-gitleaks-189e0c54325e41dfb11b467dbf7f49e5/history-2.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-189e0c54325e41dfb11b467dbf7f49e5/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .69artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .24artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .4artifacts/raw/trivy-config.json
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.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e0b3-da91-77ee-99ba-22864b7b3621 · 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