Public report of tirth8205/code-review-graph, published 3 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.1). 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, 3 November 2026, 19:04 UTC · Survey ID cd_23cec165b00347d0afa9ada3734cb84a

tirth8205/code-review-graph

Measured 3 November 2026, 19:04 UTC, at code version d72e8fb

CAI score 56out of 100 At risk Up 4 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: 66,767 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 1.0 person-years · Weakest lens: Code Health, 43

Findings by how serious they are

81 critical 609 serious 43 minor

11 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
3 November 2026, 19:04 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 ▸

76of 76 dimensions measured by tools.
719of 733 findings point to an exact file and line, so you can open each one in the code. The other 14 concern the repository as a whole, such as missing documentation.
76dimensions across 6 lenses, read from 66,767 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 56 out of 100, which the At risk rating leaves unchanged.

Code Health, at 43, is the weakest lens and counts most in the score. The best first step is simplifying the hardest methods, worth about 8 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 one automatic update takes new releases before a bad one can be spotted. Pinning each tool to an exact version, updating the vulnerable packages and setting a waiting period for automatic updates would close these risks. Correcting the flagged pipeline settings would fix the four weaknesses in the build pipeline's configuration.

The product code is 66,767 lines, about €150,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 43 · counts for 46%Production Readiness 57 · counts for 25%Security and Compliance 66 · counts for 14%Maturity 75 · counts for 8%Architecture 91 · counts for 4%Performance 100 · counts for 2%

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

Code composition: what the lines of code are
Product code 45%Tests 55%
New since the last survey: 17 findings

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

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: 6 findings

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

  • Static Analysis (SAST) · High: watchdog-unpinned-package-install-in-run REDACTED
  • Static Analysis (SAST) · High: watchdog-workflow-run-artifact-into-privileged-value REDACTED
  • Static Analysis (SAST) · High: watchdog-unpinned-package-install-in-run REDACTED
  • Static Analysis (SAST) · High: watchdog-unpinned-package-install-in-run REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Rebuild cost: about €150,000 · Estimate
Cost to rebuild€49,000 to €250,000, for 817 to 2,591 hours of work, about 1.0 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 56. 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: 66,767 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
Bring the 255 bodies over 15 down to 15 or less in Cognitive Complexity — start with CodeParser._get_name (cognitive 407), CodeParser._get_bases (cognitive 364), query.query_graph (cognitive 357).
Raises the score by about 8 points · High effort · Cognitive Complexity
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 €150,000 to build again, about 1.0 person-years of work. Its weakest lens is Code Health, at 43 (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
Bring the 255 bodies over 15 down to 15 or less in Cognitive Complexity. Of all the actions in this report, it raises the score most for the work it takes: about 8 points for high effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 144,978 lines over the last 90 days, which is about 587,966 lines a year. At that pace, the extra work comes to an estimated 79.3 to 475.8 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · 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.

44 modules, with 33 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; 4 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-vscode2 code-review-graph-vscode.src.backend.cli3 code-review-graph-vscode.src.backend.sqlite4 code-review-graph-vscode.src.backend.watcher5 code-review-graph-vscode.src.views6 code-review-graph-vscode.src.views.statusBar7 code-review-graph-vscode.src.views.treeItems8 code_review_graph.cli9 code_review_graph.custom_languages10 code_review_graph.daemon11 code_review_graph.embeddings12 code_review_graph.errors13 code_review_graph.eval14 code_review_graph.exports15 code_review_graph.hints16 code_review_graph.http_origin_guard17 code_review_graph.incremental18 code_review_graph.neighbourhood19 code_review_graph.parser20 code_review_graph.registry21 code_review_graph.search22 code_review_graph.uninstall23 scripts.audit_python_imports24 scripts.auto_promote25 scripts.promotion_gate26 code-review-graph-vscode.src27 code-review-graph-vscode.src.backend28 code-review-graph-vscode.src.features.scmDecorations29 code-review-graph-vscode.src.onboarding.installer30 code-review-graph-vscode.src.views.graphWebview31 code-review-graph-vscode.src.views.treeView32 code-review-graph-vscode.src.webview.graph33 code_review_graph.graph34 code_review_graph.refactor35 scripts36 code-review-graph-vscode.src.features37 code-review-graph-vscode.src.onboarding38 code-review-graph-vscode.src.webview39 code_review_graph40 code_review_graph.tools
1 code-review-graph-vscode
2 code-review-graph-vscode.src.backend.cli
3 code-review-graph-vscode.src.backend.sqlite
4 code-review-graph-vscode.src.backend.watcher
5 code-review-graph-vscode.src.views
6 code-review-graph-vscode.src.views.statusBar
7 code-review-graph-vscode.src.views.treeItems
8 code_review_graph.cli
9 code_review_graph.custom_languages
10 code_review_graph.daemon
11 code_review_graph.embeddings
12 code_review_graph.errors
13 code_review_graph.eval
14 code_review_graph.exports
15 code_review_graph.hints
16 code_review_graph.http_origin_guard
17 code_review_graph.incremental
18 code_review_graph.neighbourhood
19 code_review_graph.parser
20 code_review_graph.registry
21 code_review_graph.search
22 code_review_graph.uninstall
23 scripts.audit_python_imports
24 scripts.auto_promote
25 scripts.promotion_gate
26 code-review-graph-vscode.src11
27 code-review-graph-vscode.src.backend1
28 code-review-graph-vscode.src.features.scmDecorations1
29 code-review-graph-vscode.src.onboarding.installer1
30 code-review-graph-vscode.src.views.graphWebview2
31 code-review-graph-vscode.src.views.treeView23
32 code-review-graph-vscode.src.webview.graph3
33 code_review_graph.graph12
34 code_review_graph.refactor1
35 scripts232
36 code-review-graph-vscode.src.features52
37 code-review-graph-vscode.src.onboarding11
38 code-review-graph-vscode.src.webview1
39 code_review_graph1112121111312
40 code_review_graph.tools3
Uses a module listed above itPart of a loopThe module itself
1 code-review-graph-vscode2 code-review-graph-vscode.src.backend.cli3 code-review-graph-vscode.src.backend.sqlite4 code-review-graph-vscode.src.backend.watcher5 code-review-graph-vscode.src.views6 code-review-graph-vscode.src.views.statusBar7 code-review-graph-vscode.src.views.treeItems8 code_review_graph.cli9 code_review_graph.custom_languages10 code_review_graph.daemon11 code_review_graph.embeddings12 code_review_graph.errors13 code_review_graph.eval14 code_review_graph.exports15 code_review_graph.hints16 code_review_graph.http_origin_guard17 code_review_graph.incremental18 code_review_graph.neighbourhood19 code_review_graph.parser20 code_review_graph.registry21 code_review_graph.search22 code_review_graph.uninstall23 scripts.audit_python_imports24 scripts.auto_promote25 scripts.promotion_gate26 code-review-graph-vscode.src27 code-review-graph-vscode.src.backend28 code-review-graph-vscode.src.features.scmDecorations29 code-review-graph-vscode.src.onboarding.installer30 code-review-graph-vscode.src.views.graphWebview31 code-review-graph-vscode.src.views.treeView32 code-review-graph-vscode.src.webview.graph33 code_review_graph.graph34 code_review_graph.refactor35 scripts36 code-review-graph-vscode.src.features37 code-review-graph-vscode.src.onboarding38 code-review-graph-vscode.src.webview39 code_review_graph40 code_review_graph.toolscode-review-graph-vscode1code-review-graph-vscode.src.backend.cli2code-review-graph-vscode.src.backend.sqlite3code-review-graph-vscode.src.backend.watcher4code-review-graph-vscode.src.views5code-review-graph-vscode.src.views.statusBar6code-review-graph-vscode.src.views.treeItems7code_review_graph.cli8code_review_graph.custom_languages9code_review_graph.daemon10code_review_graph.embeddings11code_review_graph.errors12code_review_graph.eval13code_review_graph.exports14code_review_graph.hints15code_review_graph.http_origin_guard16code_review_graph.incremental17code_review_graph.neighbourhood18code_review_graph.parser19code_review_graph.registry20code_review_graph.search21code_review_graph.uninstall22scripts.audit_python_imports23scripts.auto_promote24scripts.promotion_gate25code-review-graph-vscode.src26code-review-graph-vscode.src.backend27code-review-graph-vscode.src.features.scmDecorations28code-review-graph-vscode.src.onboarding.installer29code-review-graph-vscode.src.views.graphWebview30code-review-graph-vscode.src.views.treeView31code-review-graph-vscode.src.webview.graph32code_review_graph.graph33code_review_graph.refactor34scripts35code-review-graph-vscode.src.features36code-review-graph-vscode.src.onboarding37code-review-graph-vscode.src.webview38code_review_graph39code_review_graph.tools401111122331212325211111121211113123+4 more modules (most-connected shown)

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

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

At a glance — Maturity · 75% · Strong ·

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

At a glance — Security · 66% · Adequate · gated by D29, D30, 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 — Injection68High / Critical
A03:2025 — Software Supply Chain Failures31High / Critical

Roadmap

Top priorities: Bring the 255 bodies over 15 down to 15 or less in Cognitive Complexity — start with CodeParser._get_name (cognitive 407), CodeParser._get_bases (cognitive 364), query.query_graph (cognitive 357); 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 `!`.

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

Do thisHelpsEffortDimension
Bring the 255 bodies over 15 down to 15 or less in Cognitive Complexity — start with CodeParser._get_name (cognitive 407), CodeParser._get_bases (cognitive 364), query.query_graph (cognitive 357).+7.9 ptsHighCognitive Complexity
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+6.4 ptsMediumLarge Files
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.+5.3 ptsMediumNullable reference types
Bring the 40 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with query.query_graph (cyclomatic 168), cli._dispatch (cyclomatic 164), CodeParser._get_name (cyclomatic 126).+4.1 ptsHighCyclomatic Complexity
Resolve the 5 No assertions finding(s) in Test Quality — start with sample_vitest.test.ts (3), sample_mocha.test.ts (2).+1.9 ptsLowTest Quality
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.6 ptsLowADR Quality
Add tests that import the unreached modules (directly or through their public entry).+3.0 ptsMediumTest Coverage
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 74 files carrying findings, judged against the Production bar: 3% slop · 79% mixed · 18% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.6SlopDependency Vulnerabilities: High 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
code_review_graph/communities.py5.5MixedCyclomatic Complexity: communities._split_oversized (cyclomatic 19)
REDACTED5.8MixedCyclomatic Complexity: embeddings.get_provider (cyclomatic 31)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
code-review-graph-vscode/src/extension.ts6.3MixedCyclomatic Complexity: extension.registerCommands (cyclomatic 76)
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/cli.py7.0MixedCyclomatic Complexity: cli._dispatch (cyclomatic 164)
code_review_graph/parser.py7.0MixedCyclomatic Complexity: CodeParser._get_name (cyclomatic 126)
code_review_graph/refactor.py7.0MixedCyclomatic Complexity: refactor.find_dead_code (cyclomatic 86)
code_review_graph/graph.py7.0MixedCyclomatic Complexity: GraphStore._resolve_bare_endpoints (cyclomatic 61)

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

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

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

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

Could not be resolved — 11

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 76 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 — 76 dimensions across the health lenses
D1D2D3D4D5D6D9D10D11D13D14D15D16D17D19D20D24D26D27D28D29D30D31D34D35D36D37D43D44AX10AX3AX4AX6GD1M1M2M3M4P1P10P2P3P4P6P7PF3R1R10R2R3R4R5R6R7R8R9X12X13X14X15X16X17X18X19X20X21X22X23X24X25X26X28X29X30X32X5

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, 719 of 733 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 01a1a2cc-9d45-780f-9342-638e24a7d7a0.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a coverage step in CI (`--cov=`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.py, .ts), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`, or lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`, or lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • 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 181 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.
  • 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 deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its 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 on C# first (docs/plans/deterministic-engine.md, P5): 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.
  • AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: 1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • 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.
  • 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.
  • 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.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • 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 Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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

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

query.query_graph (cyclomatic 168)code_review_graph/tools/query.py:433
cli._dispatch (cyclomatic 164)code_review_graph/cli.py:1663
CodeParser._get_name (cyclomatic 126)code_review_graph/parser.py:17010
CodeParser._get_bases (cyclomatic 119)code_review_graph/parser.py:17807
CodeParser._extract_import (cyclomatic 104)code_review_graph/parser.py:18158

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

What to do

  1. Bring the 40 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with query.query_graph (cyclomatic 168), cli._dispatch (cyclomatic 164), CodeParser._get_name (cyclomatic 126). — 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 40 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.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

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

CodeParser._get_name (cognitive 407)code_review_graph/parser.py:17010
CodeParser._get_bases (cognitive 364)code_review_graph/parser.py:17807
query.query_graph (cognitive 357)code_review_graph/tools/query.py:433
cli._dispatch (cognitive 339)code_review_graph/cli.py:1663
CodeParser._extract_import (cognitive 234)code_review_graph/parser.py:18158

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

What to do

  1. Bring the 255 bodies over 15 down to 15 or less in Cognitive Complexity — start with CodeParser._get_name (cognitive 407), CodeParser._get_bases (cognitive 364), query.query_graph (cognitive 357). — 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 255 together lifts Cognitive Complexity from 2.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

29 god class(es) detected.

FileTooLong: code_review_graph/parser.py · ×22code_review_graph/parser.py
FunctionTooLong: extension.registerCommands · ×3code-review-graph-vscode/src/extension.ts:80
TooManyMethods: CodeParser · ×2code_review_graph/parser.py:2942
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 22 FileTooLong finding(s) in God Classes — start with parser.py, graph.py, incremental.py. — One of this dimension's main actionable groups (22 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).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.4 / 10Stronggated by 91 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

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

87 duplicated block group(s) detected. A further 4 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (14 lines × 2) · ×4code_review_graph/communities.py:450
Duplicated block (14–15 lines × 2) · ×3code_review_graph/cli.py:1027
Duplicated block (13 lines × 2) · ×3code_review_graph/cli.py:2092
Duplicated block (9 lines × 2) · ×3code_review_graph/parser.py:6340
Duplicated block (8 lines × 2) · ×3code_review_graph/graph.py:2511

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

What to do

  1. 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).
  2. Resolve the 3 Duplicated block (14–15 lines × 2) finding(s) in Code Duplication — start with parser.py (2), cli.py. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 3 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with cli.py, graph.py, parser.py. — One of this dimension's main actionable groups (3 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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 24 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

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

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

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

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

4167 test methods: 4026 unit, 48 integration, 0 BDD, 93 e2e. The JavaScript/TypeScript suite contributes 33 `it`/`test` case(s) across 5 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 3 `#[test]` function(s) across 1 file(s) declaring at least one; its unit/integration split is Cargo's own — 0 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 4131 test function(s) across 176 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_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 181 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).
  2. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

0 flaky across 1 measured tier(s). Python (repository root, 176 test files): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.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.6 / 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.6 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: code_review_graph/parser.py (99×126=12474); code_review_graph/cli.py (42×164=6888); code_review_graph/tools/query.py (28×168=4704) Repeated repair below the complexity floor: code_review_graph/daemon.py (7 of 9 changes were fixes); code_review_graph/eval/runner.py (4 of 6 changes were fixes)

Hotspot: code_review_graph/parser.py · ×25code_review_graph/parser.py:17010
Repeated repair: code_review_graph/daemon.py · ×2code_review_graph/daemon.py:1137

What to do

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

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

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

21 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 88 of the 101 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

What to do

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

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

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

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

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

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

0 deducted task-comment markers across 66767 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. 22 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 found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — 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 Value4.6 4.4 / 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.4 / 10 · rule-coverage 95% · ceiling Documented

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

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

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 cohesion

What to do

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

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

D27 · Navigability6.5 / 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.5 / 10 · rule-coverage 100% · ceiling Documented

89 % of calls cross a namespace and 0 % go through an interface, but 22 % 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.9 / 10Weak✓ Tool-verified

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

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

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

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

68 finding(s): 0 critical, 65 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 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 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.

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

26 finding(s): 4 critical, 12 high, 9 medium, 1 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 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 3 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 1 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D31 · IaC & Container Security10.0 / 10Exemplary○ Nothing flagged

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

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

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

trivy and checkov found no infrastructure-as-code or container misconfigurations.

✓ On the Gold path — maintain.

Detailed fixes: d31_recommendation.md.

D34 · Knowledge Freshness9.9 / 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 9.9 / 10 · rule-coverage 100% · ceiling Documented

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

Orphaned files with no living knowledge
Orphaned filecode_review_graph/rescript_resolver.py:1

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.8 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

Strongest change-coupling: communities.py↔flows.py 50%

Change coupling: communities.py ↔ flows.pycode_review_graph/communities.py:1

What to do

  1. Resolve the 1 Change coupling finding(s) in Change Coupling — start with communities.py. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.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. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

AX6 · Interface 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 repo and its projects have a README, and whether it's substantive and current.

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

M2 · Architecture 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 structure8.0 / 10Strong✓ Tool-verified

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

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

  • Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
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 61809 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`, 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 entry 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` — add that `package-ecosystem` entry 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.

What to do

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

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

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

  • 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:603 · 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:603
  • 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:637 — 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:577 — 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/features/reviewAssistant.ts:59 · code-review-graph-vscode/src/onboarding/welcome.ts:29 — the two spans are one implementation copied and then locally edited — 59 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/reviewAssistant.ts:59
  • 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:649
  • 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:439
  • (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

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
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 852 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 524 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/webview/graph.ts:1, code-review-graph-vscode/src/extension.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.8 / 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.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each 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.7 / 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 3 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 (3 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 (3 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
  • This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. — tests/fixtures/sample_vue.vue:32

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 Hygiene9.5 / 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.

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

What to do

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

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

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

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

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

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

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`.

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

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

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

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

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

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

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

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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

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

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

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

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

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

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

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

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

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

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

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

X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.

Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.

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 Health43%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.
Maturity75%StrongSolid.
Readiness57%Adequate — gated by R4, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security66%Adequate — gated by D29, D30, 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 — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 10 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 — 52 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.
  • AC7 A11y enforcement — 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
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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.
  • 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 is measured on C# and TypeScript only; Dart, Java, JavaScript, Python not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Python, TypeScript 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.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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 included — suite not readable by the collector
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (29 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 — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — 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 — 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.
  • 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
  • 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
  • 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.
  • 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
  • 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 — 81 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
D30 · Dependency Vulnerabilities · Critical CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical vulnerability · ×1
  • REDACTED
Serious — 609 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×25
  • Hotspot: code_review_graph/parser.py code_review_graph/parser.py:17010 — code_review_graph/parser.py changed 99 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 126 in CodeParser._get_name at line 17010. 68 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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:1663 — code_review_graph/cli.py changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 164 in cli._dispatch at line 1663. 25 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/tools/query.py code_review_graph/tools/query.py:433 — code_review_graph/tools/query.py changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 168 in query.query_graph at line 433. 15 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/incremental.py code_review_graph/incremental.py:1889 — code_review_graph/incremental.py changed 59 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in incremental.incremental_update at line 1889. 43 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/graph.py code_review_graph/graph.py:2117 — code_review_graph/graph.py changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in GraphStore._resolve_bare_endpoints at line 2117. 25 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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:1009 — code_review_graph/skills.py changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in skills.install_platform_configs at line 1009. 14 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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:1904 — code_review_graph/refactor.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 86 in refactor.find_dead_code at line 1904. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/changes.py code_review_graph/changes.py:655 — code_review_graph/changes.py changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in changes.analyze_changes at line 655. 6 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/tools/build.py code_review_graph/tools/build.py:608 — code_review_graph/tools/build.py changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in build.build_or_update_graph at line 608. 9 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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: REDACTED REDACTED:872 — REDACTED changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in embeddings.get_provider at line 872. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: code_review_graph/tools/review.py code_review_graph/tools/review.py:426 — code_review_graph/tools/review.py changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in review.get_review_context at line 426. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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:868 — code_review_graph/search.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in search.hybrid_search at line 868. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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:307 — code_review_graph/uninstall.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in uninstall._remove_yaml_entry at line 307. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/tools/context.py code_review_graph/tools/context.py:28 — 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 28. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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: scripts/render_pr_comment.py scripts/render_pr_comment.py:317 — scripts/render_pr_comment.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in render_pr_comment.render_markdown at line 317. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/daemon_cli.py code_review_graph/daemon_cli.py:198 — code_review_graph/daemon_cli.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in daemon_cli._handle_status at line 198. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/tools/_common.py code_review_graph/tools/_common.py:60 — code_review_graph/tools/_common.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in _common.graph_provenance at line 60. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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.
  • Hotspot: scripts/audit_python_imports.py scripts/audit_python_imports.py:385 — scripts/audit_python_imports.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in audit_python_imports._file_facts at line 385. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01:00' --full-history --no-merges -- scripts/audit_python_imports.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 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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:249 — code_review_graph/scoped_resolver.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in scoped_resolver.resolve_scoped_calls at line 249. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/communities.py code_review_graph/communities.py:565 — code_review_graph/communities.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in communities._split_oversized at line 565. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/tools/flows_tools.py code_review_graph/tools/flows_tools.py:110 — code_review_graph/tools/flows_tools.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in flows_tools.get_flow at line 110. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01:00' --full-history --no-merges -- code_review_graph/tools/flows_tools.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/jedi_resolver.py code_review_graph/jedi_resolver.py:27 — code_review_graph/jedi_resolver.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in jedi_resolver.enrich_jedi_calls at line 27. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01:00' --full-history --no-merges -- code_review_graph/jedi_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/spring_resolver.py code_review_graph/spring_resolver.py:30 — code_review_graph/spring_resolver.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/neighbourhood.py code_review_graph/neighbourhood.py:468 — code_review_graph/neighbourhood.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in neighbourhood.extract at line 468. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01:00' --full-history --no-merges -- code_review_graph/neighbourhood.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.
D3 · God Classes · FileTooLong · ×22
  • FileTooLong: code_review_graph/parser.py code_review_graph/parser.py — FileTooLong — 13899 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 13399 over it, 27.80× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: code_review_graph/graph.py code_review_graph/graph.py — FileTooLong — 2436 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1936 over it, 4.87× 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 — 2089 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1589 over it, 4.18× 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 — 2078 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1578 over it, 4.16× 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 — 1844 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1344 over it, 3.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: code_review_graph/cli.py code_review_graph/cli.py — FileTooLong — 1832 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1332 over it, 3.66× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: code_review_graph/skills.py code_review_graph/skills.py — FileTooLong — 1589 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1089 over it, 3.18× 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 — 1014 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 514 over it, 2.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tools/query.py code_review_graph/tools/query.py — FileTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 482 over it, 1.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/daemon.py code_review_graph/daemon.py — FileTooLong — 927 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 427 over it, 1.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 920 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 420 over it, 1.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/audit_python_imports.py scripts/audit_python_imports.py — FileTooLong — 822 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 322 over it, 1.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/auto_promote.py scripts/auto_promote.py — FileTooLong — 808 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 308 over it, 1.62× 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 — 673 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 173 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: 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: tools/review.py code_review_graph/tools/review.py — FileTooLong — 651 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 151 over it, 1.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tools/build.py code_review_graph/tools/build.py — FileTooLong — 643 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 143 over it, 1.29× 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 — 636 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 136 over it, 1.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/extension.ts code-review-graph-vscode/src/extension.ts — FileTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: registerCommands (80-764). The bar is 500 significant lines; this is 74 over it, 1.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: code_review_graph/search.py code_review_graph/search.py — FileTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 37 over it, 1.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/promotion_gate.py scripts/promotion_gate.py — FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 11 over it, 1.02× 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 — 506 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 6 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
R4 · Test Coverage · No test reaches this file · ×15
  • 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/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/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.
D30 · Dependency Vulnerabilities · Medium CVE · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) code_review_graph/communities.py:450 — code_review_graph/communities.py:450-463 | code_review_graph/communities.py:542-555 — 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:9180 — code_review_graph/parser.py:9180-9193 | code_review_graph/parser.py:9836-9849 — 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:9180` 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:9356 — code_review_graph/parser.py:9356-9369 | code_review_graph/parser.py:9401-9414 — 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:9356` 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:948 — code_review_graph/tools/query.py:948-961 | code_review_graph/tools/query.py:969-982 — 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 414 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 314 over it, 4.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×3
  • Duplicated block (14–15 lines × 2) code_review_graph/cli.py:1027 — code_review_graph/cli.py:1027-1040 | code_review_graph/cli.py:1052-1066 — 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:1027` 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:1026` calls `add_parser`, `add_argument` and `code_review_graph/cli.py:1052` 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:9416 — code_review_graph/parser.py:9416-9429 | code_review_graph/parser.py:9837-9851 — 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:9416` 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–15 lines × 2) code_review_graph/parser.py:17173 — code_review_graph/parser.py:17173-17187 | code_review_graph/parser.py:17197-17210 — 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 (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) code_review_graph/cli.py:2092 — code_review_graph/cli.py:2092-2104 | code_review_graph/cli.py:2123-2135 — 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:2092` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) code_review_graph/graph.py:3536 — code_review_graph/graph.py:3536-3548 | code_review_graph/graph.py:3553-3565 — 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.
  • Duplicated block (13 lines × 2) code_review_graph/parser.py:13908 — code_review_graph/parser.py:13908-13920 | code_review_graph/parser.py:13952-13964 — 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:13908` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×3
  • Duplicated block (9 lines × 2) code_review_graph/parser.py:6340 — code_review_graph/parser.py:6340-6348 | code_review_graph/parser.py:6419-6427 — 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:6340` 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:10002 — code_review_graph/parser.py:10002-10011 | code_review_graph/parser.py:18993-19001 — 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:10002` 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/tools/build.py:890 — code_review_graph/tools/build.py:890-898 | code_review_graph/tools/build.py:904-912 — 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 (8 lines × 2) · ×3
  • Duplicated block (8 lines × 2) code_review_graph/graph.py:2511 — code_review_graph/graph.py:2511-2518 | code_review_graph/graph.py:2550-2557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) code_review_graph/graph.py:3584 — code_review_graph/graph.py:3584-3591 | code_review_graph/graph.py:3604-3611 — 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/parser.py:17190 — code_review_graph/parser.py:17190-17197 | code_review_graph/parser.py:18656-18663 — 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 (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) code_review_graph/parser.py:10418 — code_review_graph/parser.py:10418-10424 | code_review_graph/parser.py:10693-10699 — 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:10428 — code_review_graph/parser.py:10428-10434 | code_review_graph/parser.py:10745-10751 — 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:14949 — code_review_graph/parser.py:14949-14955 | code_review_graph/parser.py:17907-17913 — 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 (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) code_review_graph/cli.py:1476 — code_review_graph/cli.py:1476-1481 | code_review_graph/cli.py:1492-1497 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `code_review_graph/cli.py:1475` calls `add_argument` and `code_review_graph/cli.py:1491` 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/tools/build.py:904 — code_review_graph/tools/build.py:904-909 | code_review_graph/tools/build.py:922-927 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) code_review_graph/graph.py:821 — code_review_graph/graph.py:821-826 | code_review_graph/graph.py:1047-1052 — 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:821` 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) · ×3
  • Duplicated block (5 lines × 2) code_review_graph/spring_resolver.py:173 — code_review_graph/spring_resolver.py:173-177 | code_review_graph/temporal_resolver.py:178-182 — 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 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) scripts/auto_promote.py:159 — scripts/auto_promote.py:159-163 | scripts/promotion_gate.py:231-235 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) scripts/auto_promote.py:1235 — scripts/auto_promote.py:1235-1239 | scripts/auto_promote.py:1256-1260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `scripts/auto_promote.py:1262` calls `add_parser` and `scripts/auto_promote.py:1240` 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.
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:637 — 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:577 — 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×2
  • Repeated repair: code_review_graph/daemon.py code_review_graph/daemon.py:1137 — code_review_graph/daemon.py changed 9 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is WatchDaemon.reconcile at line 1137), 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: “Merge origin/staging; fix the review findings on #262”; “fix: report what is wrong instead of a false all-clear or a traceback”; “fix(watch): discover directories by polling, not by directory events”; “fix(watch): stop watching ignored trees and never stall silently”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01: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/eval/runner.py code_review_graph/eval/runner.py:268 — code_review_graph/eval/runner.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 runner.run_eval at line 268), 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: “Integrate PR #928: fix: read source files as UTF-8 regardless of system locale”; “fix(eval): refuse to check out a target dir that is not its own repository”; “fix(eval): build the vector index so semantic benchmarks can report a number”; “fix(eval): use representative pinned FastAPI commits”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 14:23:35 +01:00' --until='2026-10-15 14:23:35 +01:00' --full-history --no-merges -- code_review_graph/eval/runner.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.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: CodeParser code_review_graph/parser.py:2942 — TooManyMethods — 310 methods. The bar is 30 methods; this is 280 over it, 10.33× 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:691 — TooManyMethods — 99 methods. The bar is 30 methods; this is 69 over it, 3.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) code_review_graph/cli.py:905 — code_review_graph/cli.py:905-924 | code_review_graph/cli.py:946-965 — 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 (20 lines × 2) code_review_graph/skills.py:2492 — code_review_graph/skills.py:2492-2511 | code_review_graph/skills.py:2515-2534 — 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 (17–18 lines × 2) · ×2
  • Duplicated block (17–18 lines × 2) code_review_graph/graph.py:2020 — code_review_graph/graph.py:2020-2037 | code_review_graph/graph.py:2040-2056 — 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 (17–18 lines × 2) code_review_graph/parser.py:10854 — code_review_graph/parser.py:10854-10871 | code_review_graph/parser.py:11094-11110 — 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:10854` 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) · ×2
  • Duplicated block (16 lines × 2) code_review_graph/parser.py:4710 — code_review_graph/parser.py:4710-4725 | code_review_graph/parser.py:4746-4761 — 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:4710` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) code_review_graph/tools/build.py:206 — code_review_graph/tools/build.py:206-221 | code_review_graph/tools/build.py:839-854 — 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:225` calls `perf_counter` and `code_review_graph/tools/build.py:856` 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 (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) code_review_graph/graph.py:2490 — code_review_graph/graph.py:2490-2500 | code_review_graph/graph.py:2530-2540 — 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:2490` 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/parser.py:10443 — code_review_graph/parser.py:10443-10453 | code_review_graph/parser.py:10756-10766 — 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 lines × 2) · ×2
  • Duplicated block (10 lines × 2) code_review_graph/graph.py:1584 — code_review_graph/graph.py:1584-1593 | code_review_graph/graph.py:1633-1642 — 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:765 — code_review_graph/incremental.py:765-774 | code_review_graph/incremental.py:778-787 — 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 × 3) · ×2
  • Duplicated block (9 lines × 3) code_review_graph/daemon.py:325 — code_review_graph/daemon.py:325-333 | 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/parser.py:3670 — code_review_graph/parser.py:3670-3678 | code_review_graph/parser.py:4020-4028 | code_review_graph/parser.py:4923-4931 — 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:3670` 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:2462 — code_review_graph/parser.py:2462-2468 | code_review_graph/parser.py:11844-11851 — 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:2012 — code_review_graph/refactor.py:2012-2019 | code_review_graph/refactor.py:2022-2028 — 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.
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:603 — code-review-graph-vscode/src/extension.ts:603 · 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 168) · ×1
  • query.query_graph (cyclomatic 168) code_review_graph/tools/query.py:433 — query.query_graph has cyclomatic complexity 168 (threshold 15). To reduce it, separate the cases: extract each independent branch into its 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 164) · ×1
  • cli._dispatch (cyclomatic 164) code_review_graph/cli.py:1663 — cli._dispatch has cyclomatic complexity 164 (threshold 15). To reduce it, separate the cases: extract each independent branch into its 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 126) · ×1
  • CodeParser._get_name (cyclomatic 126) code_review_graph/parser.py:17010 — CodeParser._get_name has cyclomatic complexity 126 (threshold 15). To reduce it, separate the cases: extract each independent branch into its 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:17807 — 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 104) · ×1
  • CodeParser._extract_import (cyclomatic 104) code_review_graph/parser.py:18158 — CodeParser._extract_import has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent branch into its 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 86) · ×1
  • refactor.find_dead_code (cyclomatic 86) code_review_graph/refactor.py:1904 — refactor.find_dead_code has cyclomatic complexity 86 (threshold 15). To reduce it, separate the cases: extract each independent branch into its 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 77) · ×1
  • CodeParser._get_call_name (cyclomatic 77) code_review_graph/parser.py:18477 — CodeParser._get_call_name has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its 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 76) · ×1
  • CodeParser._do_resolve_module (cyclomatic 76) code_review_graph/parser.py:15567 — CodeParser._do_resolve_module has cyclomatic complexity 76 (threshold 15). To reduce it, separate the cases: extract each independent branch into its 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 76) · ×1
  • extension.registerCommands (cyclomatic 76) code-review-graph-vscode/src/extension.ts:80 — extension.registerCommands has cyclomatic complexity 76 (threshold 15). Most of this is not in the body itself: 1 of the 76 points is its own statement and the rest belongs to 18 function literals inside it that branch (lines 649, 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_verilog_constructs (cyclomatic 68) · ×1
  • CodeParser._extract_verilog_constructs (cyclomatic 68) code_review_graph/parser.py:14166 — 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_functions (cyclomatic 64) · ×1
  • CodeParser._extract_functions (cyclomatic 64) code_review_graph/parser.py:11812 — CodeParser._extract_functions 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:4563 — 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 · GraphStore._resolve_bare_endpoints (cyclomatic 61) · ×1
  • GraphStore._resolve_bare_endpoints (cyclomatic 61) code_review_graph/graph.py:2117 — GraphStore._resolve_bare_endpoints 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:9072 — 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:12449 — 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:15280 — 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 · CodeParser._extract_from_tree (cyclomatic 52) · ×1
  • CodeParser._extract_from_tree (cyclomatic 52) code_review_graph/parser.py:7731 — 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 · cli._handle_init (cyclomatic 51) · ×1
  • cli._handle_init (cyclomatic 51) code_review_graph/cli.py:287 — cli._handle_init has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeParser._extract_calls (cyclomatic 51) · ×1
  • CodeParser._extract_calls (cyclomatic 51) code_review_graph/parser.py:12188 — CodeParser._extract_calls has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · incremental.incremental_update (cyclomatic 50) · ×1
  • incremental.incremental_update (cyclomatic 50) code_review_graph/incremental.py:1889 — incremental.incremental_update 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 · CodeParser._resolve_call_targets (cyclomatic 49) · ×1
  • CodeParser._resolve_call_targets (cyclomatic 49) code_review_graph/parser.py:5258 — CodeParser._resolve_call_targets 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 · skills.install_platform_configs (cyclomatic 49) · ×1
  • skills.install_platform_configs (cyclomatic 49) code_review_graph/skills.py:1009 — 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 · search.hybrid_search (cyclomatic 44) · ×1
  • search.hybrid_search (cyclomatic 44) code_review_graph/search.py:868 — search.hybrid_search has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 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:591 — _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 · CodeParser._parse_vbnet (cyclomatic 42) · ×1
  • CodeParser._parse_vbnet (cyclomatic 42) code_review_graph/parser.py:4140 — 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._extract_bytes (cyclomatic 41) · ×1
  • CodeParser._extract_bytes (cyclomatic 41) code_review_graph/parser.py:3191 — CodeParser._extract_bytes 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._typed_bindings_from_node (cyclomatic 39) · ×1
  • CodeParser._typed_bindings_from_node (cyclomatic 39) code_review_graph/parser.py:5887 — CodeParser._typed_bindings_from_node 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 · build._compute_summaries (cyclomatic 38) · ×1
  • build._compute_summaries (cyclomatic 38) code_review_graph/tools/build.py:380 — build._compute_summaries 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 · GraphStore.get_transitive_tests (cyclomatic 36) · ×1
  • GraphStore.get_transitive_tests (cyclomatic 36) code_review_graph/graph.py:1269 — GraphStore.get_transitive_tests has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its 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 36) · ×1
  • GraphStore.get_caller_test_routes (cyclomatic 36) code_review_graph/graph.py:1487 — GraphStore.get_caller_test_routes has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · auto_promote.decide (cyclomatic 36) · ×1
  • auto_promote.decide (cyclomatic 36) scripts/auto_promote.py:545 — auto_promote.decide has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CodeParser._extract_classes (cyclomatic 35) · ×1
  • CodeParser._extract_classes (cyclomatic 35) code_review_graph/parser.py:11635 — CodeParser._extract_classes 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 · CodeParser._go_receiver_binding_index (cyclomatic 33) · ×1
  • CodeParser._go_receiver_binding_index (cyclomatic 33) code_review_graph/parser.py:17395 — 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 · audit_python_imports._file_facts (cyclomatic 33) · ×1
  • audit_python_imports._file_facts (cyclomatic 33) scripts/audit_python_imports.py:385 — audit_python_imports._file_facts 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 · CodeParser._collect_file_scope (cyclomatic 32) · ×1
  • CodeParser._collect_file_scope (cyclomatic 32) code_review_graph/parser.py:14507 — CodeParser._collect_file_scope 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 · refactor._rename_edits (cyclomatic 32) · ×1
  • refactor._rename_edits (cyclomatic 32) code_review_graph/refactor.py:1726 — refactor._rename_edits 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 · temporal_resolver.resolve_temporal_calls (cyclomatic 32) · ×1
  • temporal_resolver.resolve_temporal_calls (cyclomatic 32) code_review_graph/temporal_resolver.py:31 — temporal_resolver.resolve_temporal_calls 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:872 — 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:1875 — 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 · changes.analyze_changes (cyclomatic 30) · ×1
  • changes.analyze_changes (cyclomatic 30) code_review_graph/changes.py:655 — changes.analyze_changes has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CodeParser._rust_project_context (cyclomatic 30) · ×1
  • CodeParser._rust_project_context (cyclomatic 30) code_review_graph/parser.py:16340 — 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 · skills._merge_yaml_mcp_server (cyclomatic 30) · ×1
  • skills._merge_yaml_mcp_server (cyclomatic 30) code_review_graph/skills.py:757 — 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:203 — 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_ansible_tasks (cyclomatic 29) · ×1
  • CodeParser._parse_ansible_tasks (cyclomatic 29) code_review_graph/parser.py:7500 — 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._emit_spring_field_injection (cyclomatic 29) · ×1
  • CodeParser._emit_spring_field_injection (cyclomatic 29) code_review_graph/parser.py:10570 — CodeParser._emit_spring_field_injection 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 · scoped_resolver.resolve_scoped_calls (cyclomatic 29) · ×1
  • scoped_resolver.resolve_scoped_calls (cyclomatic 29) code_review_graph/scoped_resolver.py:249 — scoped_resolver.resolve_scoped_calls 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 · OpenAIEmbeddingProvider._call_api (cyclomatic 28) · ×1
  • OpenAIEmbeddingProvider._call_api (cyclomatic 28) REDACTED:442 — 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 · jedi_resolver.enrich_jedi_calls (cyclomatic 28) · ×1
  • jedi_resolver.enrich_jedi_calls (cyclomatic 28) code_review_graph/jedi_resolver.py:27 — jedi_resolver.enrich_jedi_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 · CodeParser._parse_svelte (cyclomatic 28) · ×1
  • CodeParser._parse_svelte (cyclomatic 28) code_review_graph/parser.py:3688 — 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._extract_solidity_constructs (cyclomatic 28) · ×1
  • CodeParser._extract_solidity_constructs (cyclomatic 28) code_review_graph/parser.py:13843 — 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:2006 — 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:1528 — 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 · spring_resolver.resolve_spring_di_calls (cyclomatic 28) · ×1
  • spring_resolver.resolve_spring_di_calls (cyclomatic 28) code_review_graph/spring_resolver.py:30 — spring_resolver.resolve_spring_di_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 · 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 · neighbourhood.extract (cyclomatic 27) · ×1
  • neighbourhood.extract (cyclomatic 27) code_review_graph/neighbourhood.py:468 — neighbourhood.extract 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:3576 — 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._extract_elixir_constructs (cyclomatic 27) · ×1
  • CodeParser._extract_elixir_constructs (cyclomatic 27) code_review_graph/parser.py:8075 — CodeParser._extract_elixir_constructs 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:11388 — 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:16792 — 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 · _JsScan.run (cyclomatic 27) · ×1
  • _JsScan.run (cyclomatic 27) code_review_graph/refactor.py:1118 — _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:793 — _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 · query.get_impact_radius (cyclomatic 26) · ×1
  • query.get_impact_radius (cyclomatic 26) code_review_graph/tools/query.py:204 — query.get_impact_radius 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 · VoyageEmbeddingProvider._call_api (cyclomatic 25) · ×1
  • VoyageEmbeddingProvider._call_api (cyclomatic 25) REDACTED:677 — 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:98 — 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:164 — 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 · CodeParser._mask_cpp_qt_macros (cyclomatic 25) · ×1
  • CodeParser._mask_cpp_qt_macros (cyclomatic 25) code_review_graph/parser.py:3431 — CodeParser._mask_cpp_qt_macros 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 · build.build_or_update_graph (cyclomatic 25) · ×1
  • build.build_or_update_graph (cyclomatic 25) code_review_graph/tools/build.py:608 — build.build_or_update_graph 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:213 — 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 · context.get_minimal_context (cyclomatic 24) · ×1
  • context.get_minimal_context (cyclomatic 24) code_review_graph/tools/context.py:28 — 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 · review.get_review_context (cyclomatic 24) · ×1
  • review.get_review_context (cyclomatic 24) code_review_graph/tools/review.py:426 — review.get_review_context 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 · GraphStore._get_impact_radius_networkx (cyclomatic 23) · ×1
  • GraphStore._get_impact_radius_networkx (cyclomatic 23) code_review_graph/graph.py:3017 — 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:4038 — 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:879 — 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 · rescript_resolver.resolve_rescript_cross_module (cyclomatic 23) · ×1
  • rescript_resolver.resolve_rescript_cross_module (cyclomatic 23) code_review_graph/rescript_resolver.py:36 — rescript_resolver.resolve_rescript_cross_module 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:307 — 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 · audit_python_imports._attribution_is_justified (cyclomatic 23) · ×1
  • audit_python_imports._attribution_is_justified (cyclomatic 23) scripts/audit_python_imports.py:630 — audit_python_imports._attribution_is_justified 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 · exports.export_obsidian_vault (cyclomatic 22) · ×1
  • exports.export_obsidian_vault (cyclomatic 22) code_review_graph/exports.py:266 — exports.export_obsidian_vault 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:9857 — 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 · python_resolver.resolve_python_imports (cyclomatic 22) · ×1
  • python_resolver.resolve_python_imports (cyclomatic 22) code_review_graph/python_resolver.py:15 — python_resolver.resolve_python_imports 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:297 — 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 · promotion_gate.render_summary (cyclomatic 22) · ×1
  • promotion_gate.render_summary (cyclomatic 22) scripts/promotion_gate.py:579 — promotion_gate.render_summary 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 · hcl_resolver.resolve_hcl_module_references (cyclomatic 21) · ×1
  • hcl_resolver.resolve_hcl_module_references (cyclomatic 21) code_review_graph/hcl_resolver.py:15 — hcl_resolver.resolve_hcl_module_references 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:90 — 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:3903 — 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 · refactor.apply_refactor (cyclomatic 21) · ×1
  • refactor.apply_refactor (cyclomatic 21) code_review_graph/refactor.py:2472 — refactor.apply_refactor 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 · uninstall._clean_hook_data (cyclomatic 21) · ×1
  • uninstall._clean_hook_data (cyclomatic 21) code_review_graph/uninstall.py:455 — uninstall._clean_hook_data 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._resolve_julia_call_targets (cyclomatic 20) · ×1
  • CodeParser._resolve_julia_call_targets (cyclomatic 20) code_review_graph/parser.py:5551 — 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:8389 — 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:9512 — 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 · render_pr_comment.render_markdown (cyclomatic 20) · ×1
  • render_pr_comment.render_markdown (cyclomatic 20) scripts/render_pr_comment.py:317 — render_pr_comment.render_markdown 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 · 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 · communities._split_oversized (cyclomatic 19) · ×1
  • communities._split_oversized (cyclomatic 19) code_review_graph/communities.py:565 — 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:198 — 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 · CodeParser._parse_ansible_playbook (cyclomatic 19) · ×1
  • CodeParser._parse_ansible_playbook (cyclomatic 19) code_review_graph/parser.py:7384 — 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:11300 — 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:13064 — 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 · CodeParser._resolve_rust_module_file (cyclomatic 19) · ×1
  • CodeParser._resolve_rust_module_file (cyclomatic 19) code_review_graph/parser.py:16471 — CodeParser._resolve_rust_module_file 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:561 — _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:1302 — _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:1917 — 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:160 — 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:110 — 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 · review._file_regions (cyclomatic 19) · ×1
  • review._file_regions (cyclomatic 19) code_review_graph/tools/review.py:264 — 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 · render_pr_comment._gaps_section (cyclomatic 19) · ×1
  • render_pr_comment._gaps_section (cyclomatic 19) scripts/render_pr_comment.py:238 — render_pr_comment._gaps_section 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._reassign_test_nodes (cyclomatic 18) · ×1
  • communities._reassign_test_nodes (cyclomatic 18) code_review_graph/communities.py:262 — 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:1094 — 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 · neighbourhood._select_within_budget (cyclomatic 18) · ×1
  • neighbourhood._select_within_budget (cyclomatic 18) code_review_graph/neighbourhood.py:406 — 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._parse_notebook (cyclomatic 18) · ×1
  • CodeParser._parse_notebook (cyclomatic 18) code_review_graph/parser.py:3819 — 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._emit_spring_config_edges (cyclomatic 18) · ×1
  • CodeParser._emit_spring_config_edges (cyclomatic 18) code_review_graph/parser.py:10460 — 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._get_csharp_receiver_method (cyclomatic 18) · ×1
  • CodeParser._get_csharp_receiver_method (cyclomatic 18) code_review_graph/parser.py:12614 — CodeParser._get_csharp_receiver_method 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:14031 — 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:600 — 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:192 — 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 · auto_promote.normalise_reports (cyclomatic 18) · ×1
  • auto_promote.normalise_reports (cyclomatic 18) scripts/auto_promote.py:197 — auto_promote.normalise_reports 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._cpp_function_identity (cyclomatic 17) · ×1
  • CodeParser._cpp_function_identity (cyclomatic 17) code_review_graph/parser.py:17552 — 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:206 — 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:750 — 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 · scoped_resolver._scope_and_method (cyclomatic 17) · ×1
  • scoped_resolver._scope_and_method (cyclomatic 17) code_review_graph/scoped_resolver.py:195 — scoped_resolver._scope_and_method 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 · build.run_postprocess (cyclomatic 17) · ×1
  • build.run_postprocess (cyclomatic 17) code_review_graph/tools/build.py:801 — build.run_postprocess 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:727 — 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 · communities._detect_leiden (cyclomatic 16) · ×1
  • communities._detect_leiden (cyclomatic 16) code_review_graph/communities.py:354 — communities._detect_leiden 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 · 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.full_build (cyclomatic 16) · ×1
  • incremental.full_build (cyclomatic 16) code_review_graph/incremental.py:1744 — incremental.full_build 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:10928 — 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:11583 — 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:840 — 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:1414 — 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 · review._risk_by_file (cyclomatic 16) · ×1
  • review._risk_by_file (cyclomatic 16) code_review_graph/tools/review.py:184 — 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 · review.detect_changes_func (cyclomatic 16) · ×1
  • review.detect_changes_func (cyclomatic 16) code_review_graph/tools/review.py:932 — review.detect_changes_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 · TsconfigResolver._strip_jsonc_comments (cyclomatic 16) · ×1
  • TsconfigResolver._strip_jsonc_comments (cyclomatic 16) code_review_graph/tsconfig_resolver.py:155 — 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 · visualization._aggregate_file (cyclomatic 16) · ×1
  • visualization._aggregate_file (cyclomatic 16) code_review_graph/visualization.py:411 — visualization._aggregate_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 · auto_promote.gate_verdict (cyclomatic 16) · ×1
  • auto_promote.gate_verdict (cyclomatic 16) scripts/auto_promote.py:470 — auto_promote.gate_verdict 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:439 — 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 407) · ×1
  • CodeParser._get_name (cognitive 407) code_review_graph/parser.py:17010 — CodeParser._get_name has cognitive complexity 407 (threshold 15). Drivers by points: if/else 76 (258 pts), loops 35 (135 pts), boolean chains 14 (nesting depth added 282). 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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_bases (cognitive 364) · ×1
  • CodeParser._get_bases (cognitive 364) code_review_graph/parser.py:17807 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 357) · ×1
  • query.query_graph (cognitive 357) code_review_graph/tools/query.py:433 — query.query_graph has cognitive complexity 357 (threshold 15). Drivers by points: if/else 86 (238 pts), loops 28 (67 pts), boolean chains 27, ternaries 11 (25 pts) (nesting depth added 205). 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 · cli._dispatch (cognitive 339) · ×1
  • cli._dispatch (cognitive 339) code_review_graph/cli.py:1663 — cli._dispatch has cognitive complexity 339 (threshold 15). Drivers by points: if/else 108 (223 pts), ternaries 23 (59 pts), boolean chains 25, error handling 8 (22 pts), loops 3 (10 pts) (nesting depth added 172). 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 234) · ×1
  • CodeParser._extract_import (cognitive 234) code_review_graph/parser.py:18158 — CodeParser._extract_import has cognitive complexity 234 (threshold 15). Drivers by points: if/else 47 (165 pts), loops 20 (55 pts), ternaries 2 (9 pts), boolean chains 5 (nesting depth added 160). 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 195) · ×1
  • refactor.find_dead_code (cognitive 195) code_review_graph/refactor.py:1904 — refactor.find_dead_code has cognitive complexity 195 (threshold 15). Drivers by points: if/else 52 (143 pts), boolean chains 22, loops 7 (18 pts), ternaries 4 (7 pts), error handling 1 (5 pts) (nesting depth added 109). 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_julia_constructs (cognitive 181) · ×1
  • CodeParser._extract_julia_constructs (cognitive 181) code_review_graph/parser.py:9072 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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._do_resolve_module (cognitive 175) · ×1
  • CodeParser._do_resolve_module (cognitive 175) code_review_graph/parser.py:15567 — CodeParser._do_resolve_module has cognitive complexity 175 (threshold 15). Drivers by points: if/else 45 (121 pts), loops 10 (28 pts), error handling 7 (18 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 106). 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 157) · ×1
  • CodeParser._get_call_name (cognitive 157) code_review_graph/parser.py:18477 — CodeParser._get_call_name has cognitive complexity 157 (threshold 15). Drivers by points: if/else 49 (107 pts), loops 14 (37 pts), boolean chains 13 (nesting depth added 81). To reduce it, split the body into named stages: move each independent 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:14166 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 128) · ×1
  • CodeParser._resolve_call_targets (cognitive 128) code_review_graph/parser.py:5258 — CodeParser._resolve_call_targets has cognitive complexity 128 (threshold 15). Drivers by points: if/else 29 (85 pts), loops 6 (19 pts), boolean chains 13, ternaries 2 (11 pts) (nesting depth added 78). 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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_platform_configs (cognitive 124) · ×1
  • skills.install_platform_configs (cognitive 124) code_review_graph/skills.py:1009 — skills.install_platform_configs has cognitive complexity 124 (threshold 15). Drivers by points: if/else 38 (92 pts), ternaries 5 (15 pts), boolean chains 9, 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 · CodeParser._collect_import_names (cognitive 116) · ×1
  • CodeParser._collect_import_names (cognitive 116) code_review_graph/parser.py:15280 — CodeParser._collect_import_names has cognitive complexity 116 (threshold 15). Drivers by points: if/else 24 (81 pts), loops 7 (17 pts), boolean chains 9, ternaries 3 (9 pts) (nesting depth added 73). 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:4563 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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._resolve_bare_endpoints (cognitive 111) · ×1
  • GraphStore._resolve_bare_endpoints (cognitive 111) code_review_graph/graph.py:2117 — GraphStore._resolve_bare_endpoints has cognitive complexity 111 (threshold 15). Drivers by points: if/else 28 (51 pts), loops 14 (29 pts), ternaries 4 (12 pts), boolean chains 11, error handling 4 (8 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch 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_functions (cognitive 100) · ×1
  • CodeParser._extract_functions (cognitive 100) code_review_graph/parser.py:11812 — CodeParser._extract_functions has cognitive complexity 100 (threshold 15). Drivers by points: if/else 39 (70 pts), loops 6 (14 pts), boolean chains 12, ternaries 4 (nesting depth added 39). To reduce it, split the body into named stages: move each independent 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 · extension.registerCommands (cognitive 89) · ×1
  • extension.registerCommands (cognitive 89) code-review-graph-vscode/src/extension.ts:80 — extension.registerCommands has cognitive complexity 89 (threshold 15). Drivers by points: if/else 65 (72 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 89 points belong to 18 function literals inside it that branch (lines 649, 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_caller_test_routes (cognitive 88) · ×1
  • GraphStore.get_caller_test_routes (cognitive 88) code_review_graph/graph.py:1487 — GraphStore.get_caller_test_routes has cognitive complexity 88 (threshold 15). Drivers by points: if/else 20 (57 pts), loops 12 (28 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._emit_kafka_edges_from_class (cognitive 86) · ×1
  • CodeParser._emit_kafka_edges_from_class (cognitive 86) code_review_graph/parser.py:11388 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:4140 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:7731 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:12449 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 78) · ×1
  • cli._handle_init (cognitive 78) code_review_graph/cli.py:287 — cli._handle_init has cognitive complexity 78 (threshold 15). Drivers by points: if/else 30 (48 pts), boolean chains 12, error handling 4 (8 pts), loops 3 (7 pts), ternaries 2 (3 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.
D2 · Cognitive Complexity · incremental.incremental_update (cognitive 78) · ×1
  • incremental.incremental_update (cognitive 78) code_review_graph/incremental.py:1889 — incremental.incremental_update has cognitive complexity 78 (threshold 15). Drivers by points: if/else 20 (35 pts), error handling 5 (14 pts), boolean chains 11, ternaries 10, loops 5 (8 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.
D2 · Cognitive Complexity · search.hybrid_search (cognitive 78) · ×1
  • search.hybrid_search (cognitive 78) code_review_graph/search.py:868 — search.hybrid_search has cognitive complexity 78 (threshold 15). Drivers by points: if/else 27 (58 pts), boolean chains 8, ternaries 3 (6 pts), loops 4 (5 pts), error handling 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch 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 77) · ×1
  • CodeParser._extract_calls (cognitive 77) code_review_graph/parser.py:12188 — CodeParser._extract_calls has cognitive complexity 77 (threshold 15). Drivers by points: if/else 22 (47 pts), boolean chains 23, ternaries 3 (7 pts) (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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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_transitive_tests (cognitive 73) · ×1
  • GraphStore.get_transitive_tests (cognitive 73) code_review_graph/graph.py:1269 — GraphStore.get_transitive_tests has cognitive complexity 73 (threshold 15). Drivers by points: if/else 16 (45 pts), loops 10 (19 pts), boolean chains 4, ternaries 3, error handling 1 (2 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch 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:1528 — 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:3688 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:3576 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 · audit_python_imports._file_facts (cognitive 70) · ×1
  • audit_python_imports._file_facts (cognitive 70) scripts/audit_python_imports.py:385 — audit_python_imports._file_facts has cognitive complexity 70 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 9 (21 pts), ternaries 2 (8 pts), boolean chains 4, error handling 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch 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._compute_summaries (cognitive 69) · ×1
  • build._compute_summaries (cognitive 69) code_review_graph/tools/build.py:380 — build._compute_summaries has cognitive complexity 69 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 14 (21 pts), ternaries 4 (10 pts), error handling 3, boolean chains 2 (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._go_receiver_binding_index (cognitive 63) · ×1
  • CodeParser._go_receiver_binding_index (cognitive 63) code_review_graph/parser.py:17395 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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._typed_bindings_from_node (cognitive 62) · ×1
  • CodeParser._typed_bindings_from_node (cognitive 62) code_review_graph/parser.py:5887 — CodeParser._typed_bindings_from_node has cognitive complexity 62 (threshold 15). Drivers by points: if/else 17 (46 pts), boolean chains 12, loops 2 (4 pts) (nesting depth added 31). 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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.resolve_cpp_scoped_call_targets (cognitive 61) · ×1
  • GraphStore.resolve_cpp_scoped_call_targets (cognitive 61) code_review_graph/graph.py:1875 — 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 · CodeParser._extract_solidity_constructs (cognitive 61) · ×1
  • CodeParser._extract_solidity_constructs (cognitive 61) code_review_graph/parser.py:13843 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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_file_scope (cognitive 61) · ×1
  • CodeParser._collect_file_scope (cognitive 61) code_review_graph/parser.py:14507 — CodeParser._collect_file_scope has cognitive complexity 61 (threshold 15). Drivers by points: if/else 15 (38 pts), boolean chains 10, loops 4 (10 pts), ternaries 1 (3 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 60) · ×1
  • CodeParser._emit_spring_field_injection (cognitive 60) code_review_graph/parser.py:10570 — CodeParser._emit_spring_field_injection has cognitive complexity 60 (threshold 15). Drivers by points: if/else 11 (36 pts), loops 7 (21 pts), boolean chains 3 (nesting depth added 39). To reduce it, split the body into named stages: move each independent 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:2006 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:7500 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 58) · ×1
  • CodeParser._extract_classes (cognitive 58) code_review_graph/parser.py:11635 — CodeParser._extract_classes has cognitive complexity 58 (threshold 15). Drivers by points: if/else 24 (40 pts), loops 4 (9 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:10460 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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._mask_cpp_qt_macros (cognitive 56) · ×1
  • CodeParser._mask_cpp_qt_macros (cognitive 56) code_review_graph/parser.py:3431 — CodeParser._mask_cpp_qt_macros has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (38 pts), loops 3 (7 pts), ternaries 2 (6 pts), boolean chains 5 (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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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_exported_symbol (cognitive 56) · ×1
  • CodeParser._resolve_exported_symbol (cognitive 56) code_review_graph/parser.py:16792 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:591 — _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 · refactor._rename_edits (cognitive 55) · ×1
  • refactor._rename_edits (cognitive 55) code_review_graph/refactor.py:1726 — refactor._rename_edits has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 8 (14 pts), boolean chains 7, 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 · 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:442 — 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 · jedi_resolver.enrich_jedi_calls (cognitive 53) · ×1
  • jedi_resolver.enrich_jedi_calls (cognitive 53) code_review_graph/jedi_resolver.py:27 — jedi_resolver.enrich_jedi_calls has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (34 pts), error handling 5 (11 pts), loops 4 (6 pts), boolean chains 1, ternaries 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 · CodeParser._extract_bytes (cognitive 53) · ×1
  • CodeParser._extract_bytes (cognitive 53) code_review_graph/parser.py:3191 — CodeParser._extract_bytes has cognitive complexity 53 (threshold 15). Drivers by points: if/else 31 (43 pts), boolean chains 4, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 52) · ×1
  • temporal_resolver.resolve_temporal_calls (cognitive 52) code_review_graph/temporal_resolver.py:31 — temporal_resolver.resolve_temporal_calls has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 6, error handling 3 (6 pts), loops 5, 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 · scoped_resolver.resolve_scoped_calls (cognitive 51) · ×1
  • scoped_resolver.resolve_scoped_calls (cognitive 51) code_review_graph/scoped_resolver.py:249 — scoped_resolver.resolve_scoped_calls has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (38 pts), error handling 2 (5 pts), loops 4 (5 pts), boolean chains 3 (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 · jsonc.tokenize (cognitive 50) · ×1
  • jsonc.tokenize (cognitive 50) code_review_graph/jsonc.py:90 — 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 · VoyageEmbeddingProvider._call_api (cognitive 49) · ×1
  • VoyageEmbeddingProvider._call_api (cognitive 49) REDACTED:677 — 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._emit_temporal_stub_fields (cognitive 49) · ×1
  • CodeParser._emit_temporal_stub_fields (cognitive 49) code_review_graph/parser.py:11300 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:3017 — 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._get_kafka_annotation_topics (cognitive 47) · ×1
  • CodeParser._get_kafka_annotation_topics (cognitive 47) code_review_graph/parser.py:11358 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 46) · ×1
  • spring_resolver.resolve_spring_di_calls (cognitive 46) code_review_graph/spring_resolver.py:30 — spring_resolver.resolve_spring_di_calls has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 5, loops 5, error handling 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:872 — 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 · CodeParser._parse_databricks_py_notebook (cognitive 45) · ×1
  • CodeParser._parse_databricks_py_notebook (cognitive 45) code_review_graph/parser.py:4038 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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_elixir_constructs (cognitive 45) · ×1
  • CodeParser._extract_elixir_constructs (cognitive 45) code_review_graph/parser.py:8075 — CodeParser._extract_elixir_constructs has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 4 (7 pts), ternaries 3 (5 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:164 — 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 · CodeParser._rust_project_context (cognitive 43) · ×1
  • CodeParser._rust_project_context (cognitive 43) code_review_graph/parser.py:16340 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:793 — _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:1118 — _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:757 — 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:3903 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 · CodeParser._handle_zig_var_decl (cognitive 41) · ×1
  • CodeParser._handle_zig_var_decl (cognitive 41) code_review_graph/parser.py:9857 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 · build.build_or_update_graph (cognitive 41) · ×1
  • build.build_or_update_graph (cognitive 41) code_review_graph/tools/build.py:608 — build.build_or_update_graph has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 4 (8 pts), boolean chains 5, error handling 1 (2 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 · review.get_review_context (cognitive 41) · ×1
  • review.get_review_context (cognitive 41) code_review_graph/tools/review.py:426 — review.get_review_context has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 5, error handling 2 (4 pts), loops 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.
D2 · Cognitive Complexity · uninstall._clean_hook_data (cognitive 41) · ×1
  • uninstall._clean_hook_data (cognitive 41) code_review_graph/uninstall.py:455 — uninstall._clean_hook_data has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (6 pts), boolean chains 5, 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 · auto_promote.decide (cognitive 41) · ×1
  • auto_promote.decide (cognitive 41) scripts/auto_promote.py:545 — auto_promote.decide has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 11, ternaries 3 (4 pts) (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.
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:11170 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:15465 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 · changes.analyze_changes (cognitive 39) · ×1
  • changes.analyze_changes (cognitive 39) code_review_graph/changes.py:655 — changes.analyze_changes has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 6, loops 4 (6 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · exports.export_obsidian_vault (cognitive 39) · ×1
  • exports.export_obsidian_vault (cognitive 39) code_review_graph/exports.py:266 — exports.export_obsidian_vault has cognitive complexity 39 (threshold 15). Drivers by points: loops 11 (19 pts), if/else 7 (18 pts), boolean chains 2 (nesting depth added 19). 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 · incremental.full_build (cognitive 39) · ×1
  • incremental.full_build (cognitive 39) code_review_graph/incremental.py:1744 — incremental.full_build has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (26 pts), error handling 2 (6 pts), loops 2 (4 pts), boolean chains 3 (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 · CodeParser._parse_ansible_playbook (cognitive 39) · ×1
  • CodeParser._parse_ansible_playbook (cognitive 39) code_review_graph/parser.py:7384 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 · enrich._format_node_context (cognitive 38) · ×1
  • enrich._format_node_context (cognitive 38) code_review_graph/enrich.py:98 — 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 · CodeParser._handle_lua_variable_declaration (cognitive 38) · ×1
  • CodeParser._handle_lua_variable_declaration (cognitive 38) code_review_graph/parser.py:9512 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:840 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:2512 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 · daemon_cli._handle_status (cognitive 37) · ×1
  • daemon_cli._handle_status (cognitive 37) code_review_graph/daemon_cli.py:198 — 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 · promotion_gate.render_summary (cognitive 37) · ×1
  • promotion_gate.render_summary (cognitive 37) scripts/promotion_gate.py:579 — promotion_gate.render_summary has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 4 (10 pts), loops 4 (9 pts), boolean chains 6 (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_dart_calls_from_children (cognitive 36) · ×1
  • CodeParser._extract_dart_calls_from_children (cognitive 36) code_review_graph/parser.py:8737 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:18803 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:203 — 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 · neighbourhood.extract (cognitive 35) · ×1
  • neighbourhood.extract (cognitive 35) code_review_graph/neighbourhood.py:468 — neighbourhood.extract has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (21 pts), loops 4 (5 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · python_resolver.resolve_python_imports (cognitive 35) · ×1
  • python_resolver.resolve_python_imports (cognitive 35) code_review_graph/python_resolver.py:15 — python_resolver.resolve_python_imports has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (3 pts), error handling 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 · _JsScan.visit_import (cognitive 35) · ×1
  • _JsScan.visit_import (cognitive 35) code_review_graph/refactor.py:1302 — _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 · CodeParser._get_jsx_component_reference (cognitive 34) · ×1
  • CodeParser._get_jsx_component_reference (cognitive 34) code_review_graph/parser.py:18713 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:2320 — 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:1917 — 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:213 — 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:565 — 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 · hcl_resolver.resolve_hcl_module_references (cognitive 33) · ×1
  • hcl_resolver.resolve_hcl_module_references (cognitive 33) code_review_graph/hcl_resolver.py:15 — hcl_resolver.resolve_hcl_module_references has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 4, boolean chains 3, ternaries 1 (3 pts), error handling 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 · incremental._load_ignore_patterns (cognitive 33) · ×1
  • incremental._load_ignore_patterns (cognitive 33) code_review_graph/incremental.py:544 — incremental._load_ignore_patterns has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (28 pts), boolean chains 3, 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._parse_notebook (cognitive 33) · ×1
  • CodeParser._parse_notebook (cognitive 33) code_review_graph/parser.py:3819 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:5551 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:13064 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:879 — 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:600 — 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 · query.get_impact_radius (cognitive 33) · ×1
  • query.get_impact_radius (cognitive 33) code_review_graph/tools/query.py:204 — query.get_impact_radius has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · incremental._scan_nested_output_dirs (cognitive 32) · ×1
  • incremental._scan_nested_output_dirs (cognitive 32) code_review_graph/incremental.py:637 — incremental._scan_nested_output_dirs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 3 (6 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 · parser._php_attribute_names (cognitive 32) · ×1
  • parser._php_attribute_names (cognitive 32) code_review_graph/parser.py:2563 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 32) · ×1
  • rescript_resolver.resolve_rescript_cross_module (cognitive 32) code_review_graph/rescript_resolver.py:36 — rescript_resolver.resolve_rescript_cross_module has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 6, boolean chains 5, 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 · flows_tools.get_flow (cognitive 32) · ×1
  • flows_tools.get_flow (cognitive 32) code_review_graph/tools/flows_tools.py:110 — 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 · CodeParser._r_iter_args (cognitive 31) · ×1
  • CodeParser._r_iter_args (cognitive 31) code_review_graph/parser.py:18818 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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_refactor (cognitive 31) · ×1
  • refactor.apply_refactor (cognitive 31) code_review_graph/refactor.py:2472 — refactor.apply_refactor has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 3 (6 pts), loops 5 (6 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 · skills._strip_jsonc (cognitive 31) · ×1
  • skills._strip_jsonc (cognitive 31) code_review_graph/skills.py:891 — 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:184 — 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 · audit_python_imports._attribution_is_justified (cognitive 31) · ×1
  • audit_python_imports._attribution_is_justified (cognitive 31) scripts/audit_python_imports.py:630 — audit_python_imports._attribution_is_justified has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 9, 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 · communities._dedupe_community_names (cognitive 30) · ×1
  • communities._dedupe_community_names (cognitive 30) code_review_graph/communities.py:731 — 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 · neighbourhood._select_within_budget (cognitive 30) · ×1
  • neighbourhood._select_within_budget (cognitive 30) code_review_graph/neighbourhood.py:406 — 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 · review._file_regions (cognitive 30) · ×1
  • review._file_regions (cognitive 30) code_review_graph/tools/review.py:264 — 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 · review.detect_changes_func (cognitive 30) · ×1
  • review.detect_changes_func (cognitive 30) code_review_graph/tools/review.py:932 — review.detect_changes_func has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 2 (6 pts), loops 2 (3 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 · audit_python_imports.audit_imports (cognitive 30) · ×1
  • audit_python_imports.audit_imports (cognitive 30) scripts/audit_python_imports.py:793 — audit_python_imports.audit_imports has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 2 (3 pts), error handling 1 (2 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 · promotion_gate.parse_junit (cognitive 30) · ×1
  • promotion_gate.parse_junit (cognitive 30) scripts/promotion_gate.py:286 — promotion_gate.parse_junit has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 3, loops 2 (3 pts), 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 · SqliteReader.getImpactRadius (cognitive 30) · ×1
  • SqliteReader.getImpactRadius (cognitive 30) code-review-graph-vscode/src/backend/sqlite.ts:439 — 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 · enrich.extract_pattern (cognitive 29) · ×1
  • enrich.extract_pattern (cognitive 29) code_review_graph/enrich.py:30 — 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 · _PyRenameScan._collect_all (cognitive 29) · ×1
  • _PyRenameScan._collect_all (cognitive 29) code_review_graph/refactor.py:561 — _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 · TsconfigResolver._strip_jsonc_comments (cognitive 29) · ×1
  • TsconfigResolver._strip_jsonc_comments (cognitive 29) code_review_graph/tsconfig_resolver.py:155 — 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:262 — 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 · incremental._should_ignore (cognitive 28) · ×1
  • incremental._should_ignore (cognitive 28) code_review_graph/incremental.py:581 — 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 · CodeParser._get_csharp_receiver_method (cognitive 28) · ×1
  • CodeParser._get_csharp_receiver_method (cognitive 28) code_review_graph/parser.py:12614 — CodeParser._get_csharp_receiver_method has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:297 — 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 · incremental._get_svn_changed_files (cognitive 27) · ×1
  • incremental._get_svn_changed_files (cognitive 27) code_review_graph/incremental.py:1170 — 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 · 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_nix_constructs (cognitive 27) · ×1
  • CodeParser._extract_nix_constructs (cognitive 27) code_review_graph/parser.py:8389 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:10051 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:10774 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:206 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:1414 — 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 · CodeParser._emit_kafka_edges_from_method (cognitive 26) · ×1
  • CodeParser._emit_kafka_edges_from_method (cognitive 26) code_review_graph/parser.py:11470 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:13560 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:14031 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:2767 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:2413 — 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 · scoped_resolver._scope_and_method (cognitive 26) · ×1
  • scoped_resolver._scope_and_method (cognitive 26) code_review_graph/scoped_resolver.py:195 — scoped_resolver._scope_and_method has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (23 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 · visualization._aggregate_file (cognitive 26) · ×1
  • visualization._aggregate_file (cognitive 26) code_review_graph/visualization.py:411 — visualization._aggregate_file has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (6 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cli._match_files_to_forget (cognitive 25) · ×1
  • cli._match_files_to_forget (cognitive 25) code_review_graph/cli.py:232 — 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 · parser._read_go_mod (cognitive 25) · ×1
  • parser._read_go_mod (cognitive 25) code_review_graph/parser.py:750 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:2091 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 · build._run_postprocess (cognitive 25) · ×1
  • build._run_postprocess (cognitive 25) code_review_graph/tools/build.py:160 — build._run_postprocess has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 7 (8 pts), boolean chains 2, 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 · context.get_minimal_context (cognitive 25) · ×1
  • context.get_minimal_context (cognitive 25) code_review_graph/tools/context.py:28 — 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 · audit_python_imports._classify_call (cognitive 25) · ×1
  • audit_python_imports._classify_call (cognitive 25) scripts/audit_python_imports.py:559 — audit_python_imports._classify_call has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 2 (7 pts), boolean chains 2 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · render_pr_comment._gaps_section (cognitive 25) · ×1
  • render_pr_comment._gaps_section (cognitive 25) scripts/render_pr_comment.py:238 — render_pr_comment._gaps_section has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 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:9699 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 24) · ×1
  • CodeParser._emit_spring_constructor_injection (cognitive 24) code_review_graph/parser.py:10653 — CodeParser._emit_spring_constructor_injection has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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_type_checking_aliases (cognitive 24) · ×1
  • parser._python_type_checking_aliases (cognitive 24) code_review_graph/parser.py:177 — parser._python_type_checking_aliases has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 pts), boolean chains 5 (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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:1022 — 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 · build.run_postprocess (cognitive 24) · ×1
  • build.run_postprocess (cognitive 24) code_review_graph/tools/build.py:801 — build.run_postprocess has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 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 · review._generate_review_guidance (cognitive 24) · ×1
  • review._generate_review_guidance (cognitive 24) code_review_graph/tools/review.py:727 — 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 · audit_python_imports.audit_calls (cognitive 24) · ×1
  • audit_python_imports.audit_calls (cognitive 24) scripts/audit_python_imports.py:852 — audit_python_imports.audit_calls has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (8 pts), boolean chains 2, error handling 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 · 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.map_changes_to_nodes (cognitive 23) · ×1
  • changes.map_changes_to_nodes (cognitive 23) code_review_graph/changes.py:536 — changes.map_changes_to_nodes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (9 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.
D2 · Cognitive Complexity · communities._detect_leiden (cognitive 23) · ×1
  • communities._detect_leiden (cognitive 23) code_review_graph/communities.py:354 — communities._detect_leiden has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4, 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 · communities._detect_file_based (cognitive 23) · ×1
  • communities._detect_file_based (cognitive 23) code_review_graph/communities.py:474 — 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 · event_resolver.resolve_spring_events (cognitive 23) · ×1
  • event_resolver.resolve_spring_events (cognitive 23) code_review_graph/event_resolver.py:44 — event_resolver.resolve_spring_events has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 5 (8 pts), boolean chains 3, error handling 1 (2 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:2582 — 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 · CodeParser._resolve_rust_module_file (cognitive 23) · ×1
  • CodeParser._resolve_rust_module_file (cognitive 23) code_review_graph/parser.py:16471 — CodeParser._resolve_rust_module_file has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1, 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:16541 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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.traverse_graph_func (cognitive 23) · ×1
  • query.traverse_graph_func (cognitive 23) code_review_graph/tools/query.py:1358 — query.traverse_graph_func has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (5 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 · uninstall._remove_yaml_entry (cognitive 23) · ×1
  • uninstall._remove_yaml_entry (cognitive 23) code_review_graph/uninstall.py:307 — 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 · audit_python_imports._annotation_at_path (cognitive 23) · ×1
  • audit_python_imports._annotation_at_path (cognitive 23) scripts/audit_python_imports.py:347 — audit_python_imports._annotation_at_path has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (4 pts), boolean chains 3, error handling 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 · daemon_cli._handle_stop (cognitive 22) · ×1
  • daemon_cli._handle_stop (cognitive 22) code_review_graph/daemon_cli.py:88 — daemon_cli._handle_stop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (7 pts), error handling 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 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 · CodeParser._preceding_doc_comment (cognitive 22) · ×1
  • CodeParser._preceding_doc_comment (cognitive 22) code_review_graph/parser.py:11583 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 (cognitive 22) · ×1
  • _common._resolve_graph_file_paths (cognitive 22) code_review_graph/tools/_common.py:232 — _common._resolve_graph_file_paths has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 4 (9 pts), error handling 1 (3 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 · uninstall._remove_mcp_entry (cognitive 22) · ×1
  • uninstall._remove_mcp_entry (cognitive 22) code_review_graph/uninstall.py:192 — 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 · uninstall._process_platform_configs (cognitive 22) · ×1
  • uninstall._process_platform_configs (cognitive 22) code_review_graph/uninstall.py:885 — uninstall._process_platform_configs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), error handling 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 · 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 · _WatchSupervisor.sync_watches (cognitive 21) · ×1
  • _WatchSupervisor.sync_watches (cognitive 21) code_review_graph/incremental.py:2543 — _WatchSupervisor.sync_watches has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (5 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 · incremental._svn_revision_info (cognitive 21) · ×1
  • incremental._svn_revision_info (cognitive 21) code_review_graph/incremental.py:791 — 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 · CodeParser._spring_config_annotation_values (cognitive 21) · ×1
  • CodeParser._spring_config_annotation_values (cognitive 21) code_review_graph/parser.py:10438 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:10755 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:10806 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:15171 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:2620 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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_hook (cognitive 21) · ×1
  • skills.install_git_hook (cognitive 21) code_review_graph/skills.py:1640 — skills.install_git_hook has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, 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 · auto_promote.normalise_reports (cognitive 21) · ×1
  • auto_promote.normalise_reports (cognitive 21) scripts/auto_promote.py:197 — auto_promote.normalise_reports has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, ternaries 3 (4 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · render_pr_comment.main (cognitive 21) · ×1
  • render_pr_comment.main (cognitive 21) scripts/render_pr_comment.py:548 — render_pr_comment.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 2 (5 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · analysis.find_knowledge_gaps (cognitive 20) · ×1
  • analysis.find_knowledge_gaps (cognitive 20) code_review_graph/analysis.py:115 — 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:1094 — 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 · flows.incremental_trace_flows (cognitive 20) · ×1
  • flows.incremental_trace_flows (cognitive 20) code_review_graph/flows.py:457 — flows.incremental_trace_flows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (7 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · incremental.collect_all_files (cognitive 20) · ×1
  • incremental.collect_all_files (cognitive 20) code_review_graph/incremental.py:1437 — incremental.collect_all_files has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parser._strip_vbnet_noise (cognitive 20) · ×1
  • parser._strip_vbnet_noise (cognitive 20) code_review_graph/parser.py:1766 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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._allocate_regions (cognitive 20) · ×1
  • review._allocate_regions (cognitive 20) code_review_graph/tools/review.py:346 — 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:74 — 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 · auto_promote.required_contexts (cognitive 20) · ×1
  • auto_promote.required_contexts (cognitive 20) scripts/auto_promote.py:171 — auto_promote.required_contexts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 5, loops 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · communities._compute_cohesion_batch (cognitive 19) · ×1
  • communities._compute_cohesion_batch (cognitive 19) code_review_graph/communities.py:188 — 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 · GraphStore._build_networkx_graph (cognitive 19) · ×1
  • GraphStore._build_networkx_graph (cognitive 19) code_review_graph/graph.py:3653 — GraphStore._build_networkx_graph has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (6 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · incremental.watch (cognitive 19) · ×1
  • incremental.watch (cognitive 19) code_review_graph/incremental.py:3194 — incremental.watch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jedi_resolver._walk_calls (cognitive 19) · ×1
  • jedi_resolver._walk_calls (cognitive 19) code_review_graph/jedi_resolver.py:245 — 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:237 — 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._java_annotation_attributes (cognitive 19) · ×1
  • CodeParser._java_annotation_attributes (cognitive 19) code_review_graph/parser.py:10722 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:15252 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:680 — 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 · _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 · auto_promote.gate_verdict (cognitive 19) · ×1
  • auto_promote.gate_verdict (cognitive 19) scripts/auto_promote.py:470 — auto_promote.gate_verdict has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 pts), ternaries 2, 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 · render_pr_comment.render_markdown (cognitive 19) · ×1
  • render_pr_comment.render_markdown (cognitive 19) scripts/render_pr_comment.py:317 — render_pr_comment.render_markdown has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 9. 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 · WatchDaemon.reconcile (cognitive 18) · ×1
  • WatchDaemon.reconcile (cognitive 18) code_review_graph/daemon.py:1137 — 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:323 — 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 · incremental.get_changed_files (cognitive 18) · ×1
  • incremental.get_changed_files (cognitive 18) code_review_graph/incremental.py:1040 — incremental.get_changed_files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 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 · CodeParser._has_cpp_header_evidence (cognitive 18) · ×1
  • CodeParser._has_cpp_header_evidence (cognitive 18) code_review_graph/parser.py:3390 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:5194 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:10928 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 18) · ×1
  • CodeParser._get_java_method_and_receiver (cognitive 18) code_review_graph/parser.py:13419 — CodeParser._get_java_method_and_receiver 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. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:15187 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:18767 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:1354 — _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 · docs.get_docs_section (cognitive 18) · ×1
  • docs.get_docs_section (cognitive 18) code_review_graph/tools/docs.py:122 — 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 · visualization._build_name_index (cognitive 18) · ×1
  • visualization._build_name_index (cognitive 18) code_review_graph/visualization.py:106 — visualization._build_name_index has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 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 · audit_python_imports.audit_call_attribution (cognitive 18) · ×1
  • audit_python_imports.audit_call_attribution (cognitive 18) scripts/audit_python_imports.py:687 — audit_python_imports.audit_call_attribution has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 · context_savings.format_context_savings_panel (cognitive 17) · ×1
  • context_savings.format_context_savings_panel (cognitive 17) code_review_graph/context_savings.py:201 — 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 · jsonc.has_comments (cognitive 17) · ×1
  • jsonc.has_comments (cognitive 17) code_review_graph/jsonc.py:67 — 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:169 — 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:3080 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:6052 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:6912 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:7338 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 17) · ×1
  • CodeParser._elixir_function_name_and_params (cognitive 17) code_review_graph/parser.py:8046 — CodeParser._elixir_function_name_and_params 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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._walk_hcl_expressions (cognitive 17) · ×1
  • CodeParser._walk_hcl_expressions (cognitive 17) code_review_graph/parser.py:8657 — CodeParser._walk_hcl_expressions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:9049 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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 17) · ×1
  • CodeParser._extract_js_var_functions (cognitive 17) code_review_graph/parser.py:10108 — CodeParser._extract_js_var_functions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:10259 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:10402 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:468 — _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:773 — _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:721 — 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 · uninstall._safe_path (cognitive 17) · ×1
  • uninstall._safe_path (cognitive 17) code_review_graph/uninstall.py:72 — 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 (cognitive 17) · ×1
  • uninstall._process_repo (cognitive 17) code_review_graph/uninstall.py:1006 — uninstall._process_repo 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:1195 — 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 · communities.get_architecture_overview (cognitive 16) · ×1
  • communities.get_architecture_overview (cognitive 16) code_review_graph/communities.py:1019 — 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 · flows.detect_entry_points (cognitive 16) · ×1
  • flows.detect_entry_points (cognitive 16) code_review_graph/flows.py:156 — flows.detect_entry_points has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore.__init__ (cognitive 16) · ×1
  • GraphStore.__init__ (cognitive 16) code_review_graph/graph.py:694 — GraphStore.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (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 · graph._index_tokens (cognitive 16) · ×1
  • graph._index_tokens (cognitive 16) code_review_graph/graph.py:102 — 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:2767 — _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 · CodeParser._apply_typed_call_targets (cognitive 16) · ×1
  • CodeParser._apply_typed_call_targets (cognitive 16) code_review_graph/parser.py:6127 — CodeParser._apply_typed_call_targets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: code_review_graph/parser.py holds 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:9029 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:16102 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:16300 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:17552 — 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 97 of the 255 methods over the threshold — including the worst — and 3694 of the 7198 points over it (51%), 7.4× the next-largest file (code_review_graph/refactor.py at 500). 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:1835 — 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:125 — 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 · promotion_gate.run (cognitive 16) · ×1
  • promotion_gate.run (cognitive 16) scripts/promotion_gate.py:422 — promotion_gate.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5, boolean chains 3, loops 2 (3 pts), ternaries 3, error handling 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · 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.
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: communities.py ↔ flows.py code_review_graph/communities.py:1 — `code_review_graph/communities.py` and `code_review_graph/flows.py` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `91083cb3` feat: community detection, flow analysis, and dead code improvements …; `d4b07623` fix: resolve SQLite transaction bugs, FTS5 content sync, and atomic o…; `ec2b46b6` fix: resolve SQLite transaction nesting errors (#135, #181) (#205) — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (98 shared lines) · ×1
  • Near-duplicate member pair (98 shared lines) code_review_graph/spring_resolver.py:31 — code_review_graph/spring_resolver.py:31-201 | code_review_graph/temporal_resolver.py:32-205 — These two members are variants of one another: 98 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) code_review_graph/flows.py:401 — code_review_graph/flows.py:401-454 | code_review_graph/flows.py:462-581 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) code_review_graph/communities.py:360 — code_review_graph/communities.py:360-466 | code_review_graph/communities.py:480-557 — 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 · 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:3325 — code_review_graph/graph.py:3325-3342 | code_review_graph/graph.py:3416-3431 | code_review_graph/graph.py:3436-3452 | code_review_graph/graph.py:3536-3548 | code_review_graph/graph.py:3553-3565 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (63–85 lines × 2) · ×1
  • Duplicated block (63–85 lines × 2) REDACTED:476 — REDACTED:476-560 | REDACTED:711-773 — 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:710` calls `_wait_for_rate_limit_slot` and `REDACTED:475` 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:3629 — code_review_graph/parser.py:3629-3673 | code_review_graph/parser.py:3757-3800 — 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:3757` 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 (42–43 lines × 2) · ×1
  • Duplicated block (42–43 lines × 2) code_review_graph/spring_resolver.py:93 — code_review_graph/spring_resolver.py:93-135 | code_review_graph/temporal_resolver.py:97-138 — 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 102 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 (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) code_review_graph/parser.py:3580 — code_review_graph/parser.py:3580-3620 | code_review_graph/parser.py:3703-3743 — 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:3703` 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:567 — REDACTED:567-599 | REDACTED:777-801 — 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:2981 — code_review_graph/graph.py:2981-3013 | code_review_graph/graph.py:3105-3137 — 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 (30–31 lines × 2) · ×1
  • Duplicated block (30–31 lines × 2) code_review_graph/flows.py:420 — code_review_graph/flows.py:420-450 | code_review_graph/flows.py:551-580 — 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 (28–31 lines × 2) · ×1
  • Duplicated block (28–31 lines × 2) code_review_graph/spring_resolver.py:139 — code_review_graph/spring_resolver.py:139-169 | code_review_graph/temporal_resolver.py:141-168 — 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 102 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `code_review_graph/temporal_resolver.py:170` calls `get` and `code_review_graph/spring_resolver.py:172` 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 (27–29 lines × 2) · ×1
  • Duplicated block (27–29 lines × 2) code_review_graph/parser.py:11307 — code_review_graph/parser.py:11307-11333 | code_review_graph/parser.py:11395-11423 — 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 (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) code_review_graph/parser.py:10149 — code_review_graph/parser.py:10149-10175 | code_review_graph/parser.py:10329-10355 — 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:10149` 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 (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:226-248 | code_review_graph/tools/build.py:856-878 — 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:225` calls `perf_counter` and `code_review_graph/tools/build.py:854` 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 (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) code_review_graph/spring_resolver.py:179 — code_review_graph/spring_resolver.py:179-201 | code_review_graph/temporal_resolver.py:183-205 — 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 102 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `code_review_graph/spring_resolver.py:178` calls `rsplit` and `code_review_graph/temporal_resolver.py:182` 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 (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) code_review_graph/eval/reporter.py:183 — code_review_graph/eval/reporter.py:183-205 | code_review_graph/eval/reporter.py:267-288 | code_review_graph/eval/reporter.py:289-310 — 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:9182 — code_review_graph/parser.py:9182-9200 | code_review_graph/parser.py:12057-12078 — 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:9182` 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–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) code_review_graph/skills.py:2009 — code_review_graph/skills.py:2009-2029 | code_review_graph/skills.py:2091-2110 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `code_review_graph/skills.py:2090` calls `generate_codex_hooks_config` and `code_review_graph/skills.py:2007` 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 (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) code_review_graph/parser.py:12479 — code_review_graph/parser.py:12479-12498 | code_review_graph/parser.py:12509-12527 — 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 (17–19 lines × 5) · ×1
  • Duplicated block (17–19 lines × 5) code_review_graph/parser.py:9595 — code_review_graph/parser.py:9595-9611 | code_review_graph/parser.py:10165-10182 | code_review_graph/parser.py:10235-10251 | code_review_graph/parser.py:10345-10363 | code_review_graph/parser.py:18887-18903 — 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:9595` 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 (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) code_review_graph/changes.py:103 — code_review_graph/changes.py:103-120 | code_review_graph/changes.py:149-166 — 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/changes.py:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) code_review_graph/parser.py:6956 — code_review_graph/parser.py:6956-6971 | code_review_graph/parser.py:15341-15358 — 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 (13–17 lines × 6) · ×1
  • Duplicated block (13–17 lines × 6) code_review_graph/parser.py:9600 — code_review_graph/parser.py:9600-9614 | code_review_graph/parser.py:9680-9693 | code_review_graph/parser.py:10170-10185 | code_review_graph/parser.py:10240-10254 | code_review_graph/parser.py:10350-10366 | code_review_graph/parser.py:18893-18905 — all 6 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:9600` 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 (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) REDACTED:459 — REDACTED:459-475 | REDACTED:693-709 — 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:710` calls `_wait_for_rate_limit_slot` and `REDACTED:476` 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 (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) code_review_graph/uninstall.py:240 — code_review_graph/uninstall.py:240-255 | code_review_graph/uninstall.py:531-545 — 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:240` 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:8164 — code_review_graph/parser.py:8164-8177 | code_review_graph/parser.py:9589-9602 | code_review_graph/parser.py:10229-10242 | code_review_graph/parser.py:18881-18895 — 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:8164` 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/cli.py:1167 — code_review_graph/cli.py:1167-1181 | code_review_graph/cli.py:1292-1307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `code_review_graph/cli.py:1167` 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 (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) code_review_graph/parser.py:12276 — code_review_graph/parser.py:12276-12290 | code_review_graph/parser.py:18964-18976 — 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:12276` 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 × 4) · ×1
  • Duplicated block (14 lines × 4) code_review_graph/parser.py:9177 — code_review_graph/parser.py:9177-9191 | code_review_graph/parser.py:9592-9605 | code_review_graph/parser.py:10232-10245 | code_review_graph/parser.py:18884-18898 — 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:9177` 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:9581 — code_review_graph/parser.py:9581-9594 | code_review_graph/parser.py:9662-9675 | code_review_graph/parser.py:10221-10234 — 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:9581` 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:255 — code_review_graph/jsonc.py:255-265 | code_review_graph/jsonc.py:272-285 — 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:6926 — code_review_graph/parser.py:6926-6935 | code_review_graph/parser.py:15298-15311 — 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:9180 — code_review_graph/parser.py:9180-9193 | code_review_graph/parser.py:9595-9607 | code_review_graph/parser.py:9836-9849 | code_review_graph/parser.py:10165-10177 | code_review_graph/parser.py:10235-10247 | code_review_graph/parser.py:10345-10357 | code_review_graph/parser.py:18887-18900 — 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:9180` 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:9605 — code_review_graph/parser.py:9605-9617 | code_review_graph/parser.py:9684-9696 | code_review_graph/parser.py:10245-10257 | code_review_graph/parser.py:10355-10369 | code_review_graph/parser.py:12281-12293 — 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:9605` 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 (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) code_review_graph/skills.py:1995 — code_review_graph/skills.py:1995-2007 | code_review_graph/skills.py:2077-2088 | code_review_graph/skills.py:2382-2393 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `code_review_graph/skills.py:2090` calls `generate_codex_hooks_config` and `code_review_graph/skills.py:2009` 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 (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) code_review_graph/parser.py:8167 — code_review_graph/parser.py:8167-8178 | code_review_graph/parser.py:9177-9189 | code_review_graph/parser.py:9592-9603 | code_review_graph/parser.py:10232-10243 | code_review_graph/parser.py:18884-18896 — 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:8167` 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:9114 — code_review_graph/parser.py:9114-9125 | code_review_graph/parser.py:9358-9369 | code_review_graph/parser.py:9403-9414 — 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:9114` 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:9356` calls `_julia_scope_join` and `code_review_graph/parser.py:9113` 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:8125 — code_review_graph/parser.py:8125-8135 | code_review_graph/parser.py:8175-8186 — 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:8125` 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) · ×1
  • Duplicated block (12 lines × 2) code_review_graph/parser.py:8180 — code_review_graph/parser.py:8180-8191 | code_review_graph/parser.py:9426-9437 — 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:8180` 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 (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) code_review_graph/parser.py:17871 — code_review_graph/parser.py:17871-17880 | code_review_graph/parser.py:17957-17968 — 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:17871` 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:17914 — code_review_graph/parser.py:17914-17922 | code_review_graph/parser.py:17974-17985 — 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:17914` 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:8161 — code_review_graph/parser.py:8161-8171 | code_review_graph/parser.py:9586-9596 | code_review_graph/parser.py:9667-9677 | code_review_graph/parser.py:10226-10236 — 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:9584` calls `_get_params` and `code_review_graph/parser.py:8160` 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 × 3) · ×1
  • Duplicated block (10–11 lines × 3) code_review_graph/tools/build.py:251 — code_review_graph/tools/build.py:251-260 | code_review_graph/tools/build.py:313-322 | code_review_graph/tools/build.py:341-351 — 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 (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) code_review_graph/graph.py:3441 — code_review_graph/graph.py:3441-3450 | code_review_graph/graph.py:3538-3547 | code_review_graph/graph.py:3555-3564 — 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 (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) code_review_graph/graph.py:3331 — code_review_graph/graph.py:3331-3339 | code_review_graph/graph.py:3421-3429 | code_review_graph/graph.py:3441-3449 | code_review_graph/graph.py:3538-3546 | code_review_graph/graph.py:3555-3563 — 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.
D4 · Code Duplication · Duplicated block (7–9 lines × 4) · ×1
  • Duplicated block (7–9 lines × 4) code_review_graph/parser.py:17874 — code_review_graph/parser.py:17874-17882 | code_review_graph/parser.py:17963-17969 | code_review_graph/parser.py:18190-18198 | code_review_graph/parser.py:18251-18257 — 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:1476 — code_review_graph/graph.py:1476-1483 | code_review_graph/graph.py:1583-1590 | code_review_graph/graph.py:1632-1639 | code_review_graph/graph.py:2664-2671 — 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 (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) code_review_graph/tools/build.py:251 — code_review_graph/tools/build.py:251-257 | code_review_graph/tools/build.py:277-283 | code_review_graph/tools/build.py:313-319 | code_review_graph/tools/build.py:341-347 | code_review_graph/tools/build.py:355-361 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) code_review_graph/parser.py:17190 — code_review_graph/parser.py:17190-17196 | code_review_graph/parser.py:18656-18662 | code_review_graph/parser.py:18781-18787 — 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.
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 with local edits (12 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (12 matched lines × 2 locations) code-review-graph-vscode/src/features/reviewAssistant.ts:59 — code-review-graph-vscode/src/features/reviewAssistant.ts:59 · code-review-graph-vscode/src/onboarding/welcome.ts:29 — the two spans are one implementation copied and then locally edited — 59 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (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:649 — (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:439 — 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: 852 lines of code code-review-graph-vscode/src/extension.ts:1 — code-review-graph-vscode/src/extension.ts has 852 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: 524 lines of code code-review-graph-vscode/src/backend/sqlite.ts:1 — code-review-graph-vscode/src/backend/sqlite.ts has 524 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 (3 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 (3 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 (3 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 (3 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 (3 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 (3 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
R8 · Dependency Hygiene · Unused dependency '@vscode/test-electron' · ×1
  • Unused dependency '@vscode/test-electron' — Declared in code-review-graph-vscode/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Minor — 43 finding(s)
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×10
  • Silent fallback default on parse failure code_review_graph/incremental.py:1406 — `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/parser.py:6818 — `_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:14688 — `_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:14790 — `_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:16446 — `_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:137 — `_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:370 — `_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:853 — `_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:2188 — `_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.
D24 · Comment Value · redundant comment · ×6
  • redundant comment code-review-graph-vscode/src/extension.ts:883 — "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:895 — "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:931 — "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).
X10 · Duplicated predicate · Duplicated predicate · ×6
  • Duplicated predicate code_review_graph/daemon.py:329 — `(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:169 — `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/incremental.py:536 — `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/spring_resolver.py:176 — `method_to_qual.get((concrete_class, method_name)) or fallback` appears character-identically in 2 files — code_review_graph/spring_resolver.py, code_review_graph/temporal_resolver.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:259 — `src_cid is not None and tgt_cid is not None and src_cid != tgt_cid` appears character-identically in 2 files — code_review_graph/analysis.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.
  • Duplicated predicate code_review_graph/cli.py:199 — `target != "all" and target not in owners` appears character-identically in 2 files — code_review_graph/cli.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.
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, 20 significant file(s) lose their only recent owner: code_review_graph/visualization.py, scripts/auto_promote.py, scripts/audit_python_imports.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/neighbourhood.py (+12 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (21 single-owned of 88 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 88 of the 101 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: code_review_graph/python_resolver.py.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — 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/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (62404 LoC, 149 module-visible types across 6 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D27 · Navigability · Scattered collaborators · ×1
  • Scattered collaborators — 89 % of calls cross a namespace and only 22 % 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
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 1 of 88 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 88 of the 101 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: code_review_graph/rescript_resolver.py. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D34 · Knowledge Freshness · Orphaned file · ×1
  • Orphaned file code_review_graph/rescript_resolver.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
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.
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
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 61809 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 · ×1
  • Dependabot does not watch npm REDACTED:2 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, 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 entry to the `updates:` list.
R7 · Dead Code · Unused module-local declaration 'fetchUsers' · ×1
  • Unused module-local declaration 'fetchUsers' tests/fixtures/sample_vue.vue:32 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
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:836 — `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 --report-format json --report-path /tmp/watchdog-gitleaks-950742a7427b424092e511854a17c45b/history.json --exit-code 0 --source .1artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-950742a7427b424092e511854a17c45b/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 --exclude code_review_graph/assets .68artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update26artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .0artifacts/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/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a1a2cc-9d45-780f-9342-638e24a7d7a0 · 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