Public report of CanineCC/kennel.canine.dev, published 28 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 28 October 2026, 10:54 UTC · Survey ID cd_b578c98ce24c4d48993a185961c321fd

CanineCC/kennel.canine.dev

Measured 28 October 2026, 10:03 UTC, at code version 9548f44

No regression since the last survey

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

CAI score 78out of 100 Adequate
CriticalWeakAdequateStrongExemplary
No change 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 very large codebase: 1,221,642 lines of product code in 384 projects, tests not counted · Estimated rebuild effort: about 90.0 person-years · Weakest lens: Production Readiness, 72

Findings by how serious they are

59 critical 2715 serious 534 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
28 October 2026, 10:03 UTC

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

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

125of 125 dimensions measured by tools.
3163of 3308 findings point to an exact file and line, so you can open each one in the code. The other 145 concern the repository as a whole, such as missing documentation.
125dimensions across 10 lenses, read from 1,221,642 lines of product code in 384 projects.
Chapters

Executive summary

CanineCC/kennel.canine.dev falls short of our standard for production because its Dependencies dimensions are rated Weak. It scores 78 out of 100, which alone would earn Strong, but it is rated Adequate: a rating can't sit more than one step above its weakest group.

Every lens scores high enough to be rated Strong, so no single lens holds the score back. The best first steps are replacing the four deprecated dependencies and updating the outdated dependencies, each worth about 5 points.

Two settings leave the servers or containers unsafe. Thirty errors are caught and ignored, so failures can go unnoticed. Correcting the unsafe settings and handling or logging the ignored errors would close both risks. The 23 loops of parts of the code that depend on each other need breaking by moving the shared parts into a project of their own.

The product code is 1,221,642 lines, about €13,000,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.
Production Readiness 72 · counts for 45%Code Health 80 · counts for 25%Performance 84 · counts for 14%Maturity 86 · counts for 8%Event-Driven 88 · counts for 4%Architecture 88 · counts for 2%Event Sourcing 89 · counts for 1%Domain Modelling 90 · counts for 1%Accessibility 94 · counts for 0%Security and Compliance 96 · counts for 0%

Every lens already scores high enough to be rated Strong, so no single lens holds the score back.

Code composition: what the lines of code are
Business logic 25%Supporting code 14%Tests 55%Generated by tools 6%Code analyzers 0%
New since the last survey: 83 findings

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

  • Cyclomatic Complexity · DocMeasuredClaims.Satisfies (cyclomatic 29) engine/src/Scanner/Maturity/M4/DocMeasuredClaims.cs
  • Cyclomatic Complexity · DisposalDutyAnalyzer.InspectOverwrittenOwnedField (cyclomatic 29) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs
  • Cyclomatic Complexity · ProjectSeams.Of (cyclomatic 28) engine/src/Scanner/Architecture/D26/ProjectSeams.cs
  • Cyclomatic Complexity · DisposalDutyAnalyzer.CallerReachingItLive (cyclomatic 21) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs
  • Cyclomatic Complexity · DisposalDutyAnalyzer.InspectUnreleasedFactoryFields (cyclomatic 19) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs
  • Cyclomatic Complexity · DisposalDutyAnalyzer.RequiresNull (cyclomatic 18) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs
  • Cyclomatic Complexity · PackageCache.ServeMetadataAsync (cyclomatic 18) engine/src/PkgCache/PackageCache.cs
  • Cognitive Complexity · DocMeasuredClaims.Satisfies (cognitive 34) engine/src/Scanner/Maturity/M4/DocMeasuredClaims.cs
  • Cognitive Complexity · ProjectSeams.Of (cognitive 31) engine/src/Scanner/Architecture/D26/ProjectSeams.cs
  • Cognitive Complexity · FrontendTestSuiteMasking.CollectPrunedTreeAliasModuleRefs (cognitive 31) engine/src/Core/Frontend/FrontendTestSuiteMasking.cs
  • Cognitive Complexity · ProjectCohesionAnalyzer.RunAsync (cognitive 22) engine/src/Scanner/Architecture/D26/ProjectCohesionAnalyzer.cs
  • Cognitive Complexity · DisposalDutyAnalyzer.InspectOverwrittenOwnedField (cognitive 20) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs
  • Cognitive Complexity · DisposalDutyAnalyzer.InspectUnreleasedFactoryFields (cognitive 19) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs
  • Cognitive Complexity · AffectedProjections.Judge (cognitive 19) src/Kennel.Infrastructure/Projections/AffectedProjections.cs
  • Cognitive Complexity · draw_h1.candidates (cognitive 19) docs/plans/deterministic-engine/draw_h1.py
  • Cognitive Complexity · CiTestGateSites.DotNetChangeFilters (cognitive 18) engine/src/Scanner/Readiness/P12/CiTestGateSites.cs
  • Cognitive Complexity · PackageCache.ServeMetadataAsync (cognitive 18) engine/src/PkgCache/PackageCache.cs
  • Cognitive Complexity · DisposalDutyAnalyzer.CallerReachingItLive (cognitive 17) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs
  • Cognitive Complexity · BoundaryCouplingAnalyzer.RunWithWithheldAsync (cognitive 16) engine/src/Scanner/ArchitectureJudged/D23/BoundaryCouplingAnalyzer.cs
  • Cognitive Complexity · PersonalDataEvidence.TypeEvidence (cognitive 16) engine/src/Core/Compliance/PersonalDataEvidence.cs
  • Cognitive Complexity · FrontendTestSuiteMasking.PrunedTreeSourceFiles (cognitive 16) engine/src/Core/Frontend/FrontendTestSuiteMasking.cs
  • Cognitive Complexity · TypeReferenceOccurrences.DeclaredNames (cognitive 16) engine/src/Core/Roslyn/CodeModel/TypeReferenceOccurrences.cs
  • Cognitive Complexity · PackageCache.FetchAndStoreAsync (cognitive 16) engine/src/PkgCache/PackageCache.cs
  • Cognitive Complexity · draw_h1.clone (cognitive 16) docs/plans/deterministic-engine/draw_h1.py
  • God Classes · FileTooLong: X18/DisposalDutyAnalyzer.cs engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs
  • Code Duplication · Edited copy of a member (11 corresponding lines) tools/multilang/agg_holdout5.py
  • Code Duplication · Edited copy of a member (17 corresponding lines) engine/src/CodeHealth.Reporting/Security/SecurityWatchRenderer.cs
  • Code Duplication · Members sharing a duplicated core (15 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) engine/src/Core/Api/CargoLibraryTarget.cs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) tools/multilang/agg_combined.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Readiness/P1/CicdDimension.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) tools/multilang/agg_combined4.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/CodeHealth.Toolchain/MsBuild/CentralPackageManagement.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Dart.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X1/AsyncCorrectnessAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Dart.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) tools/multilang/agg_combined.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) tools/multilang/agg_combined.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) tools/train/dimension-routing.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Markup/BuilderDslMarkupProducer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Accessibility/AC1/TextAlternativesAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Dependencies/CratesIoClient.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Dependencies/CratesIoClient.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Diagnostics/ScanBudgets.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) tools/multilang/agg_combined3.py
  • Code Duplication · Duplicated block (11 lines × 2) docs/plans/deterministic-engine/draw_h1.py
  • Code Duplication · Duplicated block (5 lines × 2) docs/plans/deterministic-engine/draw_h1.py
  • Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/sidecars/kotlin-frontend/selftest/k1-error-check.py
  • Code Duplication · Duplicated block (6 lines × 2) engine/src/Scanner/Readiness/P12/CiTestGateSites.cs
  • Churn × Complexity Hotspots · Hotspot: engine/src/Scanner/SecurityPosture/D41/SyscallConfinementAnalyzer.cs engine/src/Scanner/SecurityPosture/D41/SyscallConfinementAnalyzer.cs
  • Churn × Complexity Hotspots · Hotspot: engine/src/Scanner/Architecture/D26/ProjectSeams.cs engine/src/Scanner/Architecture/D26/ProjectSeams.cs
  • Churn × Complexity Hotspots · Hotspot: engine/src/Core/Roslyn/CodeModel/ReferenceIndex.cs engine/src/Core/Roslyn/CodeModel/ReferenceIndex.cs
  • Churn × Complexity Hotspots · Hotspot: engine/src/Scanner/Maturity/M4/DocInventory.cs engine/src/Scanner/Maturity/M4/DocInventory.cs
  • Static Analysis (SAST) · REDACTED
  • Async correctness · Blocking `File.ReadAllText` inside an `async` method src/Kennel.Improve.Orchestrator/Program.cs

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

Fixed since the last survey: 2248 findings

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

  • Cognitive Complexity · BoundaryCouplingAnalyzer.RunAsync (cognitive 16) engine/src/Scanner/ArchitectureJudged/D23/BoundaryCouplingAnalyzer.cs
  • Code Duplication · Edited copy of a member (11 corresponding lines) tools/multilang/agg_holdout5.py
  • Code Duplication · Edited copy of a member (17 corresponding lines) engine/src/CodeHealth.Reporting/Security/SecurityWatchRenderer.cs
  • Code Duplication · Members sharing a duplicated core (15 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) engine/src/Core/Api/CargoLibraryTarget.cs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) tools/multilang/agg_combined.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Readiness/P1/CicdDimension.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) tools/multilang/agg_combined4.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/CodeHealth.Toolchain/MsBuild/CentralPackageManagement.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Dart.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X1/AsyncCorrectnessAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Dart.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Core/Api/SetuptoolsDistribution.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) tools/multilang/agg_combined.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) tools/multilang/agg_combined.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) tools/train/dimension-routing.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Markup/BuilderDslMarkupProducer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Accessibility/AC1/TextAlternativesAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Dependencies/CratesIoClient.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Dependencies/CratesIoClient.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Diagnostics/ScanBudgets.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) tools/multilang/agg_combined3.py
  • Code Duplication · Duplicated block (37 lines × 2) engine/src/Core/Markup/ScriptMarkupBuffer.cs
  • Code Duplication · Duplicated block (20 lines × 2) engine/src/Core/Markup/TemplMarkupProducer.cs
  • Code Duplication · Duplicated block (17 lines × 3) engine/src/Core/Markup/TemplMarkupProducer.cs
  • Code Duplication · Duplicated block (13 lines × 2) engine/src/Core/Markup/TemplMarkupProducer.cs
  • Code Duplication · Duplicated block (13 lines × 2) engine/src/Core/Markup/TemplMarkupProducer.cs
  • Code Duplication · Duplicated block (17 lines × 3) engine/src/Core/Api/SetuptoolsDistribution.cs
  • Code Duplication · Duplicated block (12 lines × 2) engine/src/Core/Markup/MarkupParser.cs
  • Code Duplication · Duplicated block (11 lines × 2) engine/src/Scanner/Docs/D19/MarkupDocument.cs
  • Code Duplication · Duplicated block (15 lines × 2) engine/src/Scanner/Defects/X5/ForeignNullableTypingScan.Php.cs
  • Code Duplication · Duplicated block (10 lines × 3) engine/src/Core/Markup/AstroMarkupProducer.cs
  • Code Duplication · Duplicated block (19 lines × 2) engine/src/Core/Markup/MarkupParser.cs
  • Code Duplication · Duplicated block (15 lines × 2) engine/src/Core/Markup/TemplMarkupProducer.cs
  • Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) engine/sidecars/kotlin-frontend/selftest/k1-error-check.py
  • Boundary Type-Coupling · Cross-context type OrganizationCreated (Billing → Accounts) src/Kennel.Core/Accounts/Pages/AccountSettings/AccountSettingsProjection.cs
  • Boundary Type-Coupling · Cross-context type OrganizationOwnerSet (Billing → Accounts) src/Kennel.Core/Accounts/Pages/AccountSettings/AccountSettingsProjection.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberAdded (Billing → Accounts) src/Kennel.Core/Accounts/Pages/AccountSettings/AccountSettingsProjection.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberRoleSet (Billing → Accounts) src/Kennel.Core/Accounts/Pages/AccountSettings/AccountSettingsProjection.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberRemoved (Billing → Accounts) src/Kennel.Core/Accounts/Pages/AccountSettings/AccountSettingsProjection.cs
  • Boundary Type-Coupling · Cross-context type OrganizationCreated (Billing → Accounts) src/Kennel.Core/Accounts/Pages/AccountSettings/AccountSettingsProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type OrganizationOwnerSet (Billing → Accounts) src/Kennel.Core/Accounts/Pages/AccountSettings/AccountSettingsProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberAdded (Billing → Accounts) src/Kennel.Core/Accounts/Pages/AccountSettings/AccountSettingsProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberRoleSet (Billing → Accounts) src/Kennel.Core/Accounts/Pages/AccountSettings/AccountSettingsProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberRemoved (Billing → Accounts) src/Kennel.Core/Accounts/Pages/AccountSettings/AccountSettingsProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type OrganizationCreated (Billing → Accounts) src/Kennel.Core/Accounts/Pages/PersonalNotifications/PersonalNotificationsProjection.cs
  • Boundary Type-Coupling · Cross-context type OrganizationOwnerSet (Billing → Accounts) src/Kennel.Core/Accounts/Pages/PersonalNotifications/PersonalNotificationsProjection.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberAdded (Billing → Accounts) src/Kennel.Core/Accounts/Pages/PersonalNotifications/PersonalNotificationsProjection.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberRoleSet (Billing → Accounts) src/Kennel.Core/Accounts/Pages/PersonalNotifications/PersonalNotificationsProjection.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberRemoved (Billing → Accounts) src/Kennel.Core/Accounts/Pages/PersonalNotifications/PersonalNotificationsProjection.cs
  • Boundary Type-Coupling · Cross-context type OrganizationCreated (Billing → Accounts) src/Kennel.Core/Accounts/Pages/PersonalNotifications/PersonalNotificationsProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type OrganizationOwnerSet (Billing → Accounts) src/Kennel.Core/Accounts/Pages/PersonalNotifications/PersonalNotificationsProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberAdded (Billing → Accounts) src/Kennel.Core/Accounts/Pages/PersonalNotifications/PersonalNotificationsProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberRoleSet (Billing → Accounts) src/Kennel.Core/Accounts/Pages/PersonalNotifications/PersonalNotificationsProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type OrganizationMemberRemoved (Billing → Accounts) src/Kennel.Core/Accounts/Pages/PersonalNotifications/PersonalNotificationsProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type OrgTeamChanged (Repositories → Billing) src/Kennel.Core/Billing/Pages/Organization/OrgHubProjection.cs
  • Boundary Type-Coupling · Cross-context type UserProvisioned (Accounts → Billing) src/Kennel.Core/Billing/Pages/Organization/OrgHubProjection.cs
  • Boundary Type-Coupling · Cross-context type UserProfileChanged (Accounts → Billing) src/Kennel.Core/Billing/Pages/Organization/OrgHubProjection.cs
  • Boundary Type-Coupling · Cross-context type UserErased (Accounts → Billing) src/Kennel.Core/Billing/Pages/Organization/OrgHubProjection.cs
  • Boundary Type-Coupling · Cross-context type OrgTeamChanged (Repositories → Billing) src/Kennel.Core/Billing/Pages/Organization/OrgHubProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type UserProvisioned (Accounts → Billing) src/Kennel.Core/Billing/Pages/Organization/OrgHubProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type UserProfileChanged (Accounts → Billing) src/Kennel.Core/Billing/Pages/Organization/OrgHubProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type UserErased (Accounts → Billing) src/Kennel.Core/Billing/Pages/Organization/OrgHubProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type RepositorySponsored (Repositories → Billing) src/Kennel.Core/Billing/Pages/PartnerPortal/PartnerPortalProjection.cs
  • Boundary Type-Coupling · Cross-context type RepositorySponsorshipEnded (Repositories → Billing) src/Kennel.Core/Billing/Pages/PartnerPortal/PartnerPortalProjection.cs
  • Boundary Type-Coupling · Cross-context type ScanRunIngested (Metrics → Billing) src/Kennel.Core/Billing/Pages/PartnerPortal/PartnerPortalProjection.cs
  • Boundary Type-Coupling · Cross-context type RepositorySponsored (Repositories → Billing) src/Kennel.Core/Billing/Pages/PartnerPortal/PartnerPortalProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type RepositorySponsorshipEnded (Repositories → Billing) src/Kennel.Core/Billing/Pages/PartnerPortal/PartnerPortalProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type ScanRunIngested (Metrics → Billing) src/Kennel.Core/Billing/Pages/PartnerPortal/PartnerPortalProjection.Marten.cs
  • Boundary Type-Coupling · Cross-context type RepositorySponsored (Repositories → Billing) src/Kennel.Core/Billing/Pages/Plan/PlanProjection.cs
  • Boundary Type-Coupling · Cross-context type RepositorySponsorshipFrequencySet (Repositories → Billing) src/Kennel.Core/Billing/Pages/Plan/PlanProjection.cs
  • Boundary Type-Coupling · Cross-context type RepositorySponsorshipEnded (Repositories → Billing) src/Kennel.Core/Billing/Pages/Plan/PlanProjection.cs
Rebuild cost: about €13,000,000 · Estimate
Cost to rebuild€4,300,000 to €22,000,000, for 71,290 to 231,223 hours of work, about 90.0 person-years for 52 to 172 engineers
Difficulty of the problemVery high, 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×1.3 at a score of 78. 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.
SizeVery large: 1,221,642 lines of product code
Comment linesThe estimate prices 920,527 lines. Comment lines count towards the size of 1,221,642 lines but aren't priced as work.
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 4 Deprecated finding(s) in Dependency Hygiene — start with Directory.Packages.props (4).
Raises the score by about 5 points · Low effort · Dependency Hygiene
2
Resolve the 3 Outdated (npm) finding(s) in Dependency Hygiene — start with package.json (2).
Raises the score by about 5 points · Low effort · Dependency Hygiene
3
Resolve the 2 Prerelease dependency finding(s) in Dependency Hygiene.
Raises the score by about 4 points · Low effort · Dependency Hygiene

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.

One cause behind 42 Domain Modelling findings · Common cause
42 findings in the Domain Modelling lens come from the same cause. The code models the business as objects, such as an order or a customer, and each object should guard its own rules: an order, for example, should refuse to be shipped before it has been paid. Here the objects don't do that. Other code can change an object's data directly, so it can put an order into a state the rules forbid. Identifiers, such as order numbers and customer numbers, are passed around as plain numbers or text, so nothing stops the code from using one kind where another belongs. Because all of these findings have the same cause, fixing it once, in the business objects themselves, deals with them together.
Based on: Encapsulated state (2 findings) · Strongly-typed ids (40 findings)
What to do: Give each business object the methods that enforce its rules, such as a method for shipping an order that first checks it has been paid, and let only those methods change its data. Give each kind of identifier a type of its own, so an order number can't be used where a customer number belongs.
If you do one thing first · First action
Resolve the 4 Deprecated finding(s) in Dependency Hygiene. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 4 Dependency Hygiene findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — bounded-context dependency graph

Each box is a bounded context (its layer projects grouped, or a project count when large); arrows show dependencies between contexts. A shared kernel is where many arrows converge.

arch Cli Cli ctx:Core Core Api · Core Cli->ctx:Core ctx:Core.Classification Core.Classification Classification Cli->ctx:Core.Classification ctx:Core.ModelAware Core.ModelAware ModelAware Cli->ctx:Core.ModelAware ctx:Core.SourceCensus Core.SourceCensus SourceCensus Cli->ctx:Core.SourceCensus ctx:Scanner.Defects.Prework Scanner.Defects.Prework Prework Cli->ctx:Scanner.Defects.Prework ctx:Scanner.Defects.Shared Scanner.Defects.Shared Shared Cli->ctx:Scanner.Defects.Shared ctx:Scanner.ModelAware.Prework Scanner.ModelAware.Prework Prework Cli->ctx:Scanner.ModelAware.Prework ctx:Scanner.Security.Shared Scanner.Security.Shared Shared Cli->ctx:Scanner.Security.Shared ctx:Toolchain Toolchain Toolchain Cli->ctx:Toolchain Cli.Edition Cli.Edition Cli.Edition->ctx:Core Cli.Edition->ctx:Core.ModelAware Cli.Edition->ctx:Scanner.Security.Shared Cli.Edition->ctx:Toolchain DimensionMetricsBackfill DimensionMetricsBackfill FindingHistoryBackfill FindingHistoryBackfill JavaProbe JavaProbe Admin.App Admin.App Assay.App Assay.App Improve.Orchestrator Improve.Orchestrator Migration Migration Watchdog.App Watchdog.App PkgCache PkgCache PreprodKeygen PreprodKeygen QwenPoc QwenPoc ScoreEmitter ScoreEmitter ShredBackfill ShredBackfill VerifiedSdkInstall VerifiedSdkInstall WdLlmProxy WdLlmProxy d29-screen d29-screen entry-type-eval entry-type-eval entry-type-eval->ctx:Core kind-sweep kind-sweep kind-sweep->ctx:Core kind-sweep->ctx:Core.Classification kind-sweep->ctx:Toolchain loc-sweep loc-sweep loc-sweep->ctx:Core loc-sweep->ctx:Core.SourceCensus narration-budget-eval narration-budget-eval narration-budget-eval->ctx:Core noise-probe noise-probe noise-probe->ctx:Core overview-reuse-probe overview-reuse-probe overview-reuse-probe->ctx:Core report-preview report-preview ctx:Core->ctx:Core.Classification ctx:Core->ctx:Toolchain ctx:Core.SourceTree Core.SourceTree SourceTree ctx:Core.Classification->ctx:Core.SourceTree ctx:Core.CodeShape Core.CodeShape CodeShape ctx:Core.CodeShape->ctx:Core ctx:Core.CodeShape->ctx:Core.Classification ctx:Core.CodeShape->ctx:Core.SourceCensus ctx:Core.CodeShape->ctx:Core.SourceTree ctx:Core.JsLexing Core.JsLexing JsLexing ctx:Core.ModelAware->ctx:Core ctx:Core.ModelAware->ctx:Core.Classification ctx:Core.Symbols Core.Symbols Symbols ctx:Core.ModelAware->ctx:Core.Symbols ctx:Core.ScriptLexing Core.ScriptLexing ScriptLexing ctx:Core.SourceCensus->ctx:Core ctx:Core.SourceCensus->ctx:Core.Classification ctx:Core.SourceCensus->ctx:Core.SourceTree ctx:Core.SourceTree->ctx:Toolchain ctx:Core.Symbols->ctx:Core ctx:Core.Symbols->ctx:Core.Classification ctx:Core.Symbols->ctx:Core.SourceCensus ctx:Core.Symbols->ctx:Core.SourceTree ctx:Scanner.Defects.Prework->ctx:Core ctx:Scanner.Defects.Prework->ctx:Core.Classification ctx:Scanner.Defects.Prework->ctx:Core.SourceCensus ctx:Scanner.Defects.Prework->ctx:Core.SourceTree ctx:Scanner.Defects.Prework->ctx:Core.Symbols ctx:Scanner.Defects.Shared->ctx:Core ctx:Scanner.Defects.Shared->ctx:Scanner.Defects.Prework ctx:Scanner.ModelAware.Prework->ctx:Core ctx:Scanner.ModelAware.Prework->ctx:Core.Classification ctx:Scanner.ModelAware.Prework->ctx:Core.ModelAware ctx:Scanner.ModelAware.Prework->ctx:Core.SourceTree ctx:Scanner.ModelAware.Prework->ctx:Core.Symbols ctx:Scanner.Security.Shared->ctx:Core ctx:Scanner.Security.Shared->ctx:Core.Classification ctx:Scanner.Security.Shared->ctx:Core.SourceTree ctx:Scanner.Security.Shared->ctx:Toolchain __more__ +304 more contexts

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.

930 modules, with 3298 dependencies between them. 24 loops run through 73 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 890 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 CodeHealth.Core.CodeModel2 Kennel.SharedKernel.Ddd3 Kennel.SharedKernel.Ids4 Kennel.SharedKernel.Vocabulary5 CodeHealth.Core.Scoring6 Kennel.Core.Accounts.Contracts7 Kennel.Core.Accounts.Domain.Events8 Kennel.Core.Billing.Domain9 Kennel.Core.Metrics.Domain.Events10 Kennel.Core.Repositories.Domain11 Kennel.Core.Scans.Contracts12 Kennel.Core.Scheduling.Contracts13 Kennel.SharedKernel.EventSourcing14 CodeHealth.Core.Dimensions15 Kennel.Core.Billing.Contracts16 Kennel.Core.Billing.Domain.Events17 Kennel.Core.Metrics.Contracts18 Kennel.Core.Repositories.Domain.Events19 Kennel.Hosting20 Kennel.Hosting.Operations21 Kennel.Hosting.Projections22 Kennel.Migration.Migrators23 CodeHealth.Reporting24 Kennel.Hosting.Ui25 CodeHealth.Cli.Commands26 Kennel.Core.Deliveries27 Kennel.Core.Repositories.Contracts28 Kennel.Watchdog.Teams.Domain29 Kennel.Core.Billing30 Kennel.Core.Compliance.Contracts31 Kennel.Core.Repositories.Services32 Kennel.Watchdog.Agents.Services33 Kennel.Watchdog.Teams.ReadModels34 Kennel.Admin.Services35 Kennel.Assay.DecisionReports36 Kennel.Core.Billing.ReadModels37 Kennel.Watchdog.Teams38 Kennel.Watchdog.Reporting.Distillation39 Kennel.Watchdog.Repositories.Pages.RepoHub40 Kennel.Watchdog.Scheduling.Services
1 CodeHealth.Core.CodeModel
2 Kennel.SharedKernel.Ddd
3 Kennel.SharedKernel.Ids
4 Kennel.SharedKernel.Vocabulary
5 CodeHealth.Core.Scoring10
6 Kennel.Core.Accounts.Contracts13
7 Kennel.Core.Accounts.Domain.Events1619
8 Kennel.Core.Billing.Domain231
9 Kennel.Core.Metrics.Domain.Events51534
10 Kennel.Core.Repositories.Domain1911
11 Kennel.Core.Scans.Contracts284
12 Kennel.Core.Scheduling.Contracts1107
13 Kennel.SharedKernel.EventSourcing4
14 CodeHealth.Core.Dimensions114
15 Kennel.Core.Billing.Contracts3231
16 Kennel.Core.Billing.Domain.Events4450122
17 Kennel.Core.Metrics.Contracts1641
18 Kennel.Core.Repositories.Domain.Events29534
19 Kennel.Hosting1
20 Kennel.Hosting.Operations2
21 Kennel.Hosting.Projections2
22 Kennel.Migration.Migrators11724
23 CodeHealth.Reporting65
24 Kennel.Hosting.Ui1
25 CodeHealth.Cli.Commands213193
26 Kennel.Core.Deliveries612
27 Kennel.Core.Repositories.Contracts475111
28 Kennel.Watchdog.Teams.Domain71
29 Kennel.Core.Billing1414633821363
30 Kennel.Core.Compliance.Contracts1413211
31 Kennel.Core.Repositories.Services279281523161558133
32 Kennel.Watchdog.Agents.Services2401113115115
33 Kennel.Watchdog.Teams.ReadModels163131116
34 Kennel.Admin.Services435112221581328495222
35 Kennel.Assay.DecisionReports29143621152
36 Kennel.Core.Billing.ReadModels2254
37 Kennel.Watchdog.Teams1452222964210252
38 Kennel.Watchdog.Reporting.Distillation921131551343
39 Kennel.Watchdog.Repositories.Pages.RepoHub513111511245221
40 Kennel.Watchdog.Scheduling.Services428517211761161714
Uses a module listed above itPart of a loopThe module itself
1 CodeHealth.Core.CodeModel2 Kennel.SharedKernel.Ddd3 Kennel.SharedKernel.Ids4 Kennel.SharedKernel.Vocabulary5 CodeHealth.Core.Scoring6 Kennel.Core.Accounts.Contracts7 Kennel.Core.Accounts.Domain.Events8 Kennel.Core.Billing.Domain9 Kennel.Core.Metrics.Domain.Events10 Kennel.Core.Repositories.Domain11 Kennel.Core.Scans.Contracts12 Kennel.Core.Scheduling.Contracts13 Kennel.SharedKernel.EventSourcing14 CodeHealth.Core.Dimensions15 Kennel.Core.Billing.Contracts16 Kennel.Core.Billing.Domain.Events17 Kennel.Core.Metrics.Contracts18 Kennel.Core.Repositories.Domain.Events19 Kennel.Hosting20 Kennel.Hosting.Operations21 Kennel.Hosting.Projections22 Kennel.Migration.Migrators23 CodeHealth.Reporting24 Kennel.Hosting.Ui25 CodeHealth.Cli.Commands26 Kennel.Core.Deliveries27 Kennel.Core.Repositories.Contracts28 Kennel.Watchdog.Teams.Domain29 Kennel.Core.Billing30 Kennel.Core.Compliance.Contracts31 Kennel.Core.Repositories.Services32 Kennel.Watchdog.Agents.Services33 Kennel.Watchdog.Teams.ReadModels34 Kennel.Admin.Services35 Kennel.Assay.DecisionReports36 Kennel.Core.Billing.ReadModels37 Kennel.Watchdog.Teams38 Kennel.Watchdog.Reporting.Distillation39 Kennel.Watchdog.Repositories.Pages.RepoHub40 Kennel.Watchdog.Scheduling.ServicesCodeHealth.Core.CodeModel1Kennel.SharedKernel.Ddd2Kennel.SharedKernel.Ids3Kennel.SharedKernel.Vocabulary4CodeHealth.Core.Scoring5Kennel.Core.Accounts.Contracts6Kennel.Core.Accounts.Domain.Events7Kennel.Core.Billing.Domain8Kennel.Core.Metrics.Domain.Events9Kennel.Core.Repositories.Domain10Kennel.Core.Scans.Contracts11Kennel.Core.Scheduling.Contracts12Kennel.SharedKernel.EventSourcing13CodeHealth.Core.Dimensions14Kennel.Core.Billing.Contracts15Kennel.Core.Billing.Domain.Events16Kennel.Core.Metrics.Contracts17Kennel.Core.Repositories.Domain.Events18Kennel.Hosting19Kennel.Hosting.Operations20Kennel.Hosting.Projections21Kennel.Migration.Migrators22CodeHealth.Reporting23Kennel.Hosting.Ui24CodeHealth.Cli.Commands25Kennel.Core.Deliveries26Kennel.Core.Repositories.Contracts27Kennel.Watchdog.Teams.Domain28Kennel.Core.Billing29Kennel.Core.Compliance.Contracts30Kennel.Core.Repositories.Services31Kennel.Watchdog.Agents.Services32Kennel.Watchdog.Teams.ReadModels33Kennel.Admin.Services34Kennel.Assay.DecisionReports35Kennel.Core.Billing.ReadModels36Kennel.Watchdog.Teams37Kennel.Watchdog.Reporting.Distillation38Kennel.Watchdog.Repositories.Pages.RepoHub39Kennel.Watchdog.Scheduling.Services4010131619231515341911284110741143231445012216412953412211724651213193612475111711414633821363141321127928152316155813324011131151151631311164351122215813284952222914362115222541452222964210252921131551343513111511245221428517211761161714+890 more modules (most-connected shown)

At a glance — Code Health · 80% · Strong ·

At a glance — Architecture · 88% · Strong ·

At a glance — Maturity · 86% · Strong ·

At a glance — Readiness · 72% · Strong ·

At a glance — Security · 96% · Adequate · gated by D29 ·

At a glance — Domain Modelling · 90% · Strong ·

At a glance — Event-Driven · 88% · Strong ·

At a glance — Event Sourcing · 89% · Strong ·

At a glance — Accessibility · 94% · Exemplary ·

At a glance — Performance · 84% · Strong ·

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 — Injection20Medium
A02:2025 — Security Misconfiguration3High / Critical
A03:2025 — Software Supply Chain Failures2Medium

Roadmap

Begin by addressing dependency hygiene, specifically resolving deprecated packages in Directory.Packages.props, updating outdated npm dependencies in package.json, and removing prerelease dependencies. Next, eliminate explicit debt by fixing the NoWarn suppression in Kennel.Analyzers.Tests.csproj. Finally, address the 30 empty catch blocks across key files like ScanBudgets.cs, EngineScanExecutor.cs, and REDACTED to improve error handling robustness.

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

Do thisHelpsEffortDimension
Resolve the 4 Deprecated finding(s) in Dependency Hygiene — start with Directory.Packages.props (4).+5.2 ptsLowDependency Hygiene
Resolve the 3 Outdated (npm) finding(s) in Dependency Hygiene — start with package.json (2).+5.2 ptsLowDependency Hygiene
Resolve the 2 Prerelease dependency finding(s) in Dependency Hygiene.+4.3 ptsLowDependency Hygiene
Resolve the 1 NoWarnInCsproj finding(s) in Explicit Debt — start with Kennel.Analyzers.Tests.csproj.+1.4 ptsLowExplicit Debt
Resolve the 30 EmptyCatchBlock finding(s) in Explicit Debt — start with ScanBudgets.cs (4), EngineScanExecutor.cs (3), REDACTED (3).+1.4 ptsMediumExplicit Debt
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.+1.4 ptsMediumDR & Backup
Raise domain coverage toward 100% — cover the remaining aggregates / value objects / domain services where the business invariants and costly bugs live.+1.1 ptsMediumDomain vs controller coverage
Extend structured logging across the projects you operate, and give the library ones a diagnostics seam instead — an `EventSource`/`ActivitySource` the host can subscribe to, or an optional logger on your options object — rather than taking a logging dependency on your consumers' behalf.+0.8 ptsMediumObservability

File quality

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

FileScoreBandWorst signal
engine/src/Core/Diagnostics/ScanBudgets.cs3.3SlopExplicit Debt: EmptyCatchBlock
src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs3.6SlopExplicit Debt: EmptyCatchBlock
REDACTED3.7SlopExplicit Debt: EmptyCatchBlock
engine/src/Scanner/Security/Shared/Scanners/DeclaredDependencies.cs4.2MixedExplicit Debt: EmptyCatchBlock
engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs4.7MixedExplicit Debt: EmptyCatchBlock
REDACTED5.1MixedIaC & Container Security: High IaC: REDACTED
src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/AssayCodebaseReader.cs5.4MixedExplicit Debt: EmptyCatchBlock
REDACTED5.4MixedStatic Analysis (SAST): Medium: REDACTED
engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs5.9MixedGod Classes: TooManyMethods: ScalaShape
engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs6.0MixedExplicit Debt: BarePragmaDisable
engine/src/Core/Frontend/NxDependencyConstraints.cs6.0MixedExplicit Debt: BarePragmaDisable
engine/src/Scanner/ExplicitDebt/D17/ExplicitDebtAnalyzer.cs6.0MixedExplicit Debt: TodoComment
src/Kennel.Ui/Layout/KennelLayout.razor6.1MixedExplicit Debt: EmptyCatchBlock
engine/src/Core/Frontend/FrontendWorkspaceWalk.cs6.1MixedExplicit Debt: EmptyCatchBlock
engine/src/CodeHealth.CodeModel.Jvm/Model.cs6.3MixedGod Classes: FileTooLong: CodeHealth.CodeModel.Jvm/Model.cs
src/Kennel.Infrastructure/Reporting/PdfSharpStamper.cs6.4MixedExplicit Debt: EmptyCatchBlock
engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs6.5MixedCyclomatic Complexity: ExecutiveBrief.Input (cyclomatic 36)
engine/src/Core/Languages/Go/Domain/GoDomainConventions.cs6.5MixedGod Classes: TooManyMethods: GoDomainConventions
engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.NodeTransport.cs6.6MixedCyclomatic Complexity: ForeignWebSecurityScan.ServerMadeAt (cyclomatic 25)
engine/Directory.Packages.props6.6MixedDependency Hygiene: Deprecated: Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit

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

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

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

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

Could not be resolved — 5

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

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 125 of 125 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 1.0 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 125 dimensions across the health lenses
D1D2D3D4D5D6D7D8D9D10D11D12D13D14D15D17D18D19D20D23D24D25D26D27D29D30D31D34D35D36D39D43D44AC1AC2AC3AC4AC5AC6AC7AX1AX10AX2AX3AX4AX5AX6AX8AX9C1C2C3C4C5DM1DM10DM11DM12DM2DM4DM5DM6DM9ED1ED3ED4ES1ES2ES3GD1IC1M1M2M3M4P1P10P11P2P3P4P5P6P8P9PF1PF2PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X32X4X5

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a181f7-1982-7fca-8893-038c7182fff3.

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

Run transparency — what happened this run

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

  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 46,371 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 1,280 test source file(s) (.py, .ts, .tsx, .vb, .php, .java, .go, .mjs, .cjs, .js) that it cannot: it parses C# syntax and matches C# test attributes, so a vitest/jest/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.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its NuGet package 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.
  • D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A hotspot's complexity is meant to be the worst body its churn actually touched. For src/Kennel.Ui/Layout/KennelLayout.razor, src/Kennel.Watchdog.Core/Repositories/Pages/RepoFindings/RepoFindings.razor, engine/src/CodeHealth.CodeModel.FSharp/SyntaxModel.fs that could not be established — the complexity reader for the file reports no body extents, or the history carries no per-line attribution — so the row quotes the file's worst body, which the counted changes may never have touched. The churn count is unaffected.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (5 contributor(s) across 14012 commit(s) sampled, automation and bot accounts excluded). One of them holds 100% of the history; the other 4 hold 0% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Cannot open project 'engine/src/CodeHealth.CodeModel.FSharp/CodeHealth.CodeModel.FSharp.fsproj' because the file extension '.fsproj' is not associated with a language.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — evaluation did not complete — Naming Consistency not included (check did not complete) — excluded from the score.
  • D23 Boundary Type-Coupling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind measured 0/40 valid on a seeded held-out sample of its rows on 98 C# repositories (docs/plans/deterministic-engine/adjudication/P5c-D23-units.md, "Version 1 ON MAIN"): the noise rows were dependencies on layer folders, shared cores and grouping folders read as contexts. By the pre-registered fallback (PREREGISTRATION v37) it publishes no row until version 4 passes its gate. The candidates are counted here, not reported as findings, and the score does not include them.
  • D24 Comment Value — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • D28 Secrets (history) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `gitleaks` TIMED OUT after 239.1s against a 239s budget, so we killed its process tree. The budget is ours; the work may simply be larger than it allows. Nothing about this repository is asserted by the absence of a result; the budget is ours to raise, and raising it is our backlog item, not an action for this repository's owner.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `deploy/schema-epoch-gate.cs`, `engine/sidecars/java-spoon/src/main/java/dev/canine/codehealth/java/Fallback.java`, `engine/sidecars/kotlin-frontend/src/main/kotlin/dev/canine/codehealth/kotlin/Tokenizer.kt`, `engine/sidecars/scala-frontend/src/main/scala/dev/canine/codehealth/scala/Discover.scala`, `engine/sidecars/scala-frontend/src/main/scala/dev/canine/codehealth/scala/Fallback.scala`, … (+1420 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence.
  • DM2 Strongly-typed ids — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 333 further occurrence(s) are not listed individually; the score already reflects all 373.
  • DM8 Value-object opportunities — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds primitive parameters that travel together through several signatures of the domain (a missing value object). Its deterministic rule has not yet shown 95 % precision on adjudicated rows, so the clumps it finds are counted here and not published as findings, and the card carries no score. That is a limit of the analyzer, not a finding about your code.
  • DM9 Scattered domain decisions — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare it.
  • DM9 Scattered domain decisions — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The frontend declares that it computes whether a construction is produced or passed, yet 107 of 224 constructions arrived without the answer. Arm two skipped them; it did not clear them.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check classifies a mutation as idempotent when a guard is visible (an exists check, an upsert, an idempotency key or inbox, a versioned or fixed-value write) and as at risk only on positive evidence that a re-run double-applies it (a fresh-identity insert, an accumulation, a growing collection, an unkeyed outbound send or charge). The rest show neither, and they are the majority here, so a score over the classified minority would not describe this repository. That is a limit of the analyzer, not a finding about your code.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 28 further occurrence(s) are not listed individually; the score already reflects all 68.
  • X2 Cancellation propagation — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 113 further occurrence(s) are not listed individually; the score already reflects all 153.
  • X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 16 further occurrence(s) are not listed individually; the score already reflects all 56.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 14 further occurrence(s) are not listed individually; the score already reflects all 54.
  • X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 172 further occurrence(s) are not listed individually; the score already reflects all 212.

Repo exclusion declarations: 32 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • 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.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 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.
  • 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.
  • D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
  • 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 is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
  • 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.
  • D25 ADR Conformance: ADR conformance is the LLM-scored fraction of sampled code that follows recorded decisions — it checks the decisions that were written down and the slices it sampled, not unrecorded rules or the whole tree.
  • 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.
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • C3 Audit Trail: This control is scored from in-repo evidence only — a working control configured outside the repository leaves no signal a static scan can credit.
  • C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
  • C5 Data-Subject Rights: This control is scored from in-repo evidence only — absence of evidence here means the scan found no in-repo trace, not that the control does not exist.
  • DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

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

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

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

385 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was DisclosurePolicyReading.Judge at 59. A further 126 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being SecurityAndPerfToolingAnalyzer.HasDedicatedSastSignal at 48 — they are counted neither in the figure above nor in this dimension's score. 89 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: engine/src/Scanner/Readiness/P3/SecurityAndPerfToolingAnalyzer.cs (SecurityAndPerfToolingAnalyzer.HasDedicatedSastSignal at 48), engine/src/Core/SourceCensus/DiskSourceFiles.cs (DiskSourceFiles.IsNeverProductionSourceFile at 31), engine/src/Core/Frontend/JsFunctionScanner.cs (JsFunctionScanner.ClassifyOpenBrace at 30), engine/src/Scanner/Security/Shared/Scanners/SecretNoiseFilter.cs (SecretNoiseFilter.IsExcusedUnderGenericRule at 30), engine/sidecars/java-spoon/src/main/java/dev/canine/codehealth/java/EmitterNames.java (EmitterNames.special at 27), and 84 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

DisclosurePolicyReading.Judge (cyclomatic 59)engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyReading.cs:50
ProgrammeTrackedFacts.Collect (cyclomatic 54)src/Kennel.Core/LanguageTraining/Services/ProgrammeTrackedFacts.cs:72
TurnRunner.RunTurnAsync (cyclomatic 54)src/Kennel.Improve.Orchestrator/Turns/TurnRunner.cs:196
Builder.ParseMarkdown (cyclomatic 52)engine/src/Scanner/Docs/D19/MarkupDocument.cs:206
ComplianceContractsBackfill.SurveyAsync (cyclomatic 51)src/Kennel.Core/Compliance/Application/ComplianceContractsBackfill.cs:75

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

What to do

  1. Bring the 49 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with DisclosurePolicyReading.Judge (cyclomatic 59), ProgrammeTrackedFacts.Collect (cyclomatic 54), TurnRunner.RunTurnAsync (cyclomatic 54). — 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 49 together lifts Cyclomatic Complexity from 6.6 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

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

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

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

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

644 method(s) exceeded the cognitive complexity threshold of 15; the worst was ComplianceContractsBackfill.SurveyAsync at 99.

ComplianceContractsBackfill.SurveyAsync (cognitive 99)src/Kennel.Core/Compliance/Application/ComplianceContractsBackfill.cs:75
CleartextTransmissionScan.Lex (cognitive 87)engine/src/Scanner/Security/D29/Scanners/CleartextTransmissionScan.cs:831
Builder.ParseMarkdown (cognitive 82)engine/src/Scanner/Docs/D19/MarkupDocument.cs:206
CiTestGateSites.Js (cognitive 77)engine/src/Scanner/Readiness/P12/CiTestGateSites.cs:350
CommentRedundancy.JudgeAsync (cognitive 75)engine/src/Scanner/Docs/D24/CommentRedundancy.cs:156

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

What to do

  1. Bring the 10 bodies over 60 down to 60 or less in Cognitive Complexity — start with ComplianceContractsBackfill.SurveyAsync (cognitive 99), CleartextTransmissionScan.Lex (cognitive 87), Builder.ParseMarkdown (cognitive 82). — 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 10 together lifts Cognitive Complexity from 6.0 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

479 god class(es) detected.

TooManyMethods: ForeignComplianceScan · ×295engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.cs
FileTooLong: D36/SupplyChainProvenanceAnalyzer.cs · ×136engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs
MethodTooLong: AnalyzeCommand.ExecuteCoreAsync · ×22engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs:298
ClassTooLong: ScoringSpecModel · ×22engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs
TooManyFunctions: FSharpBody · ×2engine/src/CodeHealth.CodeModel.FSharp/Body.fs:17

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

What to do

  1. Resolve the 295 TooManyMethods finding(s) in God Classes — start with ForeignUncoveredIndexGuardScan.cs (2), DuplicationAnalyzer.cs (2), ForeignFixedElementGuardScan.cs (2). — One of this dimension's main actionable groups (295 warning-level).
  2. Resolve the 136 FileTooLong finding(s) in God Classes — start with SupplyChainProvenanceAnalyzer.cs, JsDuplicationDetector.cs, CompliancePrework.cs. — One of this dimension's main actionable groups (136 warning-level).
  3. Resolve the 22 MethodTooLong finding(s) in God Classes — start with AnalyzeCommand.cs, BillingDbContext.cs, LanguageTrainingDbContext.cs. — One of this dimension's main actionable groups (22 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.7 / 10Stronggated by 732 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.7 / 10 · rule-coverage 100% · ceiling Verified

680 duplicated block group(s) detected. A further 52 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 28 of the 732 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (5 lines × 2) · ×61engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:649
Duplicated block (10 lines × 2) · ×46engine/src/Scanner/Accessibility/AC6/FocusOutlineRemoval.cs:504
Duplicated block (8 lines × 2) · ×43engine/src/Core/Discovery/UnreadManifestDisclosure.cs:374
Duplicated block (7 lines × 2) · ×40engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs:116
Duplicated block (9 lines × 2) · ×39engine/src/Core/Architecture/Topology/Extractors/BicepExtractor.cs:155

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

What to do

  1. Resolve the 61 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with ForeignScopedGlobalMutationScan.Java.cs (2), SupplyChainProvenanceAnalyzer.cs (2), InternalApiConsistencyAnalyzer.cs (2). — One of this dimension's main actionable groups (61 warning-level).
  2. Resolve the 46 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with ForeignScopedGlobalMutationScan.Kotlin.cs (2), ForeignScopedGlobalMutationScan.Java.cs (2), FocusOutlineRemoval.cs. — One of this dimension's main actionable groups (46 warning-level).
  3. Resolve the 43 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with ForeignUntrustedLengthScan.Python.cs (2), ForeignFixedElementGuardScan.Kotlin.cs (2), GetItRegistrations.cs (2). — One of this dimension's main actionable groups (43 warning-level).

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

D5 · Coupling9.1 / 10Stronggated by 45 serious findings✓ 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 9.1 / 10 · rule-coverage 100% · ceiling Prevented

384 projects, 0 dependency cycle(s), 2 unstable depended-on project(s).

Off the main sequence: CodeHealth.Core.Synthesis · ×43engine/src/Core/Synthesis/CodeHealth.Core.Synthesis.csproj:1
Unstable project CodeHealth.Scanner.Complexity.Sharedengine/src/Scanner/Complexity/Complexity.Shared/CodeHealth.Scanner.Complexity.Shared.csproj:1
Unstable project CodeHealth.Core.Languages.Vb.CodeShapeengine/src/Core/Languages/Vb/CodeShape/CodeHealth.Core.Languages.Vb.CodeShape.csproj:1
Off the main sequence: CodeHealth.Core.ShapeContracts · ×13engine/src/Core/ShapeContracts/CodeHealth.Core.ShapeContracts.csproj:1

What to do

  1. Resolve the 43 Off the main sequence finding(s) in Coupling — start with CodeHealth.Core.Synthesis.csproj, CodeHealth.Core.Accessibility.csproj, CodeHealth.Core.Io.csproj. — One of this dimension's main actionable groups (43 warning-level).
  2. Resolve the 1 Unstable project CodeHealth.Scanner.Complexity.Shared finding(s) in Coupling — start with CodeHealth.Scanner.Complexity.Shared.csproj. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project CodeHealth.Core.Languages.Vb.CodeShape finding(s) in Coupling — start with CodeHealth.Core.Languages.Vb.CodeShape.csproj. — One of this dimension's main actionable groups (1 warning-level).

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

D6 · Cohesion (LCOM4)10.0 / 10Stronggated by 5 serious findings✓ Tool-verified

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

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

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

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

5 of 1464 classes have LCOM4 above 3.

Low cohesion: ScalaShape (LCOM4 10) · ×5engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs:134

What to do

  1. Resolve the 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with ForeignUnsynchronisedHandoffScan.Scala.cs, Model.cs, HostSampler.cs. — One of this dimension's main actionable groups (5 warning-level).

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

D7 · Architectural Integrity10.0 / 10Exemplary✓ Tool-verified

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

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

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

All 12 mechanizable ADR(s) are enforced: 12 by analyzers, 0 by tests. Cycles found: 0.

✓ On the Gold path — maintain.

Detailed fixes: d7_recommendation.md.

D8 · Code Coverage9.9 / 10Exemplary✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

Line coverage 78.5% — read from a committed cobertura report (tools/train/backlog-sessions/01a092f6-f3c2-754f-b7f2-bd802ec4404a/specimen-cobertura-coverage.xml); the in-image collector couldn't run the suite (commonly external-service dependencies). A real measurement, but from a committed artifact rather than a fresh in-image run.

Coverage read from a committed report

✓ On the Gold path — maintain.

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

D9 · Test Distribution10.0 / 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

47631 test methods: 47364 unit, 263 integration, 0 BDD, 4 e2e. The JavaScript/TypeScript suite contributes 600 `it`/`test` case(s) across 114 test file(s) declaring at least one beside 46029 .NET test method(s); its tier split is read from package names and paths only. The Rust suite contributes 105 `#[test]` function(s) across 2 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 703 test function(s) across 78 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. The Go suite contributes 80 test case(s) across 18 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 0 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one. The java, php, swift suite(s) contribute 114 test method(s), read from the language model's own test census — every XCTest `test…` method on an XCTestCase, every swift-testing `@Test` and every JUnit/TestNG `@Test`-annotated method, which is those frameworks' own discovery rule. Their tier split is INFERRED from the test target's name and path only, not declared.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

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

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

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

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

0 skipped, 0 zero-assertion, 16 racing the wall clock, no mocking-framework packages referenced (hand-written doubles or no mocking) across 46371 tests. Measured on the C# suite only — at least 1,280 test source file(s) (.py, .ts, .tsx, .vb, .php, .java, .go, .mjs, .cjs, .js) went unread, so its test quality is unmeasured and is not in these counts.

Races the wall clock: An_Expired_Username_Invite_Is_Not_Claimed · ×16tests/Kennel.Billing.Tests/OrgInvitationClaimHookTests.cs:103

What to do

  1. Resolve the 16 Races the wall clock finding(s) in Test Quality — start with OrgTeamDirectoryTests.cs (5), TeamMembershipTests.cs (5), TwoWorkersPostgresTests.cs (3). — One of this dimension's main actionable groups (16 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). unit: not included — too large to re-run within its budget; integration: not included — too large to re-run within its budget; other: measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene4.2 / 10Weak✓ Tool-verified

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

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

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

50 outdated, 0 vulnerable, 3 deprecated, 2 prerelease packages. Those are the NuGet packages; this repository's npm dependencies were read too — 36 outdated of 80 package(s) across 9 lockfile(s).

Deprecated: Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit · ×4engine/Directory.Packages.props:141
Prerelease dependency: Cai.Scoring · ×2
Outdated (npm): mkdirp · ×3engine/tests/CodeHealth.Tests.Concepts/suites/vulnerable-dependency/typescript/repo/packages/api/package.json:14
Outdated: System.Resources.Extensions · ×2engine/Directory.Packages.props:24
Outdated: Microsoft.Extensions.Configuration.Abstractions · ×48

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

What to do

  1. Resolve the 4 Deprecated finding(s) in Dependency Hygiene — start with Directory.Packages.props (4). — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 3 Outdated (npm) finding(s) in Dependency Hygiene — start with package.json (2). — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 2 Prerelease dependency finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (2 warning-level).
  4. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

Secret scan ran and found no leaked secrets. 20 detection(s) in paths this repository declares as reviewed specimen content (its credential-scanner allowlist) were excluded.

✓ 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 356 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 60 direct `PackageReference`(s), and 189 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

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

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

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

Top hotspots: engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs (215×15=3225); engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs (54×36=1944); engine/src/Core/SourceCensus/DiskSourceFiles.cs (59×31=1829) Repeated repair below the complexity floor: src/Kennel.Improve.Orchestrator/Ports/Ports.cs (16 of 22 changes were fixes); engine/src/CodeHealth.Reporting/Briefing/BriefText.cs (13 of 18 changes were fixes); engine/src/Core/Manifests/BuildUnits.cs (11 of 13 changes were fixes)

Hotspot: engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs · ×139engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs:298
Repeated repair: src/Kennel.Improve.Orchestrator/Ports/Ports.cs · ×24src/Kennel.Improve.Orchestrator/Ports/Ports.cs:53

What to do

  1. Resolve the 139 Hotspot finding(s) in Churn × Complexity Hotspots — start with AnalyzeCommand.cs, ExecutiveBrief.cs, DiskSourceFiles.cs. — One of this dimension's main actionable groups (139 warning-level).
  2. Resolve the 24 Repeated repair finding(s) in Churn × Complexity Hotspots — start with Ports.cs, BriefText.cs, BuildUnits.cs. — One of this dimension's main actionable groups (24 warning-level).

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

D17 · Explicit Debt9.9 / 10Adequategated by 31 critical findings✓ Tool-verified

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

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

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

44 deducted debt markers + unmeasured dead symbols across 1091246 LoC in the .NET projects (0.0/KLoC) → score 9.9. Dead code not measured: the solution did not load cleanly, so the reference search was skipped.

EmptyCatchBlock · ×30engine/src/CodeHealth.Cli/Commands/RoslynLoadDiagnosis.cs:376
NoWarnInCsprojtests/Kennel.Analyzers.Tests/Kennel.Analyzers.Tests.csproj:6
BarePragmaDisable · ×6engine/src/Core/Api/SbtPluginProjects.cs:99
TodoComment · ×5engine/src/CodeHealth.Reporting/FileQuality/FileQualityScorer.cs:62
XxxComment · ×2engine/tests/CodeHealth.Tests.Unit/ExplicitDebt/RoslynExplicitDebtCollectorTests.cs:2248

What to do

  1. Resolve the 30 EmptyCatchBlock finding(s) in Explicit Debt — start with ScanBudgets.cs (4), EngineScanExecutor.cs (3), REDACTED (3). — One of this dimension's main actionable groups (30 issue-level).
  2. Resolve the 1 NoWarnInCsproj finding(s) in Explicit Debt — start with Kennel.Analyzers.Tests.csproj. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 6 BarePragmaDisable finding(s) in Explicit Debt — start with NxDependencyConstraints.cs (3), SbtPluginProjects.cs, DependencyCruiserRules.cs. — One of this dimension's main actionable groups (6 warning-level).

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

D18 · Solution Shape10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the solution is laid out in a sensible, conventional structure.

Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.

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

384 projects, 11187 source files, 2119308 hand-written lines of code (1091246 production / 1028062 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), plus 131219 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 2348 inter-project edges. Measured across 2 solutions loaded as one workspace: `engine/CodeHealth.sln`, `Kennel.slnx`.

✓ On the Gold path — maintain.

Detailed fixes: d18_recommendation.md.

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

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

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

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

2 of 2 documentation facets pass in full. 803 document(s) read across 331 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality9.8 / 10Exemplary✓ Tool-verified

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

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

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

1 of 12 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.

ADR superseded but its status says otherwisedocs/adr/0002-event-sourcing-scope.md:1detected by adr-integrity

✓ On the Gold path — maintain.

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

D23 · Boundary Type-Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.

Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.

Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.

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

2083 domain type(s) cross context boundaries across 31 contexts; they are measured and withheld (not published, not scored).

AccessGrants: 10 contract type(s) expose producer-owned ids/enums
Accounts: 28 contract type(s) expose producer-owned ids/enums
Admin: 1 contract type(s) expose producer-owned ids/enums
Agents: 24 contract type(s) expose producer-owned ids/enums
Architecture: 2 contract type(s) expose producer-owned ids/enums

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

✓ On the Gold path — maintain.

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

D24 · Comment Value9.9 9.7 / 10Exemplary✓ 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 9.7 / 10 · rule-coverage 98% · ceiling Documented

47 of 47117 judged comments only repeat the code they sit on (0.1 %). 1433 comment(s) in another language or script were not judged.

redundant comment · ×47engine/src/CodeHealth.Llm.Abstractions/Validation/LlmFindingIntegrity.cs:627
doc comments repeat the names · ×67engine/src/CodeHealth.Core/CodeModel/CodeToken.cs:23

✓ On the Gold path — maintain.

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

D25 · ADR Conformance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the code actually follows the decisions recorded in the project's ADRs.

Method: Judged by language model at low temperature against ADRs plus a deterministic structural code summary; findings linked to repo-rooted ADR paths for traceability. Advisory.

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

0 of 2 checkable records are broken by the code or by their own declared delivery (2 of 11 binding records state a rule in checkable form or declare their delivery; prose decisions are unverifiable).

✓ On the Gold path — maintain.

Detailed fixes: d25_recommendation.md.

D26 · Project Cohesion9.6 / 10Exemplary✓ Tool-verified

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

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

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

8 of 384 projects flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion
Split CodeHealth.Coreengine/src/CodeHealth.Core/CodeHealth.Core.csproj:1
Split CodeHealth.Reportingengine/src/CodeHealth.Reporting/CodeHealth.Reporting.csproj:1
Split Kennel.Coresrc/Kennel.Core/Kennel.Core.csproj:1
Split Kennel.Watchdog.Coresrc/Kennel.Watchdog.Core/Kennel.Watchdog.Core.csproj:1

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

✓ On the Gold path — maintain.

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

D27 · Navigability9.1 / 10Exemplary✓ Tool-verified

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

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

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

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

74 % of calls cross a namespace and 6 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: large — vertical-slice locality expected.

Pass-through layer · ×9engine/src/Core/Languages/Java/JavaDomainConventions.cs:752

✓ On the Gold path — maintain.

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

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

20 finding(s): 0 critical, 0 high, 20 medium, 0 low. semgrep hit a parse error in 1551 file(s) — `deploy/assert-preprod-touches-no-prod.sh` (lines 48–132), `deploy/bg-cutover.sh` (line 29), `deploy/compute-version.sh` (line 74, lines 74–75), `deploy/dgx1/switch-to-bf16-cached.sh` (line 50, line 57), `deploy/dgx1/switch-to-fp8.sh` (line 82), … (+1546 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. In 1199 of those file(s) — `engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs`, `engine/src/CodeHealth.Cli/Commands/DimensionsCommand.cs`, `REDACTED`, `engine/src/CodeHealth.Cli/Commands/EditionScanCommand.cs`, `engine/src/CodeHealth.Cli/Commands/SpecCommand.cs`, … (+1194 more) — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them. In 191 of those file(s) — `engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs`, `engine/src/CodeHealth.Core/Scoring/RubricPublicationGuard.cs`, `engine/src/CodeHealth.Llm.Abstractions/ILlmProvider.cs`, `engine/src/CodeHealth.Reporting/Changelog/ChangelogNarrator.cs`, `engine/src/CodeHealth.Reporting/Distillation/CapabilityGrouper.cs`, … (+186 more) — the break is at a TYPE DECLARATION (a C# primary constructor semgrep's grammar cannot parse), so the loss is wider than the named lines: rules scoped to that type see no type to scope to and are blind over its whole body, while rules matching statements keep working there. Absence of a type-scoped finding in those types is not evidence of anything. Separately, one or more rules could not re-parse an embedded snippet in 7 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

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

What to do

  1. Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).

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

D30 · Dependency Vulnerabilities9.8 / 10Stronggated by 1 serious finding✓ 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 9.8 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED

What to do

  1. Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D31 · IaC & Container Security9.2 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling10.0 / 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: NoiseSplit.cs↔AdvisoryCatalog.cs 80%

Change coupling: NoiseSplit.cs ↔ AdvisoryCatalog.cssrc/Kennel.Core/LanguageTraining/Services/NoiseSplit.cs:1

What to do

  1. Resolve the 1 Change coupling finding(s) in Change Coupling — start with NoiseSplit.cs. — 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 & Signing10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

Build pipeline generates provenance, signs artifacts and produces an SBOM.

REDACTED

✓ On the Gold path — maintain.

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

D39 · IL Efficiency9.8 / 10Exemplary✓ Tool-verified

Method: IL instruction count per method, read from the BUILT first-party assemblies via Mono.Cecil (the target is compiled on a deep run); scored on the fraction of methods whose emitted IL body exceeds the size threshold. Sees compiler-generated bloat source can't; not-applicable when the target fails to build. Deterministic.

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

720 of 62723 first-party methods have an oversized IL body.

IL efficiency: 720 authored method(s) exceed the IL budgetengine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:987

✓ On the Gold path — maintain.

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC4 · Keyboard semantics10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC6 · Visual & motion safety7.9 / 10Strong✓ Tool-verified

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

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

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

  • `.info-hint:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/Kennel.Ui/wwwroot/app.css:891
  • `.rail-find-input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/Kennel.Ui/wwwroot/app.css:1217
  • `.mm-node:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/Kennel.Ui/wwwroot/app.css:2955
  • `.team-card-link .team-card-name:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/Kennel.Ui/wwwroot/app.css:3034
  • `.mainseq a:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/Kennel.Ui/wwwroot/app.css:3125

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AC7 · A11y enforcement10.0 / 10Exemplary✓ Tool-verified

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

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

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

AX1 · Captive dependencies8.0 / 10Strong✓ Tool-verified

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

  • `OpenAiCompatibleLlmProvider` is registered as a SINGLETON but its constructor takes `IOpenAiCompatibleHttpClient http`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `IOpenAiCompatibleHttpClient` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes. — engine/src/CodeHealth.Llm.OpenAiCompatible/OpenAiCompatibleLlmProvider.cs:16

What to do

  • Don't inject scoped/transient services into singletons; resolve them per-use via IServiceScopeFactory or a factory delegate, or align the lifetimes.
AX10 · Code composition9.5 / 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.

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.
AX2 · Stateful singletons7.5 / 10Strong✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

  • `LlmCacheLocation` is a singleton (one shared instance) but mutates instance state outside any lock (_directory, IsOverridden; e.g. `_directory` at line 49). — engine/src/CodeHealth.Llm.Abstractions/Caching/LlmCacheLocation.cs:24
  • `CopilotCliRunner` is a singleton (one shared instance) but mutates instance state outside any lock (_available; e.g. `_available` at line 51). — engine/src/CodeHealth.Llm.CopilotCli/Process/CopilotCliRunner.cs:9
  • `NodeDependencyInstaller` is a singleton (one shared instance) but mutates instance state outside any lock (_environment; e.g. `_environment` at line 61). — engine/src/Core/Testing/NodeDependencyInstaller.cs:25
  • `LeaderGatedHostedService` is a singleton (one shared instance) but mutates instance state outside any lock (Runs; e.g. `Runs` at line 153). — src/Kennel.Hosting/LeaderGatedHostedService.cs:38
  • `InstanceHeartbeatHostedService` is a singleton (one shared instance) but mutates instance state outside any lock (_drainWrite; e.g. `_drainWrite` at line 166). — src/Kennel.Core/Runtime/InstanceHeartbeatHostedService.cs:28
  • `DispatcherHostedService` is a singleton (one shared instance) but mutates instance state outside any lock (_cooldown; e.g. `_cooldown` at line 113). — src/Kennel.Watchdog.Core/Scheduling/Services/SchedulingHostedServices.cs:70
  • `DeployHealthRecorder` is a singleton (one shared instance) but mutates instance state outside any lock (_healthTail; e.g. `_healthTail` at line 365). — src/Kennel.Admin.Core/Admin/Services/DeployHealthRecorder.cs:248
  • `EntraSecretRotationService` is a singleton (one shared instance) but mutates instance state outside any lock (_lastNotifiedOn; e.g. `_lastNotifiedOn` at line 181). — src/Kennel.Admin.Core/Admin/Services/EntraSecretRotationService.cs:31

What to do

  • Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
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.

  • The namespaces CodeHealth.Core.Dimensions ↔ CodeHealth.Core.Scoring depend on each other. The lightest dependency in the cycle is CodeHealth.Core.Scoring → CodeHealth.Core.Dimensions (CodeHealth.Core.Scoring.AggregateScoreCalculator → CodeHealth.Core.Dimensions.DimensionResult, 10 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — engine/src/CodeHealth.Core/Scoring/AggregateScoreCalculator.cs:2
  • The namespaces CodeHealth.Reporting ↔ CodeHealth.Reporting.Recommendations depend on each other. The lightest dependency in the cycle is CodeHealth.Reporting → CodeHealth.Reporting.Recommendations (CodeHealth.Reporting.RunReport → CodeHealth.Reporting.Recommendations.Recommendation, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — engine/src/CodeHealth.Reporting/RunReport.cs:8
  • The namespaces CodeHealth.Llm.OpenAiCompatible ↔ CodeHealth.Llm.OpenAiCompatible.Http depend on each other. The lightest dependency in the cycle is CodeHealth.Llm.OpenAiCompatible.Http → CodeHealth.Llm.OpenAiCompatible (CodeHealth.Llm.OpenAiCompatible.Http.OpenAiCompatibleHttpClient → CodeHealth.Llm.OpenAiCompatible.OpenAiCompatibleOptions, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — engine/src/CodeHealth.Llm.OpenAiCompatible/Http/OpenAiCompatibleHttpClient.cs:31
  • The namespaces CodeHealth.Llm.ClaudeCli ↔ CodeHealth.Llm.ClaudeCli.Process depend on each other. The lightest dependency in the cycle is CodeHealth.Llm.ClaudeCli → CodeHealth.Llm.ClaudeCli.Process (CodeHealth.Llm.ClaudeCli.ClaudeCliLlmProvider → CodeHealth.Llm.ClaudeCli.Process.IClaudeCliRunner, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — engine/src/CodeHealth.Llm.ClaudeCli/ClaudeCliLlmProvider.cs:4
  • The namespaces CodeHealth.Llm.CopilotCli ↔ CodeHealth.Llm.CopilotCli.Process depend on each other. The lightest dependency in the cycle is CodeHealth.Llm.CopilotCli → CodeHealth.Llm.CopilotCli.Process (CodeHealth.Llm.CopilotCli.CopilotCliLlmProvider → CodeHealth.Llm.CopilotCli.Process.ICopilotCliRunner, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — engine/src/CodeHealth.Llm.CopilotCli/CopilotCliLlmProvider.cs:4
  • The namespaces Kennel.Core.Metrics.Contracts ↔ Kennel.Core.Metrics.Domain.Events depend on each other. The lightest dependency in the cycle is Kennel.Core.Metrics.Contracts → Kennel.Core.Metrics.Domain.Events (Kennel.Core.Metrics.Contracts.IMetricsWriter → Kennel.Core.Metrics.Domain.Events.ScanRunLedger, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Core/Metrics/Contracts/IMetricsWriter.cs:14
  • The namespaces Kennel.Core.Deliveries.Persistence ↔ Kennel.Core.Deliveries.ReadModel depend on each other. The lightest dependency in the cycle is Kennel.Core.Deliveries.Persistence → Kennel.Core.Deliveries.ReadModel (Kennel.Core.Deliveries.Persistence.DeliveriesDbContext → Kennel.Core.Deliveries.ReadModel.PublishedDeliveryView, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Core/Deliveries/Persistence/DeliveriesDbContext.cs:1
  • The namespaces Kennel.Core.Scans.Contracts ↔ Kennel.Core.Scans.Domain.Events ↔ Kennel.Core.Scans.Events ↔ Kennel.Core.Scans.Execution ↔ Kennel.Core.Scans.Persistence ↔ Kennel.Core.Scans.Produce ↔ Kennel.Core.Scans.ReadModel ↔ Kennel.Core.Scans.ReadModels ↔ Kennel.Core.Scans.Sources depend on each other. The lightest dependency in the cycle is Kennel.Core.Scans.Events → Kennel.Core.Scans.Persistence (Kennel.Core.Scans.Events.ScanEventPublisher → Kennel.Core.Scans.Persistence.ScansDbContext, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Core/Scans/Events/ScanEvents.cs:141
  • The namespaces Kennel.Core.Billing ↔ Kennel.Core.Billing.Services ↔ Kennel.Core.Commercial.Contracts depend on each other. The lightest dependency in the cycle is Kennel.Core.Commercial.Contracts → Kennel.Core.Billing (Kennel.Core.Commercial.Contracts.CommercialCatalogSnapshot → Kennel.Core.Billing.PriceBook, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Core/Commercial/Contracts/CommercialCatalogSnapshot.cs:1
  • The namespaces Kennel.Core.Repositories.Advisory ↔ Kennel.Core.Repositories.Persistence ↔ Kennel.Core.Repositories.Services depend on each other. The lightest dependency in the cycle is Kennel.Core.Repositories.Advisory → Kennel.Core.Repositories.Persistence (Kennel.Core.Repositories.Advisory.AdvisoryVisibilityService → Kennel.Core.Repositories.Persistence.RepositoriesDbContext, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Core/Repositories/Advisory/AdvisoryVisibilityService.cs:1
  • The namespaces Kennel.Watchdog.Agents.ReadModels ↔ Kennel.Watchdog.Agents.Services depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Agents.ReadModels → Kennel.Watchdog.Agents.Services (Kennel.Watchdog.Agents.ReadModels.RepoFindingsReadModel → Kennel.Watchdog.Agents.Services.AgentFinding, 4 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Watchdog.Core/Agents/ReadModels/RepoFindingsReadModel.cs:5
  • The namespaces Kennel.Watchdog.Trackers ↔ Kennel.Watchdog.Trackers.Sync depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Trackers → Kennel.Watchdog.Trackers.Sync (Kennel.Watchdog.Trackers.ITaskTracker → Kennel.Watchdog.Trackers.Sync.PlanTicketDraft, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Watchdog.Core/Trackers/ITaskTracker.cs:2
  • The namespaces Kennel.Watchdog.Onboarding.Kickoff ↔ Kennel.Watchdog.Reporting.Composition ↔ Kennel.Watchdog.Reporting.Distillation ↔ Kennel.Watchdog.Reporting.Persistence ↔ Kennel.Watchdog.Reporting.Publishing ↔ Kennel.Watchdog.Teams ↔ Kennel.Watchdog.Teams.ReadModels depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Onboarding.Kickoff → Kennel.Watchdog.Reporting.Publishing (Kennel.Watchdog.Onboarding.Kickoff.ReportStepsReader → Kennel.Watchdog.Reporting.Publishing.PublishRecordStore, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Watchdog.Core/Onboarding/Kickoff/ReportStepsReader.cs:4
  • The namespaces Kennel.Admin.Health ↔ Kennel.Admin.Mcp ↔ Kennel.Admin.ReadModels ↔ Kennel.Admin.Services depend on each other. The lightest dependency in the cycle is Kennel.Admin.Mcp → Kennel.Admin.ReadModels (Kennel.Admin.Mcp.MaintainerMcpTools → Kennel.Admin.ReadModels.SystemHealthReadModel, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Admin.Core/Admin/Mcp/MaintainerMcpTools.cs:5
  • The namespaces Kennel.Core.AccessGrants.Persistence ↔ Kennel.Core.AccessGrants.Privacy ↔ Kennel.Core.AccessGrants.ReadModel depend on each other. The lightest dependency in the cycle is Kennel.Core.AccessGrants.Persistence → Kennel.Core.AccessGrants.Privacy (Kennel.Core.AccessGrants.Persistence.AccessGrantsDbContext → Kennel.Core.AccessGrants.Privacy.EmailProtectionKey, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Core/AccessGrants/Persistence/AccessGrantsDbContext.cs:1
  • The namespaces Kennel.Core.Compliance.Activation ↔ Kennel.Core.Compliance.Contracts ↔ Kennel.Core.Compliance.Persistence depend on each other. The lightest dependency in the cycle is Kennel.Core.Compliance.Persistence → Kennel.Core.Compliance.Activation (Kennel.Core.Compliance.Persistence.ComplianceDbContext → Kennel.Core.Compliance.Activation.RepositoryComplianceSetting, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Core/Compliance/Persistence/ComplianceDbContext.cs:1
  • The namespaces Kennel.Assay.DecisionReports ↔ Kennel.Assay.DecisionReports.Domain ↔ Kennel.Assay.DecisionReports.Domain.Events ↔ Kennel.Assay.DecisionReports.Persistence ↔ Kennel.Assay.DecisionReports.Projections ↔ Kennel.Assay.DecisionReports.Queries ↔ Kennel.Assay.DecisionReports.Subscriptions depend on each other. The lightest dependency in the cycle is Kennel.Assay.DecisionReports → Kennel.Assay.DecisionReports.Queries (Kennel.Assay.DecisionReports.BuildDecisionReportHandler → Kennel.Assay.DecisionReports.Queries.DecisionReportListQueries, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Assay.Core/DecisionReports/BuildDecisionReport.cs:4
  • The namespaces Kennel.Assay.Governance.Persistence ↔ Kennel.Assay.Governance.Projections depend on each other. The lightest dependency in the cycle is Kennel.Assay.Governance.Persistence → Kennel.Assay.Governance.Projections (Kennel.Assay.Governance.Persistence.GovernanceDbContext → Kennel.Assay.Governance.Projections.BarCatalogView, 6 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Assay.Core/Governance/Persistence/GovernanceDbContext.cs:2
  • The namespaces Kennel.Core.Ingestion.Persistence ↔ Kennel.Core.Ingestion.Tokens depend on each other. The lightest dependency in the cycle is Kennel.Core.Ingestion.Persistence → Kennel.Core.Ingestion.Tokens (Kennel.Core.Ingestion.Persistence.IngestionDbContext → Kennel.Core.Ingestion.Tokens.IngestToken, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Core/Ingestion/Persistence/IngestionDbContext.cs:1
  • The namespaces Kennel.Improve.Orchestrator.Gates ↔ Kennel.Improve.Orchestrator.Queue ↔ Kennel.Improve.Orchestrator.Turns depend on each other. The lightest dependency in the cycle is Kennel.Improve.Orchestrator.Queue → Kennel.Improve.Orchestrator.Turns (Kennel.Improve.Orchestrator.Queue.PackageSelector → Kennel.Improve.Orchestrator.Turns.Elsewhere, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Improve.Orchestrator/Queue/PackageSelector.cs:3
  • The namespaces Kennel.Watchdog.Scheduling ↔ Kennel.Watchdog.Scheduling.Dispatch ↔ Kennel.Watchdog.Scheduling.Services depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Scheduling → Kennel.Watchdog.Scheduling.Services (Kennel.Watchdog.Scheduling.SchedulingModule → Kennel.Watchdog.Scheduling.Services.RunEtaService, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Watchdog.Core/Scheduling/SchedulingModule.cs:8
  • The namespaces Kennel.Watchdog.Architecture.Application ↔ Kennel.Watchdog.Architecture.Model depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Architecture.Application → Kennel.Watchdog.Architecture.Model (Kennel.Watchdog.Architecture.Application.C4ModelService → Kennel.Watchdog.Architecture.Model.C4Finding, 3 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Watchdog.Core/Architecture/Application/C4ModelService.cs:2
  • The namespaces Kennel.Watchdog.Reporting ↔ Kennel.Watchdog.Reporting.Rendering depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Reporting.Rendering → Kennel.Watchdog.Reporting (Kennel.Watchdog.Reporting.Rendering.ArtifactCuration → Kennel.Watchdog.Reporting.ReportKind, 3 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Kennel.Watchdog.Core/Reporting/Rendering/ArtifactCuration.cs:16

What to do

  • Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
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.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

AX6 · Interface segregation9.9 / 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.

  • `ICallSite` declares 23 members: `InvokedMemberName`, `ResolvedOwnerType`, `ResolvedOwnerNamespace`, `IsResolved`, `IsObjectCreation`, `CalleeResolution`, `IsProducedResult`, `ArgumentTypes`, `ReceiverIsDeclaredMemberOfContainingType`, `ReceiverMemberName`, `ReceiverIsMethodLocalBuffer`, `ReceiverIsImplicitSelfCall`, `InAsyncFunction`, `ViaEnclosingInstance`, `InCriticalSection`, `ReceiverIsSelf`, `ReceiverIsPackageVariable`, `InHandlerLiteral`, `RouteHandlerLine`, `ReceiverIsCaptured`, `ReceiverModule`, `GatedOn`, `GatedOnFalse`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/CodeHealth.Core/CodeModel/ICallSite.cs:5
  • `ICodeType` declares 83 members: `Kind`, `IsRecord`, `IsAbstract`, `IsSealed`, `IsStatic`, `IsValueType`, `IsGenericType`, `Name`, `Namespace`, `AssemblyName`, `ProjectName`, `Accessibility`, `ExportedBy`, `IsDocumentedNonPublic`, `TypeParameters`, `BaseType`, `HasMeaningfulBase`, `DirectInterfaces`, `AllInterfaces`, `AllInterfaceRefs`, `Special`, `Location`, `IsGenerated`, `Members`, `UnionCases`, `Attributes`, `EmbeddedTypes`, `UnderlyingType`, `PackageTypes`, `Language`, `IsSingleton`, `IsMixin`, `MixinNames`, `FileImports`, `DerivesClause`, `RecoveryFoldCount`, `RecoveryFoldCalls`, `ConstructionCalls`, `CommandCalls`, `BypassConstructions`, and 43 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/CodeHealth.Core/CodeModel/ICodeType.cs:5
  • `IMethodBody` declares 21 members: `Calls`, `Assignments`, `Increments`, `GlobalWrites`, `Catches`, `IsAsync`, `ReturnsVoid`, `IsProgramOnly`, `RejectsWhenAlreadyPresent`, `RejectsArgumentAlreadyPresent`, `AnswersArgumentAlreadyPresent`, `HandlerExcerpt`, `ReturnsThis`, `ReferencedIdentifiers`, `MemberAccesses`, `Decisions`, `Literals`, `Branches`, `LogicalLineCount`, `RawText`, `StrippedText`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/CodeHealth.Core/CodeModel/IMethodBody.cs:9
  • `IGitProviderClient` declares 21 members: `Provider`, `ListRepositoriesAsync`, `ListRepositoriesAsync`, `GetRepositoryAsync`, `LookupPublicRepositoryAsync`, `CreateCloneTokenAsync`, `ResolveAndMintCloneTokenAsync`, `AppInstallUrlAsync`, `ListInstallationsAsync`, `GetInstallationAccountLoginAsync`, `ListUserInstallationIdsAsync`, `ExchangeOAuthCodeAsync`, `CanExchangeOAuthCode`, `ValidateAccessAsync`, `GetAuthenticatedAccountLoginAsync`, `RefreshOAuthTokenAsync`, `GetPermissionLevelAsync`, `ListCollaboratorsAsync`, `UpsertMarkerIssueAsync`, `HasCodeScanningReadPermissionAsync`, `GetLatestCodeScanningSarifAsync`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 21 declarations carry 20 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 20 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Kennel.Core/Repositories/Providers/IGitProviderClient.cs:168
  • `IFinishedRun` declares 18 members: `Id`, `RunId`, `RepositoryId`, `Repository`, `StateStatus`, `Trigger`, `RequestedAt`, `StateFinishedAt`, `StateMeasuredLoc`, `TextGeneration`, `Reason`, `TimingsStatus`, `TimingsFinishedAt`, `WallClockMs`, `TimingsMeasuredLoc`, `Status`, `FinishedAt`, `MeasuredLoc`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Kennel.Admin.Core/Admin/Services/FinishedRunFold.cs:56
  • `IOldDbReader` declares 61 members: `ReadRepositoryAgentKeysAsync`, `ReadAdminAgentKeysAsync`, `ReadFindingDisputesAsync`, `ReadAdvisoryFeedbacksAsync`, `ReadDetectorGapsAsync`, `ReadSuppressionsAsync`, `ReadAgentClaimsAsync`, `ReadDimensionFeedbackAsync`, `ReadRepositoryAgentSettingsAsync`, `ReadAgentRepositoryEventsAsync`, `ReadExternalRebuttalsAsync`, `ReadCalibrationTicketsAsync`, `ReadSarifIntegrationsAsync`, `ReadSarifComparisonsAsync`, `ReadOrgBrandThemesAsync`, `ReadCommunityTagsAsync`, `ReadCommunityTagVotesAsync`, `ReadTagsAsync`, `ReadProductsAsync`, `ReadProductRepositoriesAsync`, `ReadProductDependenciesAsync`, `ReadProfilesAsync`, `ReadProfileSharesAsync`, `ReadSchedulesAsync`, `ReadThreatModelReviewsAsync`, `ReadUsageLinesAsync`, `ReadConformanceAssessmentsAsync`, `ReadEvidenceAttachmentsAsync`, `ReadRepositoryComplianceSettingsAsync`, `ReadComplianceAttestationsAsync`, `ReadNis2GovernanceAttestationsAsync`, `ReadComplianceContextFieldsAsync`, `ReadNis2ProductProfilesAsync`, `ReadContractsAsync`, `ReadDeliveriesAsync`, `ReadDeliveryItemsAsync`, `ReadDeliveryDeclarationsAsync`, `ReadDeliveryAccessKeysAsync`, `ReadPricingSettingsAsync`, `ReadPricingModulesAsync`, and 21 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Kennel.Migration/Source/IOldDbReader.Agents.cs:9

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

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

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

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

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

C1 · Data Protection10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

C2 · Access Controls10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

C3 · Audit Trail10.0 / 10Exemplary✓ Tool-verified

Other · Security — Whether changes to sensitive data are recorded (who, what, when) for compliance + incident response.

Method: Roslyn scan: audit-trail mechanism graded (SaveChanges interceptor/immutable AuditLog/[Audited] strong; bare IAuditable/AddAuditing weak). Deterministic.

C4 · Data Retention10.0 / 10Exemplary✓ Tool-verified

Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).

Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.

C5 · Data-Subject Rights10.0 / 10Exemplary✓ Tool-verified

Other · Security — Whether GDPR data-subject requests are supported in code — erasure, export/portability, consent.

Method: Roslyn scan: GDPR data-subject-rights corroboration (erasure/export/consent vocabulary co-occurring with subject-id store crossing or explicit GDPR pattern). Deterministic, gated by PII.

DM1 · Aggregate boundaries10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.

Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.

Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.

DM10 · One transaction, one aggregate9.8 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.

Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.

  • `Seeding.Draw` saves `TrainingRepo`, `HoldoutDraw` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Admin.App/Modules/ProgrammeCycleDevSeeder.cs:109
  • `PersonalNotificationRuleStore.SetChoiceAsync` saves `PersonalNotificationRule`, `PersonalNotificationTriggerSeed` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Accounts/Services/PersonalNotificationRuleStore.cs:155
  • `PersonalNotificationRuleStore.SeedStaffDefaultsAsync` saves `PersonalNotificationRule`, `PersonalNotificationTriggerSeed`, `PersonalNotificationSeed` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Accounts/Services/PersonalNotificationRuleStore.cs:370
  • `PersonalNotificationRuleStore.SeedTeamReportDefaultAsync` saves `PersonalNotificationRule`, `PersonalNotificationTriggerSeed` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Accounts/Services/PersonalNotificationRuleStore.cs:429
  • `AssayEntitlementService.BuyAnnualForRepoAsync` saves `AssayRepoEntitlement`, `AssayReportChargeLine` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Billing/Services/AssayEntitlementService.cs:38
  • `OrgManagementService.CreateOrgAsync` saves `Organization`, `OrganizationMember` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Billing/Services/OrgManagementService.cs:149
  • `OrgProvisioning.EnsurePersonalOrgWithFactsAsync` saves `Organization`, `OrganizationMember` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Billing/Services/OrgProvisioning.cs:91
  • `PartnerCodeMinting.MintAsync` saves `Coupon`, `PartnerCode` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Billing/Partners/PartnerCodeMinting.cs:39
  • `PartnerRedemption.RedeemAsync` saves `SubscriptionPartnerAttribution`, `SubscriptionCoupon` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Billing/Partners/PartnerRedemption.cs:75
  • `DeliveryService.MintAsync` saves `Delivery`, `DeliveryItem`, `DeliveryDeclaration` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Compliance/Contracts/DeliveryService.cs:60
  • `ComplianceDeliveryService.MintAndSignAsync` saves `Delivery`, `ComplianceDelivery` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Compliance/Report/ComplianceDeliveryService.cs:52
  • `ContributorDailyDraw.HandOutAsync` saves `Questionnaire`, `QuestionnaireAssignment`, `ContributorOffer` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Contributors/ContributorDailyDraw.cs:98
  • `ContributorDailyDraw.HandOutFromStandardAsync` saves `QuestionnaireAssignment`, `ContributorOffer` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Contributors/ContributorDailyDraw.cs:208
  • `BacklogService.GateAsync` saves `BacklogRejectionOverride`, `BacklogItem` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/LanguageTraining/Services/BacklogService.Hygiene.cs:161
  • `LanguageTrainingService.RecordRoundReportAsync` saves `TrainingRoundReport`, `TrainingRoundRow` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/LanguageTraining/Services/LanguageTrainingService.cs:595
  • `ProgrammeCycleService.OpenAsync` saves `ProgrammeCycle`, `CycleLanguage` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs:45
  • `FindingHistory.FoldAsync` saves `FindingFirstSeen`, `FindingHistoryFold` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Metrics/FindingHistory.cs:13
  • `MetricsWriter.RecordAsync` saves `MetricPoint`, `RunFinding` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Metrics/MetricsWriter.cs:34
  • `QuestionnaireRunner.AnswerAsync` saves `Answer`, `AnswerEvent` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Questionnaires/Services/QuestionnaireRunner.cs:355
  • `RepoHandoverService.HandoverAsync` saves `RepositorySponsorship`, `RepositoryMember` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Repositories/Services/RepoHandoverService.cs:50
  • `SponsorshipSettingsService.UntrackAsync` saves `RepositorySponsorship`, `RepositoryMember` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Core/Repositories/Services/SponsorshipSettingsService.cs:92
  • `AgentAdvisoryFeedbackService.SubmitAsync` saves `AdvisoryFeedback`, `AgentEvent` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Watchdog.Core/Agents/Services/AgentAdvisoryFeedbackService.cs:30
  • `AgentDisputeService.Add` saves `FindingDispute`, `AgentEvent` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Watchdog.Core/Agents/Services/AgentDisputeService.cs:252
  • `DetectorGapService.RecordAsync` saves `DetectorGap`, `AgentEvent` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Watchdog.Core/Agents/Services/DetectorGapService.cs:164
  • `HideRuleService.HideAsync` saves `HideRule`, `FindingDispute` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Watchdog.Core/Agents/Services/HideRuleService.cs:67
  • `SarifComparisonService.CompareAsync` saves `SarifComparison`, `ExternalRebuttal` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Watchdog.Core/Calibration/Application/SarifComparisonService.cs:39
  • `EngagementDeliveryService.MintAndSignAsync` saves `Delivery`, `EngagementDelivery` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Assay.Core/Governance/Application/EngagementDeliveryService.cs:50
  • `AdminStaffExam.WithdrawAsync` saves `ResponseSession`, `QuestionnaireAssignment` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Admin.Core/Admin/Services/AdminStaffExam.cs:197
  • `HostSampler.SampleAsync` saves `HostSample`, `HostVolumeSample` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — src/Kennel.Admin.Core/Admin/Services/HostSampler.cs:64

What to do

  • Mutate one aggregate per operation and let the others follow from a domain event — the second aggregate reaching consistency a moment later is the design, not a compromise.
DM11 · Constructible invalid state10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether an aggregate can be constructed in a state its own rules forbid — a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.

Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule), on a type that also offers no static Create/Of/From/New factory. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.

DM12 · Ambient inputs in the domain10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether domain types receive the time and randomness their rules depend on, rather than reading the process clock or a global random source directly — an ambient read makes the rule it feeds untestable at the instant that matters and lets two reads inside one operation disagree.

Method: Roslyn (DDD-gated, C#/VB only): domain-layer types scanned for ambient reads — DateTime/DateTimeOffset.Now/UtcNow/Today, Random.Shared, new Random(), Stopwatch.GetTimestamp — resolved against the semantic model, with a comment/string-stripped token fallback only where resolution fails. Body reads are scored; field/property initialisers are surfaced unscored. Apply/When folds excluded (ES1 owns them). Deterministic, symbol-resolved.

DM2 · Strongly-typed ids6.7 / 10Adequate✓ Tool-verified

Other · Domain Modelling — How much of the domain uses strongly-typed ids vs raw Guid/string/int — adoption curve, not all-or-nothing.

Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.

Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.

  • `CustomerContactSaved.OwnerOrgId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — src/Kennel.Core/AccessGrants/Domain/Events/CustomerContactEvents.cs:25
  • `CustomerContactSaved.ContactId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/AccessGrants/Domain/Events/CustomerContactEvents.cs:25
  • `CustomerContactSaved.VatId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — src/Kennel.Core/AccessGrants/Domain/Events/CustomerContactEvents.cs:25
  • `IncomingGrantDecided.GranteeOrgId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — src/Kennel.Core/AccessGrants/Domain/Events/IncomingGrantFacts.cs:10
  • `IncomingGrantDecided.GrantId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — src/Kennel.Core/AccessGrants/Domain/Events/IncomingGrantFacts.cs:10
  • `PersonalChannelSaved.ChannelId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:27
  • `PersonalChannelRemoved.ChannelId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:34
  • `PersonalNotificationRuleSaved.RuleId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:40
  • `PersonalNotificationRuleSaved.ChannelId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:40
  • `PersonalNotificationRuleRemoved.RuleId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:48
  • `UserFeedbackSubmitted.FeedbackId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Accounts/Domain/Events/UserFeedbackFacts.cs:13
  • `UserFeedbackResolved.FeedbackId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Accounts/Domain/Events/UserFeedbackFacts.cs:17
  • `AssayEntitlementBought.EntitlementId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:34
  • `AssayChargeRecorded.ChargeLineId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:41
  • `AssayChargeRecorded.SourceId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:41
  • `AssayBalanceSettled.StripeSessionId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:47
  • `AssayReportOrderAwaitingPayment.OrderId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:54
  • `AssayReportOrderAwaitingPayment.ReportTypeKey` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:54
  • `AssayReportOrderAwaitingPayment.DeliveryId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:54
  • `AssayReportOrderAwaitingPayment.ProductId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:54
  • `AssayReportOrderPaid.OrderId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:58
  • `AssayReportOrderPaid.StripeSessionId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:58
  • `AssayReportOrderBuilt.OrderId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:61
  • `AssayReportOrderBuilt.ReportId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:61
  • `SubscriptionCouponApplied.SubscriptionId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/BillingPlanFacts.cs:13
  • `SubscriptionCouponApplied.CouponId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/BillingPlanFacts.cs:13
  • `SubscriptionCouponRemoved.SubscriptionId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/BillingPlanFacts.cs:17
  • `SubscriptionCouponRemoved.CouponId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/BillingPlanFacts.cs:17
  • `PartnerCodeAttributed.SubscriptionId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/BillingPlanFacts.cs:22
  • `PartnerCodeAttributed.PartnerId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/BillingPlanFacts.cs:22
  • `PartnerCodeAttributed.AttributionId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/BillingPlanFacts.cs:26
  • `PartnerCodeAttributed.SupersedesAttributionId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/BillingPlanFacts.cs:26
  • `OrganizationVatSet.VatId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/BillingPlanFacts.cs:32
  • `CohortTermsAccepted.TermsKey` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/CohortTermsFacts.cs:14
  • `CouponDefined.CouponId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/CouponFacts.cs:15
  • `CouponDefined.PartnerId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/CouponFacts.cs:16
  • `CouponActiveSet.CouponId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/CouponFacts.cs:18
  • `OrgInvitationIssued.InviteId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/OrganizationSliceFacts.cs:13
  • `OrgInvitationExpiryMoved.InviteId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/OrganizationSliceFacts.cs:17
  • `OrgInvitationRevoked.InviteId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that. — src/Kennel.Core/Billing/Domain/Events/OrganizationSliceFacts.cs:19

What to do

  • Adopt strongly-typed ids across the domain — finish the migration or document the boundary; primitive ids invite transposed-argument bugs.
DM4 · Rich vs anemic model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

DM5 · Encapsulated state9.5 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether entities protect their state — private/init-only setters, and collections handed out as read-only views rather than the mutable backing collection — instead of exposing writable state that bypasses invariants. Softened when a rehydration framework (Marten/EF) is present.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

  • `User` exposes publicly writable state (Focus, StartPage, OnboardingState, CurrentOrganizationId, CurrentTeamId). — src/Kennel.Core/Accounts/Domain/User.cs:19
  • `ConformanceAssessment` exposes publicly writable state (ScopeStatement). — src/Kennel.Core/Compliance/Conformance/Domain/ConformanceAssessment.cs:78

What to do

  • Make entity setters private/init-only and hand collections out as IReadOnlyList/IReadOnlyCollection over a private backing field; change state only through methods that enforce the invariants (Marten/EF can bind via constructor or private setters).
DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies (EF/Marten/HTTP/ASP.NET) — the clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

DM9 · Scattered domain decisions6.0 / 10Adequate✓ Tool-verified

Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.

Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.

  • CodeHealth.Core.JsLexing.JsToken's [Kind, Line] are judged in CodeHealth.Core.ModelAware.ScriptFunctions, CodeHealth.Core.ModelAware.ScriptFunctions.ScalaWalker — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • CodeHealth.Core.JsLexing.JsToken's [Kind, Text] are judged in CodeHealth.Core.ModelAware.ForeignDisposalDutyScan, CodeHealth.Core.ModelAware.ForeignDisposalDutyScan.PhpShape, CodeHealth.Core.ModelAware.ForeignDisposalDutyScan.RubyDisposalShape, CodeHealth.Core.ModelAware.ForeignDisposalDutyScan.Shape — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • CodeHealth.Core.JsLexing.JsToken's [Kind, Value] are judged in CodeHealth.Core.ModelAware.ForeignInertKnobScan, CodeHealth.Core.ModelAware.ForeignInertKnobScan.Shape — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • CodeHealth.Core.ModelAware.ForeignInertKnobScan.CtorSpan's [ParamsClose, ParamsOpen] are judged in CodeHealth.Core.ModelAware.ForeignInertKnobScan, CodeHealth.Core.ModelAware.ForeignInertKnobScan.Shape — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Core.Billing.Domain.FreePeriodClaim's [Key, Kind] are judged in Kennel.Core.Billing.Partners.FreePeriodEligibility, Kennel.Core.Billing.ScanCredit — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Core.Billing.Domain.Organization's [Id, VatId] are judged in Kennel.Core.Billing.OrgManagementService, Kennel.Core.Billing.Partners.FreePeriodEligibility — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Core.Compliance.Contracts.Domain.Delivery's [SignedByUserId, SignerEmail] are judged in Kennel.Core.Compliance.Privacy.ContractEmailsErasureStep, Kennel.Core.Compliance.Privacy.ContractEmailsExportStep — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Core.LanguageTraining.Domain.VerificationRun's [Arm, CycleId] are judged in Kennel.Core.LanguageTraining.Application.NoiseRatesBackfill, Kennel.Core.Repositories.Services.RepoExpectedNoiseReader — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesDocument's [Kind, OwnerUserId] are judged in Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesReader.ReplayedRows, Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesReader.StoredRows — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesDocument's [Kind, UserId] are judged in Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesReader.ReplayedRows, Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesReader.StoredRows — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Core.Metrics.Domain.MetricPoint's [RepositoryId, RunId] are judged in Kennel.Watchdog.PublicGallery.PublicReportEndpoints, Kennel.Watchdog.PublicGallery.PublicReportLinkSource — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Agents.Domain.DisclosureReply's [InReplyTo, Verdict] are judged in Kennel.Watchdog.Agents.Services.DisclosureKindPrecision, Kennel.Watchdog.Agents.Services.SecurityDisclosureNotifier — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Agents.ReadModels.DisputeFact's [ResolvedAt, Status] are judged in Kennel.Watchdog.Agents.ReadModels.FindingStateFold, Kennel.Watchdog.Agents.ReadModels.RepoFindingsReadModel — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Reporting.Persistence.ChangelogEntryRow's [Kind, LastCommitAt, SupersededBy] are judged in Kennel.Watchdog.Reporting.Pages.RepoChangelog.RepoChangelogDocument, Kennel.Watchdog.Reporting.Persistence.ChangelogEntryStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Reporting.Persistence.ChangelogEntryRow's [Kind, SupersededBy] are judged in Kennel.Watchdog.Reporting.Pages.RepoChangelog.RepoChangelogDocument, Kennel.Watchdog.Reporting.Persistence.ChangelogEntryStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Teams.Domain.Sprint's [End, Start] are judged in Kennel.Watchdog.Reporting.Pages.RepoDocuments.RepoDocumentsDocument, Kennel.Watchdog.Teams.Pages.TeamHub.TeamHubDocument, Kennel.Watchdog.Teams.Pages.TeamsOverview.TeamsOverviewDocument — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Teams.Persistence.TeamRow's [ArchivedAt, OrganizationId] are judged in Kennel.Watchdog.Teams.OrgTeamDirectory, Kennel.Watchdog.Teams.TeamStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Teams.Persistence.TeamRow's [ArchivedAt, Id, OrganizationId] are judged in Kennel.Watchdog.Teams.OrgTeamDirectory, Kennel.Watchdog.Teams.TeamStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Teams.Persistence.TeamRow's [Id, OrganizationId] are judged in Kennel.Watchdog.Teams.RepoTeamDirectory, Kennel.Watchdog.Teams.TeamStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Trackers.Persistence.TrackerTargetRow's [ConnectionId, Project, TeamId] are judged in Kennel.Watchdog.Trackers.Application.TrackerSyncBackfill, Kennel.Watchdog.Trackers.Application.TrackerTicketsBackfill — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Trackers.Persistence.TrackerTicketRow's [ConnectionId, Project, TeamId] are judged in Kennel.Watchdog.Trackers.Application.TrackerSyncBackfill, Kennel.Watchdog.Trackers.Application.TrackerTicketsBackfill, Kennel.Watchdog.Trackers.TrackerBoards — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Assay.DecisionReports.Pages.AssayReports.AssayReportsDocument's [Kind, OwnerUserId] are judged in Kennel.Assay.DecisionReports.Pages.AssayReports.AssayReportsReader.ReplayedRows, Kennel.Assay.DecisionReports.Pages.AssayReports.AssayReportsReader.StoredRows — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Assay.Governance.Domain.GovernanceBinding's [Altitude, ScopeId] are judged in Kennel.Assay.Governance.Pages.AssayEligibility.AssayEligibilityDocument, Kennel.Assay.Governance.Pages.AssaySuppliers.AssaySuppliersDocument, Kennel.Assay.Governance.Queries.ProductObligationsQueries — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Assay.Governance.Domain.GovernanceControl's [NoCriticalCve, NoSecretsInHistory] are judged in Kennel.Assay.Governance.Domain.GovernancePosture, Kennel.Assay.Governance.Pages.AssayGovernance.AssayGovernanceDocument — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Watchdog.Agents.Domain.DetectorGap's [GroupKey, Status] are judged in Kennel.Admin.Services.DetectorGapPromotionService, Kennel.Admin.Services.MaintainerQaService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Kennel.Improve.Orchestrator.Model.PackageKey's [Concept, Language] are judged in Kennel.Improve.Orchestrator.Gates.ShellGate, Kennel.Improve.Orchestrator.Gates.TurnGate — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.

What to do

  • Move each repeated judgement onto the type that owns the members it reads, so the rule has one home and cannot drift.
ED1 · Handler temporal coupling10.0 / 10Exemplary✓ Tool-verified

Other · Event-Driven — Whether event handlers stay asynchronous (no blocking remote HTTP/gRPC calls awaited inside a handler).

Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.

ED3 · Event naming9.9 / 10Exemplary✓ Tool-verified

Other · Event-Driven — Whether events are named in the past tense (a clarity nudge — low weight).

Method: Roslyn scan (event-driven gated): domain and integration events checked for past-tense naming (-ed/-en suffix or irregular set). Naming nudge, low-weight advisory.

  • `AssayReportOrderAwaitingPayment` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear. — src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:53
  • `PartnerLoginBound` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear. — src/Kennel.Core/Billing/Domain/Events/PartnerFacts.cs:37
  • `ConformanceDeclarationBegun` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear. — src/Kennel.Core/Compliance/Domain/Events/ComplianceFacts.cs:22
  • `FindingShown` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear. — src/Kennel.Watchdog.Core/Agents/Domain/Events/FindingEvents.cs:52
  • `CommunityTagVoteCast` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear. — src/Kennel.Watchdog.Core/Gallery/Domain/Events/GalleryFacts.cs:15
  • `TeamRoleAdjustmentReset` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear. — src/Kennel.Watchdog.Core/Teams/Domain/Events/TeamEvents.cs:61
  • `EngagementBarBound` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear. — src/Kennel.Assay.Core/Governance/Domain/Events/EngagementEvents.cs:50
  • `StaffLoginBound` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear. — src/Kennel.Admin.Core/Admin/Domain/Events/AdminOpsFacts.cs:51

What to do

  • Name events in the past tense — they record facts that already happened.
ED4 · Outbox / dual-write7.9 / 10Strong✓ Tool-verified

Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.

Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.

  • `DeclineDigestService.RunOnceAsync` writes to the database AND publishes to the message bus in the same flow, with no outbox referenced in this path. These two writes aren't atomic — a crash between them either loses the message (DB committed, publish failed) or emits a phantom event (publish succeeded, DB rolled back). Use the transactional outbox pattern — write the message to an outbox table in the SAME transaction as the state change, and dispatch it from there afterwards — or your platform's equivalent (a broker transaction, or an outbox library from your own ecosystem). — src/Kennel.Admin.Core/Admin/Services/DeclineDigestService.cs:48
  • `VerificationReminderService.ClaimAndSendAsync` writes to the database AND publishes to the message bus in the same flow, with no outbox referenced in this path. These two writes aren't atomic — a crash between them either loses the message (DB committed, publish failed) or emits a phantom event (publish succeeded, DB rolled back). Use the transactional outbox pattern — write the message to an outbox table in the SAME transaction as the state change, and dispatch it from there afterwards — or your platform's equivalent (a broker transaction, or an outbox library from your own ecosystem). — src/Kennel.Admin.Core/Admin/Services/VerificationReminderService.cs:108

What to do

  • Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether Apply/When folds reconstruct state purely from the event (no DateTime.Now, Guid.NewGuid, Random or IO) so replay is reproducible.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether persisted events are immutable facts (init-only/readonly) — a settable event member lets stored history be rewritten.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

ES3 · PII in the event store7.4 / 10Strong✓ Tool-verified

Other · Event Sourcing — Whether the append-only event log avoids un-erasable personal data (or has a crypto-shredding strategy) — a GDPR right-to-erasure risk.

Method: Roslyn (event-sourcing gated, C# first): each stored event's public members are read by the shared deterministic personal-data classifier (multilingual name lexicon, personal-data types and declarations, one level into a value object); strong personal data is a Warning, a name or address only when its event or its aggregate's stream carries strong personal data; crypto-shredding is behavioural (a covered event is a Recommendation). Scored; a language the lexicon does not cover with nothing found is our gap; other programming languages keep the pre-migration name lists, their name/address fields are our gap, and the card is Advisory while any remain.

  • Persisted event carries personal data (Email: email, name token "email" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure. (×5) — src/Kennel.Core/AccessGrants/Domain/Events/CustomerContactEvents.cs:24, src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:14, src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:19, …
  • Persisted event carries personal data (ContactEmail: email, name token "email" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure. — src/Kennel.Core/Billing/Domain/Events/PartnerFacts.cs:16
  • Persisted event carries personal data (ContactEmail: email, name token "email" (en), TaxId: gov-id, name token "taxid" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure. — src/Kennel.Core/Billing/Domain/Events/PartnerFacts.cs:45
  • Persisted event carries personal data (BuyerEmail: email, name token "email" (en)) — crypto-shredding detected (per-subject key `EmailProtectionKey`, destroyed on erasure); verify it covers these fields. — src/Kennel.Core/Compliance/Domain/Events/ContractFacts.cs:13
  • Persisted event carries personal data (Email: email, name token "email" (en), FullName: name, name token "fullname" (en), corroborated by `Email` on the same type, Phone: phone, name token "phone" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure. — src/Kennel.Admin.Core/Admin/Domain/Events/AdminOpsFacts.cs:37

What to do

  • Adopt crypto-shredding (store PII encrypted with a per-subject key you can throw away) or keep PII out of events and reference it by id so erasure stays possible.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

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.

  • A placeholder string ("Over images with a STATIC non-empty alt …") is still in shipped code — typical of generated boilerplate that was never filled in. — engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1021
  • A placeholder string ("Over native <a href> with STATIC text an…") is still in shipped code — typical of generated boilerplate that was never filled in. — engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1039
  • A placeholder string ("Over headings (h1–h6), <label>/<legend> …") is still in shipped code — typical of generated boilerplate that was never filled in. — engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1045
  • A placeholder string ("Markup scan (WCAG/EN-gated, C# first: Ra…") is still in shipped code — typical of generated boilerplate that was never filled in. (×3) — engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:143, engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:146, engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:147
  • A placeholder string ("Image alt text that is provably not a te…") is still in shipped code — typical of generated boilerplate that was never filled in. — engine/src/Scanner/LlmJudgedLanguage/LA2/AltTextQualityAnalyzer.cs:31
  • A placeholder string ("is lorem ipsum") is still in shipped code — typical of generated boilerplate that was never filled in. (×2) — engine/src/Scanner/LlmJudgedLanguage/LA2/AltTextQualityAnalyzer.cs:151, engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:172
  • A placeholder string ("Links whose purpose cannot be determined…") is still in shipped code — typical of generated boilerplate that was never filled in. — engine/src/Scanner/LlmJudgedLanguage/LA5/LinkTextQualityAnalyzer.cs:33
  • A placeholder string ("Headings, labels and button names that a…") is still in shipped code — typical of generated boilerplate that was never filled in. — engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:31
  • A placeholder string ("Unreviewed-generation residue in this re…") is still in shipped code — typical of generated boilerplate that was never filled in. (×3) — engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Dart.cs:39, engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.FSharp.cs:30, engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Scala.cs:38
  • A placeholder string ("changeme") is still in shipped code — typical of generated boilerplate that was never filled in. (×2) — engine/src/Core/Security/NativeSecretScanner.cs:2335, engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:501
  • A placeholder string ("lorem ipsum") is still in shipped code — typical of generated boilerplate that was never filled in. — engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupText.cs:275

What to do

  • Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
IC1 · Incompleteness & stubs7.7 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.

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

  • `DiscoverAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. (×2) — engine/src/Core/Analyzers/AbsentAnalyzerDiscovery.cs:19, engine/src/Core/Analyzers/AbsentArchitectureTestDiscovery.cs:17
  • `HasAcceptedCurrentTermsAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — src/Kennel.Core/Accounts/Services/TermsAcceptance.cs:28
  • Both arms of `dark ? … : …` are `"#3c8f59"`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. — src/Kennel.Watchdog.Core/Architecture/Ui/ArchitectureDevSeeder.cs:154
  • Both arms of `dark ? … : …` are `"#c65a49"`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. — src/Kennel.Watchdog.Core/Architecture/Ui/ArchitectureDevSeeder.cs:155
  • `AfterEdit` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — tools/qwen-poc/Program.cs:482
  • A placeholder value ("Over images with a STATIC non-empty alt …") is still in shipped code — sample/mock data that was never replaced with the real thing. — engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1021
  • A placeholder value ("Over native <a href> with STATIC text an…") is still in shipped code — sample/mock data that was never replaced with the real thing. — engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1039
  • A placeholder value ("Over headings (h1–h6), <label>/<legend> …") is still in shipped code — sample/mock data that was never replaced with the real thing. — engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1045
  • A placeholder value ("Markup scan (WCAG/EN-gated, C# first: Ra…") is still in shipped code — sample/mock data that was never replaced with the real thing. (×3) — engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:143, engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:146, engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:147
  • A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×6) — engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:1688, engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:1689, engine/src/Scanner/Defects/Defects.Shared/CSharpCards.cs:378, …
  • A placeholder value ("Unreviewed-generation residue in this re…") is still in shipped code — sample/mock data that was never replaced with the real thing. (×3) — engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Dart.cs:39, engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.FSharp.cs:30, engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Scala.cs:38
  • A placeholder value ("john doe") is still in shipped code — sample/mock data that was never replaced with the real thing. — engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:46
  • A placeholder value ("jane doe") is still in shipped code — sample/mock data that was never replaced with the real thing. — engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:46
  • A placeholder value ("john smith") is still in shipped code — sample/mock data that was never replaced with the real thing. — engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:46
  • A placeholder value ("foo bar") is still in shipped code — sample/mock data that was never replaced with the real thing. — engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:46
  • A placeholder value ("lorem ipsum") is still in shipped code — sample/mock data that was never replaced with the real thing. (×2) — engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:46, engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupText.cs:275
  • A placeholder value ("Image alt text that is provably not a te…") is still in shipped code — sample/mock data that was never replaced with the real thing. — engine/src/Scanner/LlmJudgedLanguage/LA2/AltTextQualityAnalyzer.cs:31
  • A placeholder value ("is lorem ipsum") is still in shipped code — sample/mock data that was never replaced with the real thing. (×2) — engine/src/Scanner/LlmJudgedLanguage/LA2/AltTextQualityAnalyzer.cs:151, engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:172
  • A placeholder value ("Links whose purpose cannot be determined…") is still in shipped code — sample/mock data that was never replaced with the real thing. — engine/src/Scanner/LlmJudgedLanguage/LA5/LinkTextQualityAnalyzer.cs:33
  • A placeholder value ("Headings, labels and button names that a…") is still in shipped code — sample/mock data that was never replaced with the real thing. — engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:31
  • A placeholder e-mail address ("nok@siamsoftware.example") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration. (×2) — src/Kennel.Admin.Core/Admin/Services/PartnerDevSeeder.cs:44, src/Kennel.Core/Billing/Services/BillingDevSeeder.cs:204
  • A placeholder e-mail address ("buyer@globex.example") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration. — src/Kennel.Assay.Core/Profiles/Ui/ProfilesDevDataSeeder.cs:106
  • A placeholder e-mail address ("mia@acme.test") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration. — src/Kennel.Core/Accounts/Services/AccountsDevSeeder.cs:32

What to do

  • Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
  • Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
M1 · Documentation (README)8.0 / 10Strong✓ 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.

What to do

  • Add a README to the 382 of 384 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation8.5 / 10Strong✓ Tool-verified

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

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

What to do

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

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

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

M4 · Documentation accuracy8.3 / 10Strong✓ Tool-verified

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

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

  • docs/multilang/fsharp-stageB.md names Dapper 141, but the manifest declares `Dapper` 2.1.35. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/multilang/fsharp-stageB.md:324

What to do

  • Reconcile the README with reality: docs/multilang/fsharp-stageB.md names Dapper 141, but the manifest declares `Dapper` 2.1.35.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

P11 · BDD / executable specs10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether behaviour is captured as executable Gherkin specifications (a plus for shared understanding) — only assessed when a BDD framework is present.

Method: Filesystem scan: BDD framework presence (SpecFlow, Gherkin files) when a project references a BDD tool. Exhaustive, deterministic.

P2 · Observability7.8 / 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.

  • Only 68/250 service-like projects use logging (pure contract/DTO projects are excluded — they have nothing to log). Of those 250, 16 ship a process this repository operates; the rest are libraries their consumer hosts, where the logging decision belongs to the host.
  • `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 44 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — engine/src/CodeHealth.Cli/CliExceptionHandler.cs:44
  • `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 52 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — engine/src/CodeHealth.Cli/CliExceptionHandler.cs:52
  • `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 60 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — engine/src/CodeHealth.Cli/CliExceptionHandler.cs:60
  • `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 65 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — engine/src/CodeHealth.Cli/CliExceptionHandler.cs:65
  • `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 70 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — engine/src/CodeHealth.Cli/CliExceptionHandler.cs:70
  • `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 71 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — engine/src/CodeHealth.Cli/CliExceptionHandler.cs:71
  • `src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs` reports through `Console.Write…` at line 565 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs:565
  • `src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs` reports through `Console.Write…` at line 570 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters. — src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs:570

What to do

  • Extend structured logging across the projects you operate, and give the library ones a diagnostics seam instead — an `EventSource`/`ActivitySource` the host can subscribe to, or an optional logger on your options object — rather than taking a logging dependency on your consumers' behalf.
  • Replace `Console.Write…` in service code with the project's injected `ILogger<T>` (message templates with named properties), so delivery outcomes and failures reach the log pipeline with a level and a category.
P3 · Security & performance tooling8.0 / 10Strong✓ 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.

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ 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.

P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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

Readiness · Readiness — Whether EF Core schema changes go through versioned migrations rather than the un-evolvable EnsureCreated().

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

P9 · Domain vs controller coverage7.3 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether test coverage concentrates on the domain (business rules) rather than the trivial web/controller layer — a focus check a generic tool can't make.

Method: Roslyn plus test-execution analysis: domain-layer versus trivial web/controller coverage ratio. Computed metric, deterministic.

What to do

  • Raise domain coverage toward 100% — cover the remaining aggregates / value objects / domain services where the business invariants and costly bugs live.
PF1 · Benchmark discipline9.5 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF2 · Allocation hygiene6.7 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 1715 use(s) across 1,233,441 production line(s) (~1.4/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
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 the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 · Type Safety8.0 / 10Strong✓ 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 Duplication9.6 / 10Exemplary✓ 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.

  • tools/localdev/ui/credential-health-smoke.mjs:13 · tools/localdev/ui/forge-parity-smoke.mjs:16 — the two spans are one implementation copied and then locally edited — 423 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. — tools/localdev/ui/credential-health-smoke.mjs:13
  • tools/localdev/ui/a11y-gate.mjs:275 · tools/localdev/ui/timing-gate.mjs:139 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — tools/localdev/ui/a11y-gate.mjs:275
  • engine/sidecars/tsjs-frontend/idempotency-facts.mjs:65 · engine/sidecars/tsjs-frontend/idempotency-facts.mjs:97 — 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. — engine/sidecars/tsjs-frontend/idempotency-facts.mjs:65
  • tools/localdev/ui/band-classes-smoke.mjs:159 · tools/localdev/ui/login-theme-smoke.mjs:40 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — tools/localdev/ui/band-classes-smoke.mjs:159
  • tools/localdev/ui/capture-public.mjs:18 · tools/localdev/ui/preprod-login.mjs:13 — the two spans are one implementation copied and then locally edited — 52 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. — tools/localdev/ui/capture-public.mjs:18
  • tools/localdev/ui/a11y-gate.mjs:58 · tools/localdev/ui/timing-gate.mjs:69 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — tools/localdev/ui/a11y-gate.mjs:58
  • engine/sidecars/tsjs-frontend/source-set.mjs:172 · engine/sidecars/tsjs-frontend/source-set.mjs:191 — the two spans are one implementation copied and then locally edited — 55 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. — engine/sidecars/tsjs-frontend/source-set.mjs:172
  • tools/localdev/ui/a11y-gate.mjs:230 · tools/localdev/ui/timing-gate.mjs:106 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — tools/localdev/ui/a11y-gate.mjs:230

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries9.9 / 10Exemplary✓ Tool-verified

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

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

  • tools/localdev/ui/lib/cli.mjs:40 reaches into another package with a relative path (../../../../engine/docker/analyzer/render/is-program.mjs) — import the package by name instead. — tools/localdev/ui/lib/cli.mjs:40

What to do

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

  • moduleOfExpression has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — engine/sidecars/tsjs-frontend/idempotency-facts.mjs:52
  • presenceTested has cyclomatic complexity 19 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — engine/sidecars/tsjs-frontend/idempotency-facts.mjs:189
  • recommend has cyclomatic complexity 16 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. — engine/tests/CodeHealth.Tests.Concepts/suites/knowledge-freshness/typescript/history/src/apiary/hive-inspection.v1.ts:25
  • handlerExcerptOf has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — engine/sidecars/tsjs-frontend/idempotency-facts.mjs:216
  • moduleOfDeclaration has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — engine/sidecars/tsjs-frontend/idempotency-facts.mjs:76

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files10.0 / 10Exemplary✓ 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.

R4 · Test Coverage10.0 / 10Exemplary✓ Tool-verified

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

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

R5 · Dependency Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

R7 · Dead Code8.0 / 10Strong✓ 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.

  • 10 file(s) (~978 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. — engine/docker/analyzer/render
  • 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. (×39) — engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:18, engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:31, engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:43, …

What to do

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

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

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

R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

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

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

S1 · Web-Security Posture10.0 / 10Exemplary○ Nothing flagged

Other · Security — Transport security, security headers, secure cookies, input validation, middleware order and crypto hygiene (presence, not runtime).

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

X1 · Async correctness7.9 / 10Strong✓ Tool-verified

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

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

  • `.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters). (×2) — engine/src/CodeHealth.Toolchain/Git/FileUniverse.cs:444, engine/src/Core/SourceCensus/IgnoredUntrackedPaths.cs:78
  • Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout. (×2) — engine/src/CodeHealth.Toolchain/Git/FileUniverse.cs:450, engine/src/Core/SourceCensus/IgnoredUntrackedPaths.cs:84
  • `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead. — engine/src/CodeHealth.Cli/ToolVersionProbe.cs:65
  • `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin. — engine/src/Scanner/BuildDependent/D39/ProductBuildEntry.cs:67
  • `File.ReadAllText` blocks the thread on I/O while `File.ReadAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin. (×4) — engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:131, REDACTED:55, src/Kennel.Improve.Orchestrator/Program.cs:304, …
  • `StreamReader.ReadLine` blocks the thread on I/O while `StreamReader.ReadLineAsync` exists to wait without one — inside a method that is already `async`, await the twin. — engine/src/Scanner/Security/D28/Scanners/PrivateKeyBlobHistoryScan.cs:481
  • `StreamWriter.Write` blocks the thread on I/O while `StreamWriter.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin. — engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:2421
  • `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin. (×3) — engine/src/CodeHealth.Toolchain.SdkProvisioning/IDotnetReleaseSource.cs:43, src/Kennel.Watchdog.Core/Calibration/Endpoints/CalibrationEndpoints.cs:163, src/Kennel.Infrastructure/GitProviders/GitHubProviderClient.cs:983
  • `StreamWriter.WriteLine` blocks the thread on I/O while `StreamWriter.WriteLineAsync` exists to wait without one — inside a method that is already `async`, await the twin. — engine/tools/narration-budget-eval/Program.cs:140
  • `ItemRun.Baseline` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). — tools/qwen-poc/ItemRun.cs:117
  • `ItemRun.Conclude` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). — tools/qwen-poc/ItemRun.cs:131
  • `ItemRun.MeasureReproduction` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). — tools/qwen-poc/ItemRun.cs:372
  • `ItemRun.BuildAndMeasure` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). — tools/qwen-poc/ItemRun.cs:1205
  • `ItemRun.RegressionCheck` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). — tools/qwen-poc/ItemRun.cs:1206
  • `Repo.Reap` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll). — tools/qwen-poc/Program.cs:258

What to do

  • Sync-over-async (deadlock risk) through `.Wait(…)`
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X2 · Cancellation propagation9.9 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).

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

  • Only 7619/7764 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
  • No CancellationToken parameter — this work can't be stopped early once started. (×21) — engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:252, engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:493, engine/src/CodeHealth.Toolchain/Git/GitLogHistoryExtractor.cs:121, …
  • No CancellationToken parameter — the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. (×18) — engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:664, engine/src/CodeHealth.Toolchain/Git/GitLogHistoryExtractor.cs:373, engine/src/CodeHealth.Toolchain/Git/LibGit2GitAccessor.cs:372, …

What to do

  • Thread a CancellationToken through async methods so work stops promptly on cancellation.
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.

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 unescaped5.5 / 10Adequate✓ Tool-verified

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

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

  • `$"<span class=\"muted small\">unreadable — {System.Net.WebUtility.HtmlEncode(why)}</span>"` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Admin.Core/Admin/Pages/AdminDeploy/Deploy.razor:574
  • `$"<code>{version}</code> <code class=\"muted\">{commit}</code><br>" + $"<span class=\"muted small\">{when}</span>{closed}"` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Admin.Core/Admin/Pages/AdminDeploy/Deploy.razor:586
  • `AdminBoardSparkline.Render(lang.History)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Admin.Core/Admin/Pages/AdminLanguageBoard/LanguageBoard.razor:107
  • `QueueTimelineChart.Render(view.Buckets)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Admin.Core/Admin/Pages/AdminQueueWait/QueueWait.razor:102
  • `Markdig.Markdown.ToHtml(_view.RunbookText)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Admin.Core/Admin/Pages/AdminRunbook/Runbook.razor:130
  • `ArtifactHtmlRenderer.ToHtmlFragment(markdown)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/ReportDetail.razor:147, src/Kennel.Assay.Core/DecisionReports/Pages/AssayProductReports/PortfolioReportDetail.razor:84
  • `body` is text this program did not author, and it is written into the text of an element through markup this method returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — src/Kennel.Assay.Core/DecisionReports/Rendering/ArtifactDocument.cs:52, src/Kennel.Watchdog.Core/Reporting/Rendering/ReportShell.cs:39
  • `rendered.Html!` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Assay.Core/Profiles/ProfilesModule.cs:457
  • `html` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — src/Kennel.Core/Billing/Pages/MyTerms/TermsPage.razor:92, src/Kennel.Core/Questionnaires/Pages/ReviewRunner/ReviewRunner.razor:743
  • `( "Read access follows TEAM membership: whoever is on the team that holds a repository can read it. " + "Set that up under Teams above — <em>visibility only</em> (who can MANAGE a repository is decided " + "by the git provider, never here). One person needs one repository outside their teams? " + "<a href=\"/ui/organization/grants\">Open the access exceptions</a>")` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Core/Billing/Pages/Organization/Organization.razor:422
  • `E(partnerName)` is text this program did not author, and it is written into the text of an element through a `StringBuilder` building markup with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — src/Kennel.Core/Billing/Partners/PartnerStatementDocument.cs:82, src/Kennel.Core/Billing/Partners/PartnerStatementDocument.cs:84
  • `html` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×3) — REDACTED:225, REDACTED:296, REDACTED:337
  • `linked` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Core/Questionnaires/Pages/ReviewRunner/ReviewRunner.razor:766
  • `html` is text this program did not author, and it is written into the text of an element through `HttpResponse.WriteAsync` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Hosting/Ui/KennelUiHostingExtensions.cs:275
  • `Load()` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Ui/Components/Sprite.razor:4
  • `body` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.App/Dev/DevGitHubStandIn.cs:77
  • `WebUtility.HtmlEncode(href)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — src/Kennel.Watchdog.App/Dev/DevGitHubStandIn.cs:78
  • `C4SvgRenderer.Render(_model)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/Architecture/Pages/RepoArchitecture/Architecture.razor:278
  • `C4SvgRenderer.RenderTopology(_topology)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/Architecture/Pages/RepoArchitecture/Architecture.razor:283
  • `_structure.MatrixHtml` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:217
  • `MainSequenceSvg.Render(Data, _layout, Here)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/Architecture/Ui/MainSequencePanel.razor:16
  • `ModuleMapSvg.Render(Layout, RepositoryName)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/Architecture/Ui/ModuleMapPanel.razor:18
  • `item.Svg` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:17
  • `document` is text this program did not author, and it is written into the text of an element through `Text(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/PublicGallery/PublicEmbedEndpoint.cs:401
  • `CountLine(shown, all, retained, filtered)` is text this program did not author, and it is written into the text of an element through a `StringBuilder` building markup with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/PublicGallery/PublicReportsIndexEndpoint.cs:176
  • `CaiSite.Verify(caiBaseUrl)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through a `StringBuilder` building markup with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — src/Kennel.Watchdog.Core/PublicGallery/PublicReportsIndexEndpoint.cs:185
  • `DistilledMarkdown.ToHtml(state.Text, scope.CapabilityHref)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/Reporting/Pages/DistilledEditor/DistilledEditor.razor:83
  • `ChangelogDraftRenderer.ToHtmlFragment(ProductChangelogRenderer.BodyMarkdown(repo.Markdown))` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/Reporting/Pages/ProductReporting/ProductChangelog.razor:101
  • `TimelineJson()` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/Reporting/Pages/RepoChangelog/RepoChangelog.razor:268
  • `SystemOverviewRenderer.ToHtmlFragment(markdown)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/Reporting/Pages/RepoSystemOverview/RepoSystemOverview.razor:86
  • `html` is text this program did not author, and it is written into the text of an element through `Text(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — src/Kennel.Watchdog.Core/Reporting/ReportingModule.cs:432, src/Kennel.Watchdog.Core/Reporting/ReportingModule.cs:537
  • `html ?? "<!doctype html><html><body style=\"font-family:sans-serif;padding:24px;color:#5b6675\">No sprint has closed …` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/Reporting/ReportingModule.cs:958
  • `DistilledMarkdown.ToHtml(state.Text, SourceHref)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/Kennel.Watchdog.Core/Reporting/Ui/DesignReviewPanel.razor:78

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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

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

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.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard7.7 / 10Strong✓ Tool-verified

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.

  • This condition tests `v` for emptiness and then indexes it on a branch that test does not reach. `v[0]` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `v` being empty — so an empty `v` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing: `v[1]` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `v` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `v`. — engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:538
  • This condition tests `v` for emptiness and then indexes it on a branch that test does not reach. `v[0]` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `v` being empty — so an empty `v` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing at line 538: `v[1]` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `v` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `v`. (×2) — engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:539, engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:541
  • This condition tests `v` for emptiness and then indexes it on a branch that test does not reach. `v[^1]` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `v` being empty — so an empty `v` indexes position ^1 of nothing and throws. This same condition already shows the intended bracketing at line 538: `v[1]` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `v` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `v`. (×2) — engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:539, engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:541
  • This condition tests `words` for emptiness and then indexes it on a branch that test does not reach. `words[^1]` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `words` being empty — so an empty `words` indexes position ^1 of nothing and throws. This same condition already shows the intended bracketing at line 293: `words[^2]` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `words` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `words`. — engine/src/Scanner/Security/Shared.CSharp/DestructuredPersonalDataLogScan.cs:292

What to do

  • Each finding names the index access that escapes the guard and the line of the correctly bracketed access beside it. Compare the two: they differ only in where one parenthesis sits. Move it so the emptiness test brackets every access to that symbol — and if the value provably cannot be empty at this point, delete the test rather than leave a condition that guards one access and not its neighbour.
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

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

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

X3 · Exception handling7.6 / 10Strong✓ Tool-verified

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

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

  • `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×6) — engine/src/CodeHealth.Core/Scoring/RubricArchiveProbe.cs:111, src/Kennel.Ui/LandingDiversion.cs:26, src/Kennel.Core/Repositories/Services/ProviderConnectService.cs:615, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×23) — engine/src/CodeHealth.Cli/Commands/RoslynLoadDiagnosis.cs:376, engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:70, engine/src/Scanner/Security/Shared/Scanners/DeclaredDependencies.cs:822, …
  • `catch (UnauthorizedAccessException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×3) — engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:579, engine/src/Core/Frontend/NxDependencyConstraints.cs:231, engine/src/Core/Languages/Ts/TsConfigJsChecking.cs:66
  • `catch (IOException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — engine/src/Core/Languages/Ts/TsConfigJsChecking.cs:62
  • `catch (JsonException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×2) — src/Kennel.Core/Scans/ReadModel/RunLlmCallWriter.cs:274, src/Kennel.Watchdog.Core/Reporting/Composition/RepoSprintPipelineReader.cs:67
  • `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×4) — src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/AssayCodebaseReader.cs:82, src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/AssayCodebaseReader.cs:118, src/Kennel.Assay.Core/DecisionReports/Pages/AssayReports/AssayReportsReader.cs:126, …
  • `catch (ArgumentException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — src/Kennel.Admin.Core/Admin/Services/Preprod/PreprodDump.cs:91

What to do

  • Swallowed exception (caught, then discarded)
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.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. 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 `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

X5 · Nullable reference types9.7 / 10Exemplary✓ 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.

  • This method contradicts itself about `unreadStrings`: line 72 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 107 then dereferences `unreadStrings` as `unreadStrings.Examples` AFTER the block has closed, where the guard no longer applies. A null `unreadStrings` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `unreadStrings` truly cannot be null by then, the guard above is misleading and should go. — engine/src/Scanner/Accessibility/Accessibility.Shared/AccessibilityCards.cs:107
  • This method contradicts itself about `verdict`: line 370 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 386 then dereferences `verdict` as `verdict.Accepted` AFTER the block has closed, where the guard no longer applies. A null `verdict` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `verdict` truly cannot be null by then, the guard above is misleading and should go. — src/Kennel.Admin.Core/Admin/Services/CaiSubmissionRunner.cs:386
  • ~0.4 `!` suppressions per 1k syntax nodes — 2282 suppression(s) across the 6482136 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.

What to do

  • Where a method null-tests a symbol and then uses it after the guarded block closes, move the trailing work inside the block — the guard skips its body on null, it does not stop the method.
  • Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health80%StrongSolid.
Architecture88%StrongSolid.
Maturity86%StrongSolid.
Readiness72%StrongLargest drag on the score — prioritise here.
Security96%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling90%StrongSolid.
Event-Driven88%StrongSolid.
Event Sourcing89%StrongSolid.
Accessibility94%ExemplaryStrongest area.
Performance84%StrongSolid.
Unscored — 5 check(s) recorded observations but carry no score

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

  • P12 CI test-gate honesty — 12 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 19 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 7 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 21 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.

  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D21 Naming Consistency — Naming Consistency not included (check did not complete)
  • D22 Internal API Consistency — N/A — too few peer members to establish a convention across 32 exposed C# types.
  • D28 Secrets (history) — gitleaks killed before it finished — this repository's working tree not scanned
  • D32 Data Compliance (PII/GDPR) — 1425 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • DM8 Value-object opportunities — not scored — the deterministic rule found 0 candidate clump(s); its rows are withheld until it has a measured precision of 95 % (a sample of fewer than 10 rows cannot show one)
  • ED2 Event/command shape — no command-shaped messages detected — single-handler-per-command check not applicable
  • ED5 Idempotency — not scored — 37 of 55 retry-prone mutations could not be classified (no visible guard and no positive evidence of a double-applied effect)
  • P7 Outbound HTTP resilience — no outbound HTTP usage detected — no HttpClient/IHttpClientFactory/AddHttpClient in source, and no Refit/RestSharp/Flurl.Http namespace or package reference
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X31 Test-only surface in a production module — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X8 JS interop contract — 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 — 59 finding(s)
D17 · Explicit Debt · EmptyCatchBlock · ×30
  • EmptyCatchBlock engine/src/CodeHealth.Cli/Commands/RoslynLoadDiagnosis.cs:376 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock engine/src/Core/Diagnostics/ScanBudgets.cs:567 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock engine/src/Core/Diagnostics/ScanBudgets.cs:793 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock engine/src/Core/Diagnostics/ScanBudgets.cs:999 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock engine/src/Core/Diagnostics/ScanBudgets.cs:1199 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock engine/src/Core/Frontend/FrontendWorkspaceWalk.cs:680 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:70 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock engine/src/Scanner/Security/Shared/Scanners/DeclaredDependencies.cs:822 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock engine/src/Scanner/Security/Shared/Scanners/DeclaredDependencies.cs:823 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Admin.Core/Admin/Services/AdminConsoleService.cs:156 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Admin.Core/Admin/Services/G2KappaSyncService.cs:59 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Admin.Core/Admin/Services/WorkerFleetDevSeeder.cs:196 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Assay.Core/AccessGrants/Pages/Access/AssayAccessReader.cs:110 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/AssayCodebaseReader.cs:113 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Assay.Core/DecisionReports/Pages/AssayProductReports/AssayProductReportsReader.cs:66 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Core/Billing/Services/PlanPickerService.cs:411 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Core/Repositories/Services/AddUploadService.cs:292 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs:1568 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs:2204 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs:2207 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Core/Scans/Sources/ZipSourceExtractor.cs:384 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Infrastructure/EventStore/InMemoryDomainEventOutbox.cs:29 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Infrastructure/Reporting/PdfSharpStamper.cs:161 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Infrastructure/Reporting/PdfSharpStamper.cs:164 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock src/Kennel.Watchdog.Core/Calibration/Application/SarifPath.cs:33 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • + 5 more in this group — see findings.md.
AX3 · Project dependency cycles · Namespace dependency cycle · ×23
  • Namespace dependency cycle engine/src/CodeHealth.Core/Scoring/AggregateScoreCalculator.cs:2 — The namespaces CodeHealth.Core.Dimensions ↔ CodeHealth.Core.Scoring depend on each other. The lightest dependency in the cycle is CodeHealth.Core.Scoring → CodeHealth.Core.Dimensions (CodeHealth.Core.Scoring.AggregateScoreCalculator → CodeHealth.Core.Dimensions.DimensionResult, 10 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle engine/src/CodeHealth.Reporting/RunReport.cs:8 — The namespaces CodeHealth.Reporting ↔ CodeHealth.Reporting.Recommendations depend on each other. The lightest dependency in the cycle is CodeHealth.Reporting → CodeHealth.Reporting.Recommendations (CodeHealth.Reporting.RunReport → CodeHealth.Reporting.Recommendations.Recommendation, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle engine/src/CodeHealth.Llm.OpenAiCompatible/Http/OpenAiCompatibleHttpClient.cs:31 — The namespaces CodeHealth.Llm.OpenAiCompatible ↔ CodeHealth.Llm.OpenAiCompatible.Http depend on each other. The lightest dependency in the cycle is CodeHealth.Llm.OpenAiCompatible.Http → CodeHealth.Llm.OpenAiCompatible (CodeHealth.Llm.OpenAiCompatible.Http.OpenAiCompatibleHttpClient → CodeHealth.Llm.OpenAiCompatible.OpenAiCompatibleOptions, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle engine/src/CodeHealth.Llm.ClaudeCli/ClaudeCliLlmProvider.cs:4 — The namespaces CodeHealth.Llm.ClaudeCli ↔ CodeHealth.Llm.ClaudeCli.Process depend on each other. The lightest dependency in the cycle is CodeHealth.Llm.ClaudeCli → CodeHealth.Llm.ClaudeCli.Process (CodeHealth.Llm.ClaudeCli.ClaudeCliLlmProvider → CodeHealth.Llm.ClaudeCli.Process.IClaudeCliRunner, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle engine/src/CodeHealth.Llm.CopilotCli/CopilotCliLlmProvider.cs:4 — The namespaces CodeHealth.Llm.CopilotCli ↔ CodeHealth.Llm.CopilotCli.Process depend on each other. The lightest dependency in the cycle is CodeHealth.Llm.CopilotCli → CodeHealth.Llm.CopilotCli.Process (CodeHealth.Llm.CopilotCli.CopilotCliLlmProvider → CodeHealth.Llm.CopilotCli.Process.ICopilotCliRunner, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Core/Metrics/Contracts/IMetricsWriter.cs:14 — The namespaces Kennel.Core.Metrics.Contracts ↔ Kennel.Core.Metrics.Domain.Events depend on each other. The lightest dependency in the cycle is Kennel.Core.Metrics.Contracts → Kennel.Core.Metrics.Domain.Events (Kennel.Core.Metrics.Contracts.IMetricsWriter → Kennel.Core.Metrics.Domain.Events.ScanRunLedger, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Core/Deliveries/Persistence/DeliveriesDbContext.cs:1 — The namespaces Kennel.Core.Deliveries.Persistence ↔ Kennel.Core.Deliveries.ReadModel depend on each other. The lightest dependency in the cycle is Kennel.Core.Deliveries.Persistence → Kennel.Core.Deliveries.ReadModel (Kennel.Core.Deliveries.Persistence.DeliveriesDbContext → Kennel.Core.Deliveries.ReadModel.PublishedDeliveryView, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Core/Scans/Events/ScanEvents.cs:141 — The namespaces Kennel.Core.Scans.Contracts ↔ Kennel.Core.Scans.Domain.Events ↔ Kennel.Core.Scans.Events ↔ Kennel.Core.Scans.Execution ↔ Kennel.Core.Scans.Persistence ↔ Kennel.Core.Scans.Produce ↔ Kennel.Core.Scans.ReadModel ↔ Kennel.Core.Scans.ReadModels ↔ Kennel.Core.Scans.Sources depend on each other. The lightest dependency in the cycle is Kennel.Core.Scans.Events → Kennel.Core.Scans.Persistence (Kennel.Core.Scans.Events.ScanEventPublisher → Kennel.Core.Scans.Persistence.ScansDbContext, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Core/Commercial/Contracts/CommercialCatalogSnapshot.cs:1 — The namespaces Kennel.Core.Billing ↔ Kennel.Core.Billing.Services ↔ Kennel.Core.Commercial.Contracts depend on each other. The lightest dependency in the cycle is Kennel.Core.Commercial.Contracts → Kennel.Core.Billing (Kennel.Core.Commercial.Contracts.CommercialCatalogSnapshot → Kennel.Core.Billing.PriceBook, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Core/Repositories/Advisory/AdvisoryVisibilityService.cs:1 — The namespaces Kennel.Core.Repositories.Advisory ↔ Kennel.Core.Repositories.Persistence ↔ Kennel.Core.Repositories.Services depend on each other. The lightest dependency in the cycle is Kennel.Core.Repositories.Advisory → Kennel.Core.Repositories.Persistence (Kennel.Core.Repositories.Advisory.AdvisoryVisibilityService → Kennel.Core.Repositories.Persistence.RepositoriesDbContext, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Watchdog.Core/Agents/ReadModels/RepoFindingsReadModel.cs:5 — The namespaces Kennel.Watchdog.Agents.ReadModels ↔ Kennel.Watchdog.Agents.Services depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Agents.ReadModels → Kennel.Watchdog.Agents.Services (Kennel.Watchdog.Agents.ReadModels.RepoFindingsReadModel → Kennel.Watchdog.Agents.Services.AgentFinding, 4 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Watchdog.Core/Trackers/ITaskTracker.cs:2 — The namespaces Kennel.Watchdog.Trackers ↔ Kennel.Watchdog.Trackers.Sync depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Trackers → Kennel.Watchdog.Trackers.Sync (Kennel.Watchdog.Trackers.ITaskTracker → Kennel.Watchdog.Trackers.Sync.PlanTicketDraft, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Watchdog.Core/Onboarding/Kickoff/ReportStepsReader.cs:4 — The namespaces Kennel.Watchdog.Onboarding.Kickoff ↔ Kennel.Watchdog.Reporting.Composition ↔ Kennel.Watchdog.Reporting.Distillation ↔ Kennel.Watchdog.Reporting.Persistence ↔ Kennel.Watchdog.Reporting.Publishing ↔ Kennel.Watchdog.Teams ↔ Kennel.Watchdog.Teams.ReadModels depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Onboarding.Kickoff → Kennel.Watchdog.Reporting.Publishing (Kennel.Watchdog.Onboarding.Kickoff.ReportStepsReader → Kennel.Watchdog.Reporting.Publishing.PublishRecordStore, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Admin.Core/Admin/Mcp/MaintainerMcpTools.cs:5 — The namespaces Kennel.Admin.Health ↔ Kennel.Admin.Mcp ↔ Kennel.Admin.ReadModels ↔ Kennel.Admin.Services depend on each other. The lightest dependency in the cycle is Kennel.Admin.Mcp → Kennel.Admin.ReadModels (Kennel.Admin.Mcp.MaintainerMcpTools → Kennel.Admin.ReadModels.SystemHealthReadModel, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Core/AccessGrants/Persistence/AccessGrantsDbContext.cs:1 — The namespaces Kennel.Core.AccessGrants.Persistence ↔ Kennel.Core.AccessGrants.Privacy ↔ Kennel.Core.AccessGrants.ReadModel depend on each other. The lightest dependency in the cycle is Kennel.Core.AccessGrants.Persistence → Kennel.Core.AccessGrants.Privacy (Kennel.Core.AccessGrants.Persistence.AccessGrantsDbContext → Kennel.Core.AccessGrants.Privacy.EmailProtectionKey, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Core/Compliance/Persistence/ComplianceDbContext.cs:1 — The namespaces Kennel.Core.Compliance.Activation ↔ Kennel.Core.Compliance.Contracts ↔ Kennel.Core.Compliance.Persistence depend on each other. The lightest dependency in the cycle is Kennel.Core.Compliance.Persistence → Kennel.Core.Compliance.Activation (Kennel.Core.Compliance.Persistence.ComplianceDbContext → Kennel.Core.Compliance.Activation.RepositoryComplianceSetting, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Assay.Core/DecisionReports/BuildDecisionReport.cs:4 — The namespaces Kennel.Assay.DecisionReports ↔ Kennel.Assay.DecisionReports.Domain ↔ Kennel.Assay.DecisionReports.Domain.Events ↔ Kennel.Assay.DecisionReports.Persistence ↔ Kennel.Assay.DecisionReports.Projections ↔ Kennel.Assay.DecisionReports.Queries ↔ Kennel.Assay.DecisionReports.Subscriptions depend on each other. The lightest dependency in the cycle is Kennel.Assay.DecisionReports → Kennel.Assay.DecisionReports.Queries (Kennel.Assay.DecisionReports.BuildDecisionReportHandler → Kennel.Assay.DecisionReports.Queries.DecisionReportListQueries, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Assay.Core/Governance/Persistence/GovernanceDbContext.cs:2 — The namespaces Kennel.Assay.Governance.Persistence ↔ Kennel.Assay.Governance.Projections depend on each other. The lightest dependency in the cycle is Kennel.Assay.Governance.Persistence → Kennel.Assay.Governance.Projections (Kennel.Assay.Governance.Persistence.GovernanceDbContext → Kennel.Assay.Governance.Projections.BarCatalogView, 6 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Core/Ingestion/Persistence/IngestionDbContext.cs:1 — The namespaces Kennel.Core.Ingestion.Persistence ↔ Kennel.Core.Ingestion.Tokens depend on each other. The lightest dependency in the cycle is Kennel.Core.Ingestion.Persistence → Kennel.Core.Ingestion.Tokens (Kennel.Core.Ingestion.Persistence.IngestionDbContext → Kennel.Core.Ingestion.Tokens.IngestToken, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Improve.Orchestrator/Queue/PackageSelector.cs:3 — The namespaces Kennel.Improve.Orchestrator.Gates ↔ Kennel.Improve.Orchestrator.Queue ↔ Kennel.Improve.Orchestrator.Turns depend on each other. The lightest dependency in the cycle is Kennel.Improve.Orchestrator.Queue → Kennel.Improve.Orchestrator.Turns (Kennel.Improve.Orchestrator.Queue.PackageSelector → Kennel.Improve.Orchestrator.Turns.Elsewhere, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Watchdog.Core/Scheduling/SchedulingModule.cs:8 — The namespaces Kennel.Watchdog.Scheduling ↔ Kennel.Watchdog.Scheduling.Dispatch ↔ Kennel.Watchdog.Scheduling.Services depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Scheduling → Kennel.Watchdog.Scheduling.Services (Kennel.Watchdog.Scheduling.SchedulingModule → Kennel.Watchdog.Scheduling.Services.RunEtaService, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Watchdog.Core/Architecture/Application/C4ModelService.cs:2 — The namespaces Kennel.Watchdog.Architecture.Application ↔ Kennel.Watchdog.Architecture.Model depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Architecture.Application → Kennel.Watchdog.Architecture.Model (Kennel.Watchdog.Architecture.Application.C4ModelService → Kennel.Watchdog.Architecture.Model.C4Finding, 3 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle src/Kennel.Watchdog.Core/Reporting/Rendering/ArtifactCuration.cs:16 — The namespaces Kennel.Watchdog.Reporting ↔ Kennel.Watchdog.Reporting.Rendering depend on each other. The lightest dependency in the cycle is Kennel.Watchdog.Reporting.Rendering → Kennel.Watchdog.Reporting (Kennel.Watchdog.Reporting.Rendering.ArtifactCuration → Kennel.Watchdog.Reporting.ReportKind, 3 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
D31 · IaC & Container Security · High IaC · ×2
  • REDACTED
  • REDACTED
ED4 · Outbox / dual-write · Dual write (no outbox) · ×2
  • Dual write (no outbox): DeclineDigestService.RunOnceAsync src/Kennel.Admin.Core/Admin/Services/DeclineDigestService.cs:48 — `DeclineDigestService.RunOnceAsync` writes to the database AND publishes to the message bus in the same flow, with no outbox referenced in this path. These two writes aren't atomic — a crash between them either loses the message (DB committed, publish failed) or emits a phantom event (publish succeeded, DB rolled back). Use the transactional outbox pattern — write the message to an outbox table in the SAME transaction as the state change, and dispatch it from there afterwards — or your platform's equivalent (a broker transaction, or an outbox library from your own ecosystem).
  • Dual write (no outbox): VerificationReminderService.ClaimAndSendAsync src/Kennel.Admin.Core/Admin/Services/VerificationReminderService.cs:108 — `VerificationReminderService.ClaimAndSendAsync` writes to the database AND publishes to the message bus in the same flow, with no outbox referenced in this path. These two writes aren't atomic — a crash between them either loses the message (DB committed, publish failed) or emits a phantom event (publish succeeded, DB rolled back). Use the transactional outbox pattern — write the message to an outbox table in the SAME transaction as the state change, and dispatch it from there afterwards — or your platform's equivalent (a broker transaction, or an outbox library from your own ecosystem).
AX1 · Captive dependencies · Captive dependency · ×1
  • Captive dependency: singleton OpenAiCompatibleLlmProvider captures transient IOpenAiCompatibleHttpClient engine/src/CodeHealth.Llm.OpenAiCompatible/OpenAiCompatibleLlmProvider.cs:16 — `OpenAiCompatibleLlmProvider` is registered as a SINGLETON but its constructor takes `IOpenAiCompatibleHttpClient http`, which is registered as Transient. The singleton captures one instance of the transient dependency forever — defeating its lifetime (a per-request DbContext shared across all requests is a classic data-corruption/threading bug). Make the singleton resolve `IOpenAiCompatibleHttpClient` per-use (inject `IServiceScopeFactory` or a factory func), or align the lifetimes.
D17 · Explicit Debt · NoWarnInCsproj · ×1
  • NoWarnInCsproj tests/Kennel.Analyzers.Tests/Kennel.Analyzers.Tests.csproj:6 — CA1707 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
Serious — 2715 finding(s)
D3 · God Classes · TooManyMethods · ×295
  • TooManyMethods: ForeignComplianceScan engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.cs — TooManyMethods — 5581 significant lines (blank, comment-only and punctuation-only lines excluded), 734 methods, declared across 41 files: Compliance.Prework/ForeignComplianceScan.cs (53), Compliance.Prework/ForeignAccessControlScan.cs (52), Compliance.Prework/ForeignComplianceScan.RustAccessControl.cs (45), Compliance.Prework/ForeignComplianceScan.DartAccessControl.cs (39), +37 more file(s). The bar is 30 methods; this is 704 over it, 24.47× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignWebSecurityScan engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs — TooManyMethods — 2849 significant lines (blank, comment-only and punctuation-only lines excluded), 452 methods, declared across 15 files: S1/ForeignWebSecurityScan.cs (76), S1/ForeignWebSecurityScan.Rust.cs (66), S1/ForeignWebSecurityScan.Ruby.cs (59), S1/ForeignWebSecurityScan.Scala.cs (53), +11 more file(s). The bar is 30 methods; this is 422 over it, 15.07× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: SupplyChainProvenanceAnalyzer engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs — TooManyMethods — 4789 significant lines (blank, comment-only and punctuation-only lines excluded), 442 methods, declared across 11 files: D36/SupplyChainProvenanceAnalyzer.cs (336), D36/SupplyChainProvenanceAnalyzer.PublishTrigger.cs (21), D36/SupplyChainProvenanceAnalyzer.TokenSites.cs (18), D36/SupplyChainProvenanceAnalyzer.PackagingIdentity.cs (13), +7 more file(s). The bar is 30 methods; this is 412 over it, 14.73× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: IncompletenessAnalyzer engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs — TooManyMethods — 3293 significant lines (blank, comment-only and punctuation-only lines excluded), 365 methods, declared across 9 files: IC1/IncompletenessAnalyzer.cs (196), IC1/IncompletenessAnalyzer.Java.cs (46), IC1/IncompletenessAnalyzer.JavaScript.cs (27), IC1/IncompletenessAnalyzer.Ruby.cs (23), +5 more file(s). The bar is 30 methods; this is 335 over it, 12.17× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignDocumentWalkScan engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Scala.cs — TooManyMethods — 3141 significant lines (blank, comment-only and punctuation-only lines excluded), 342 methods, declared across 6 files: X17/ForeignDocumentWalkScan.Scala.cs (82), X17/ForeignDocumentWalkScan.cs (74), X17/ForeignDocumentWalkScan.Kotlin.cs (57), X17/ForeignDocumentWalkScan.Python.cs (48), +2 more file(s). The bar is 30 methods; this is 312 over it, 11.40× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignExceptionHandlingScan engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.cs — TooManyMethods — 2205 significant lines (blank, comment-only and punctuation-only lines excluded), 318 methods, declared across 11 files: X3/ForeignExceptionHandlingScan.cs (49), X3/ForeignExceptionHandlingScan.Scala.cs (47), X3/ForeignExceptionHandlingScan.Go.cs (42), X3/ForeignExceptionHandlingScan.Ruby.cs (40), +7 more file(s). The bar is 30 methods; this is 288 over it, 10.60× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignUncoveredIndexGuardScan engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.cs — TooManyMethods — 2461 significant lines (blank, comment-only and punctuation-only lines excluded), 313 methods, declared across 15 files: X28/ForeignUncoveredIndexGuardScan.cs (85), X28/ForeignUncoveredIndexGuardScan.Elixir.cs (32), X28/ForeignUncoveredIndexGuardScan.Python.cs (29), X28/ForeignUncoveredIndexGuardScan.Ruby.cs (28), +11 more file(s). The bar is 30 methods; this is 283 over it, 10.43× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignUntrustedLengthScan engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs — TooManyMethods — 2549 significant lines (blank, comment-only and punctuation-only lines excluded), 286 methods, declared across 10 files: X15/ForeignUntrustedLengthScan.Python.cs (45), X15/ForeignUntrustedLengthScan.Rust.cs (39), X15/ForeignUntrustedLengthScan.Ruby.cs (37), X15/ForeignUntrustedLengthScan.cs (34), +6 more file(s). The bar is 30 methods; this is 256 over it, 9.53× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignAddressClassifierScan engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.cs — TooManyMethods — 2128 significant lines (blank, comment-only and punctuation-only lines excluded), 264 methods, declared across 13 files: X14/ForeignAddressClassifierScan.cs (52), X14/ForeignAddressClassifierScan.Kotlin.cs (33), X14/ForeignAddressClassifierScan.Swift.cs (33), X14/ForeignAddressClassifierScan.Ruby.cs (26), +9 more file(s). The bar is 30 methods; this is 234 over it, 8.80× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignInertKnobScan engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Python.cs — TooManyMethods — 2108 significant lines (blank, comment-only and punctuation-only lines excluded), 245 methods, declared across 9 files: X25/ForeignInertKnobScan.Python.cs (57), X25/ForeignInertKnobScan.Php.cs (50), X25/ForeignInertKnobScan.Ruby.cs (41), X25/ForeignInertKnobScan.Java.cs (27), +5 more file(s). The bar is 30 methods; this is 215 over it, 8.17× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: RoslynExplicitDebtCollector engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs — TooManyMethods — 2285 significant lines (blank, comment-only and punctuation-only lines excluded), 234 methods, declared across 2 files: ExplicitDebt/RoslynExplicitDebtCollector.cs (213), ExplicitDebt/RoslynExplicitDebtCollector.Vb.cs (21). The bar is 30 methods; this is 204 over it, 7.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ForeignStructuredLoggingScan engine/src/Scanner/Defects/X4/ForeignStructuredLoggingScan.Scala.cs — TooManyMethods — 1751 significant lines (blank, comment-only and punctuation-only lines excluded), 230 methods, declared across 9 files: X4/ForeignStructuredLoggingScan.Scala.cs (43), X4/ForeignStructuredLoggingScan.Rust.cs (37), X4/ForeignStructuredLoggingScan.Java.cs (35), X4/ForeignStructuredLoggingScan.Kotlin.cs (34), +5 more file(s). The bar is 30 methods; this is 200 over it, 7.67× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: CompliancePrework engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs — TooManyMethods — 2352 significant lines (blank, comment-only and punctuation-only lines excluded), 216 methods, declared across 2 files: Compliance.Prework/CompliancePrework.cs (205), Compliance.Prework/CompliancePrework.PasswordStorage.cs (11). The bar is 30 methods; this is 186 over it, 7.20× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignHttpResilienceScan engine/src/Scanner/Readiness/P7/ForeignHttpResilienceScan.cs — TooManyMethods — 994 significant lines (blank, comment-only and punctuation-only lines excluded), 211 methods. The bar is 30 methods; this is 181 over it, 7.03× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignScopedGlobalMutationScan engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.cs — TooManyMethods — 1643 significant lines (blank, comment-only and punctuation-only lines excluded), 198 methods, declared across 8 files: X19/ForeignScopedGlobalMutationScan.cs (32), X19/ForeignScopedGlobalMutationScan.Ruby.cs (30), X19/ForeignScopedGlobalMutationScan.Dart.cs (29), X19/ForeignScopedGlobalMutationScan.Php.cs (27), +4 more file(s). The bar is 30 methods; this is 168 over it, 6.60× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ChangeCouplingAnalyzer engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs — TooManyMethods — 2070 significant lines (blank, comment-only and punctuation-only lines excluded), 189 methods. The bar is 30 methods; this is 159 over it, 6.30× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ScriptFunctions engine/src/Scanner/Incompleteness/Incompleteness.Shared/ScriptFunctions.Dart.cs — TooManyMethods — 1249 significant lines (blank, comment-only and punctuation-only lines excluded), 189 methods, declared across 4 files: Incompleteness.Shared/ScriptFunctions.Dart.cs (68), Incompleteness.Shared/ScriptFunctions.Scala.cs (58), Incompleteness.Shared/ScriptFunctions.Ruby.cs (33), Incompleteness.Shared/ScriptFunctions.cs (30). The bar is 30 methods; this is 159 over it, 6.30× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: JsDuplicationDetector engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs — TooManyMethods — 2407 significant lines (blank, comment-only and punctuation-only lines excluded), 187 methods. The bar is 30 methods; this is 157 over it, 6.23× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: DecisionReport src/Kennel.Assay.Core/DecisionReports/Domain/DecisionReport.Compose.Findings.cs — TooManyMethods — 2448 significant lines (blank, comment-only and punctuation-only lines excluded), 182 methods, declared across 7 files: Domain/DecisionReport.Compose.Findings.cs (60), Domain/DecisionReport.Compose.Types.cs (57), Domain/DecisionReport.Compose.Core.cs (29), Domain/DecisionReport.Compose.Contracts.cs (16), +3 more file(s). The bar is 30 methods; this is 152 over it, 6.07× 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: GoDomainConventions engine/src/Core/Languages/Go/Domain/GoDomainConventions.cs — TooManyMethods — 1076 significant lines (blank, comment-only and punctuation-only lines excluded), 173 methods. The bar is 30 methods; this is 143 over it, 5.77× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: SourceClassifier engine/src/Core/Classification/SourceClassifier.cs — TooManyMethods — 1553 significant lines (blank, comment-only and punctuation-only lines excluded), 166 methods. The bar is 30 methods; this is 136 over it, 5.53× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignDiagnosticMaterialisationScan engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs — TooManyMethods — 1431 significant lines (blank, comment-only and punctuation-only lines excluded), 160 methods, declared across 9 files: X23/ForeignDiagnosticMaterialisationScan.cs (31), X23/ForeignDiagnosticMaterialisationScan.Scala.cs (30), X23/ForeignDiagnosticMaterialisationScan.Ruby.cs (27), X23/ForeignDiagnosticMaterialisationScan.FSharp.cs (19), +5 more file(s). The bar is 30 methods; this is 130 over it, 5.33× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: Parser engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.cs — TooManyMethods — 1340 significant lines (blank, comment-only and punctuation-only lines excluded), 158 methods, declared across 9 files: X28/ForeignUncoveredIndexGuardScan.cs (98), X28/ForeignUncoveredIndexGuardScan.Erlang.cs (14), X28/ForeignUncoveredIndexGuardScan.Swift.cs (12), X28/ForeignUncoveredIndexGuardScan.FSharp.cs (9), +5 more file(s). The bar is 30 methods; this is 128 over it, 5.27× 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: ReportViewModelFactory engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs — TooManyMethods — 1722 significant lines (blank, comment-only and punctuation-only lines excluded), 157 methods. The bar is 30 methods; this is 127 over it, 5.23× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ForeignSideEffectingGuardScan engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.cs — TooManyMethods — 1377 significant lines (blank, comment-only and punctuation-only lines excluded), 156 methods, declared across 10 files: X21/ForeignSideEffectingGuardScan.cs (33), X21/ForeignSideEffectingGuardScan.Rust.cs (28), X21/ForeignSideEffectingGuardScan.Python.cs (22), X21/ForeignSideEffectingGuardScan.Kotlin.cs (17), +6 more file(s). The bar is 30 methods; this is 126 over it, 5.20× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • + 270 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×139
  • Hotspot: engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs:298 — engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs changed 215 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in AnalyzeCommand.ExecuteCoreAsync at line 298. 14 of those changes were fix/bug commits, and the other 201 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs`: 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: engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:986 — engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in ExecutiveBrief.Input at line 986. 38 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs`: 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: engine/src/Core/SourceCensus/DiskSourceFiles.cs engine/src/Core/SourceCensus/DiskSourceFiles.cs:1662 — engine/src/Core/SourceCensus/DiskSourceFiles.cs changed 59 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in DiskSourceFiles.IsNeverProductionSourceFile at line 1662. 11 of those changes were fix/bug commits, and the other 48 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Core/SourceCensus/DiskSourceFiles.cs`: 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: engine/src/Scanner/Security/Shared/Scanners/SecretNoiseFilter.cs engine/src/Scanner/Security/Shared/Scanners/SecretNoiseFilter.cs:580 — engine/src/Scanner/Security/Shared/Scanners/SecretNoiseFilter.cs changed 50 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in SecretNoiseFilter.IsExcusedUnderGenericRule at line 580. 3 of those changes were fix/bug commits, and the other 47 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/Security/Shared/Scanners/SecretNoiseFilter.cs`: 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: engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:7528 — engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs changed 90 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in JsDuplicationDetector.IsDescriptorToken at line 7528. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs`: 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: engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:457 — engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in ReportViewModelFactory.BuildBriefFacts at line 457. 4 of those changes were fix/bug commits, and the other 37 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs`: 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: tools/bench/bench.py tools/bench/bench.py:1594 — tools/bench/bench.py changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in bench.cmd_compare at line 1594. 8 of those changes were fix/bug commits, and the other 29 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- tools/bench/bench.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: src/Kennel.Core/LanguageTraining/Services/LanguageTrainingService.cs src/Kennel.Core/LanguageTraining/Services/LanguageTrainingService.cs:2069 — src/Kennel.Core/LanguageTraining/Services/LanguageTrainingService.cs changed 81 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in LanguageTrainingService.ListProgrammeAsync at line 2069. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Core/LanguageTraining/Services/LanguageTrainingService.cs`: 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: engine/src/Core/Classification/SourceClassifier.cs engine/src/Core/Classification/SourceClassifier.cs:4390 — engine/src/Core/Classification/SourceClassifier.cs changed 78 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in SourceClassifier.PackageManifestVerdict at line 4390. 16 of those changes were fix/bug commits, and the other 62 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Core/Classification/SourceClassifier.cs`: 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: engine/src/Scanner/ExplicitDebt/D17/ExplicitDebtAnalyzer.cs engine/src/Scanner/ExplicitDebt/D17/ExplicitDebtAnalyzer.cs:997 — engine/src/Scanner/ExplicitDebt/D17/ExplicitDebtAnalyzer.cs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in ExplicitDebtAnalyzer.Weight at line 997. 1 of those changes was a fix/bug commit, and the other 42 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/ExplicitDebt/D17/ExplicitDebtAnalyzer.cs`: 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: engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:154 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs changed 69 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in TestReliabilityAnalyzer.RunAsync at line 154. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs`: 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: engine/src/Scanner/Complexity/Complexity.Shared/ComplexityScoring.cs engine/src/Scanner/Complexity/Complexity.Shared/ComplexityScoring.cs:332 — engine/src/Scanner/Complexity/Complexity.Shared/ComplexityScoring.cs changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ComplexityScoring.RemediationFor at line 332. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/Complexity/Complexity.Shared/ComplexityScoring.cs`: 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: engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs:4036 — engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs changed 67 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in RoslynExplicitDebtCollector.HasJustifyingCommentAbove at line 4036. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs`: 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: engine/src/Core/ModelAware/DomainConventions.cs engine/src/Core/ModelAware/DomainConventions.cs:1346 — engine/src/Core/ModelAware/DomainConventions.cs changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in DomainConventions.IsAggregate at line 1346. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Core/ModelAware/DomainConventions.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/Kennel.Improve.Orchestrator/Turns/TurnRunner.cs src/Kennel.Improve.Orchestrator/Turns/TurnRunner.cs:196 — src/Kennel.Improve.Orchestrator/Turns/TurnRunner.cs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in TurnRunner.RunTurnAsync at line 196. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Improve.Orchestrator/Turns/TurnRunner.cs`: 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: engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:67 — engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in ChangeCouplingAnalyzer.RunAsync at line 67. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs:1131 — src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs changed 56 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in EngineScanExecutor.ReadOutput at line 1131. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs`: 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: engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:138 — engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in LicenseComplianceAnalyzer.WithoutNuGetLicencesAsync at line 138. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs`: 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: engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs:1811 — engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in MutationIdempotencyAnalyzer.HasIdempotencyGuard at line 1811. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs`: 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: engine/src/Scanner/GitMining/GitMining.Shared/GitMiningSourceFiles.cs engine/src/Scanner/GitMining/GitMining.Shared/GitMiningSourceFiles.cs:451 — engine/src/Scanner/GitMining/GitMining.Shared/GitMiningSourceFiles.cs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in GitMiningSourceFiles.Eligible at line 451. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/GitMining/GitMining.Shared/GitMiningSourceFiles.cs`: 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: engine/src/Scanner/ArchitectureModel/ArchitectureModel.Prework/ArchitectureModelPrework.cs engine/src/Scanner/ArchitectureModel/ArchitectureModel.Prework/ArchitectureModelPrework.cs:203 — engine/src/Scanner/ArchitectureModel/ArchitectureModel.Prework/ArchitectureModelPrework.cs changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ArchitectureModelPrework.TryReadRegistration at line 203. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/ArchitectureModel/ArchitectureModel.Prework/ArchitectureModelPrework.cs`: 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: engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2579 — engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in FolderStructureAnalyzer.TsConfigDeclaredSourceRoot at line 2579. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs`: 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: engine/src/Scanner/ModelAware/ModelAware.Prework/PerformanceScan.cs engine/src/Scanner/ModelAware/ModelAware.Prework/PerformanceScan.cs:373 — engine/src/Scanner/ModelAware/ModelAware.Prework/PerformanceScan.cs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in PerformanceScan.CollectAsyncSitesAsync at line 373. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/ModelAware/ModelAware.Prework/PerformanceScan.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/Kennel.Watchdog.Core/Repositories/Pages/RepoFindings/RepoFindings.razor src/Kennel.Watchdog.Core/Repositories/Pages/RepoFindings/RepoFindings.razor — src/Kennel.Watchdog.Core/Repositories/Pages/RepoFindings/RepoFindings.razor changed 42 times in last 90 days, max cyclomatic complexity 15. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Watchdog.Core/Repositories/Pages/RepoFindings/RepoFindings.razor`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/Kennel.Improve.Orchestrator/Gates/ShellGate.cs src/Kennel.Improve.Orchestrator/Gates/ShellGate.cs:99 — src/Kennel.Improve.Orchestrator/Gates/ShellGate.cs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in ShellGate.JudgeAsync at line 99. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Improve.Orchestrator/Gates/ShellGate.cs`: 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.
  • + 114 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×136
  • FileTooLong: D36/SupplyChainProvenanceAnalyzer.cs engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs — FileTooLong — 3911 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3411 over it, 7.82× 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: R10/JsDuplicationDetector.cs engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs — FileTooLong — 2670 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2170 over it, 5.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Compliance.Prework/CompliancePrework.cs engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs — FileTooLong — 2336 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1836 over it, 4.67× 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: ExplicitDebt/RoslynExplicitDebtCollector.cs engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs — FileTooLong — 2331 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1831 over it, 4.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: CodeShape/DuplicationAnalyzer.cs engine/src/Scanner/CodeShape/D4/CodeShape/DuplicationAnalyzer.cs — FileTooLong — 2217 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1717 over it, 4.43× 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: D35/ChangeCouplingAnalyzer.cs engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs — FileTooLong — 2151 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1651 over it, 4.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: D11/TestReliabilityAnalyzer.cs engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs — FileTooLong — 2050 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1550 over it, 4.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Commands/AnalyzeCommand.cs engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs — FileTooLong — 1985 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1485 over it, 3.97× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Templates/ReportViewModelFactory.cs engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs — FileTooLong — 1756 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1256 over it, 3.51× 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: Services/LanguageTrainingService.cs src/Kennel.Core/LanguageTraining/Services/LanguageTrainingService.cs — FileTooLong — 1612 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1112 over it, 3.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: IC1/IncompletenessAnalyzer.cs engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs — FileTooLong — 1596 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1096 over it, 3.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Markup/BuilderDslMarkupProducer.cs engine/src/Core/Markup/BuilderDslMarkupProducer.cs — FileTooLong — 1570 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1070 over it, 3.14× 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: D14/LicenseComplianceAnalyzer.cs engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs — FileTooLong — 1479 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 979 over it, 2.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: Scanners/SecretNoiseFilter.cs engine/src/Scanner/Security/Shared/Scanners/SecretNoiseFilter.cs — FileTooLong — 1468 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 968 over it, 2.94× 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: X28/ForeignUncoveredIndexGuardScan.cs engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.cs — FileTooLong — 1457 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 957 over it, 2.91× 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: D12/DependencyHygieneAnalyzer.cs engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs — FileTooLong — 1374 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 874 over it, 2.75× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Scanners/ScanParsers.cs engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs — FileTooLong — 1348 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 848 over it, 2.70× 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: Services/BacklogService.cs src/Kennel.Core/LanguageTraining/Services/BacklogService.cs — FileTooLong — 1284 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 784 over it, 2.57× 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: Testing/RoslynTestQualityCollector.cs engine/src/Core/Testing/RoslynTestQualityCollector.cs — FileTooLong — 1219 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 719 over it, 2.44× 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: Produce/ScanProduceService.cs src/Kennel.Core/Scans/Produce/ScanProduceService.cs — FileTooLong — 1193 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 693 over it, 2.39× 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: Frontend/EntryPointCatalog.cs engine/src/Core/Frontend/EntryPointCatalog.cs — FileTooLong — 1133 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 633 over it, 2.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: CodeShape/RoslynDuplicationDetector.cs engine/src/Core/CodeShape/RoslynDuplicationDetector.cs — FileTooLong — 1111 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 611 over it, 2.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Commands/ScoringSpecModel.cs engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs — FileTooLong — 1103 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 603 over it, 2.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: P7/ForeignHttpResilienceScan.cs engine/src/Scanner/Readiness/P7/ForeignHttpResilienceScan.cs — FileTooLong — 1103 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 603 over it, 2.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Domain/GoDomainConventions.cs engine/src/Core/Languages/Go/Domain/GoDomainConventions.cs — FileTooLong — 1089 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 589 over it, 2.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.
  • + 111 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×61
  • Duplicated block (5 lines × 2) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:649 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:649-653 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:729-733 — 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) engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:421 — engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:421-425 | engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:885-889 — 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 `engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:421` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) engine/src/Scanner/Defects/X8/JsInteropContractAnalyzer.cs:106 — engine/src/Scanner/Defects/X8/JsInteropContractAnalyzer.cs:106-110 | engine/src/Scanner/Readiness/Readiness.Prework/OperabilityScan.cs:63-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Dart.cs:162 — engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Dart.cs:162-166 | engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Scala.cs:300-304 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:3649 — engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:3649-3653 | engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:3747-3751 — 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 `engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:3649` 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 (5 lines × 2) engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:4873 — engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:4873-4877 | engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:4948-4952 — 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 (5 lines × 2) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1131 — engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1131-1135 | engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1851-1855 — 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 `engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1131` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.cs:86 — engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.cs:86-90 | engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.cs:89-93 — 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 `engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.cs:86` 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 (5 lines × 2) engine/src/Scanner/Security/Shared/Scanners/CurlPipeShellSourceRecheck.cs:291 — engine/src/Scanner/Security/Shared/Scanners/CurlPipeShellSourceRecheck.cs:291-295 | engine/src/Scanner/Security/Shared/Scanners/LoopbackAddressRecheck.cs:73-77 — 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) engine/src/Scanner/ArchitectureJudged/D22/InternalApiConsistencyAnalyzer.cs:197 — engine/src/Scanner/ArchitectureJudged/D22/InternalApiConsistencyAnalyzer.cs:197-201 | engine/src/Scanner/Docs/D21/NamingConsistencyAnalyzer.cs:288-292 — 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 `engine/src/Scanner/ArchitectureJudged/D22/InternalApiConsistencyAnalyzer.cs:197` 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 first that the copies are not typed on the same thing: the declarations holding them bind `v` to `ApiViolation` in one and `NamingViolation` 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.
  • Duplicated block (5 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAccessControl.cs:66 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAccessControl.cs:66-70 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:62-66 — 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.
  • Duplicated block (5 lines × 2) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:73 — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:73-77 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Scala.cs:133-137 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:73` 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 (5 lines × 2) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Python.cs:46 — engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Python.cs:46-50 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Python.cs:74-78 — 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.
  • Duplicated block (5 lines × 2) engine/src/Scanner/CodeShape/D3/CodeShape/GodClassAnalyzer.cs:226 — engine/src/Scanner/CodeShape/D3/CodeShape/GodClassAnalyzer.cs:226-230 | engine/src/Scanner/ExplicitDebt/D17/ExplicitDebtAnalyzer.cs:124-128 — 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 `engine/src/Scanner/CodeShape/D3/CodeShape/GodClassAnalyzer.cs:226` 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 (5 lines × 2) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:604 — engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:604-608 | engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.cs:734-738 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1869 — engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1869-1873 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1909-1913 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) engine/src/Scanner/ArchitectureJudged/D22/InternalApiConsistencyAnalyzer.cs:142 — engine/src/Scanner/ArchitectureJudged/D22/InternalApiConsistencyAnalyzer.cs:142-147 | engine/src/Scanner/Docs/D21/NamingConsistencyAnalyzer.cs:250-254 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:10324 — engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:10324-10328 | engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:10336-10340 — 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 `engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:10324` 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 (5 lines × 2) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Ruby.cs:196 — engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Ruby.cs:196-200 | engine/src/Scanner/Incompleteness/Incompleteness.Shared/ScriptFunctions.Ruby.cs:539-543 — 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 `engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Ruby.cs:196` 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 (5 lines × 2) engine/src/Scanner/ArchitectureModel/AX1/GetItRegistrations.cs:192 — engine/src/Scanner/ArchitectureModel/AX1/GetItRegistrations.cs:192-196 | engine/src/Scanner/ArchitectureModel/AX1/GetXRegistrations.cs:131-135 — 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) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:476 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:476-480 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:500-504 — 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 `engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:476` 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 (5 lines × 2) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ElixirServer.cs:155 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ElixirServer.cs:155-159 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ScalaServer.cs:196-200 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ElixirServer.cs:155` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinRetention.cs:232 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinRetention.cs:232-236 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.SwiftRetention.cs:151-155 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinRetention.cs:232` 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 (5 lines × 2) engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Go.cs:270 — engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Go.cs:270-276 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Kotlin.cs:547-551 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Go.cs:270` 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 (5 lines × 2) engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Python.cs:205 — engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Python.cs:205-209 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Scala.cs:210-215 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Python.cs:205` 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.
  • + 36 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×46
  • Duplicated block (10 lines × 2) engine/src/Scanner/Accessibility/AC6/FocusOutlineRemoval.cs:504 — engine/src/Scanner/Accessibility/AC6/FocusOutlineRemoval.cs:504-513 | engine/src/Scanner/Security/Shared/Scanners/DockerfileSyntax.cs:595-604 — 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 `engine/src/Scanner/Accessibility/AC6/FocusOutlineRemoval.cs:504` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (10 lines × 2) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:718 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:718-727 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:835-844 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:718` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2588 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2588-2597 | engine/src/Scanner/Testing/D8/CoverageNotMeasured.cs:1175-1184 — 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 `engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2588` 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 (10 lines × 2) engine/src/Scanner/Docs/D24/DocRestatement.cs:49 — engine/src/Scanner/Docs/D24/DocRestatement.cs:49-58 | engine/src/Scanner/Docs/D24/VbDocRestatement.cs:25-34 — 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 (10 lines × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:490 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:490-499 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:702-711 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:490` 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 `t` to `HashSet<string> Paths) KotlinTypedNames(IReadOnlyList<JsToken>` in one and `IReadOnlyList<JsToken>` 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.
  • Duplicated block (10 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:450 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:450-459 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.cs:1288-1297 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:450` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs:340 — engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs:340-349 | engine/src/Scanner/Security/Shared/Scanners/UnverifiedRemoteInstallerScan.cs:1388-1397 — 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 `engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs:340` 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 (10 lines × 2) engine/src/Scanner/Architecture/D6/Cohesion/Lcom4Calculator.cs:676 — engine/src/Scanner/Architecture/D6/Cohesion/Lcom4Calculator.cs:676-685 | engine/src/Scanner/Architecture/D6/Cohesion/Lcom4Calculator.cs:726-735 — 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 `engine/src/Scanner/Architecture/D6/Cohesion/Lcom4Calculator.cs:676` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) engine/src/Scanner/Defects/X8/JsInteropContractAnalyzer.cs:106 — engine/src/Scanner/Defects/X8/JsInteropContractAnalyzer.cs:106-115 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Phases.cs:584-593 — 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 `engine/src/Scanner/Defects/X8/JsInteropContractAnalyzer.cs:106` 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 (10 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:133 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:133-142 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Scala.cs:170-179 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `t` to `IReadOnlyList<JsToken>` in one and `int To) ScalaScope(IReadOnlyList<JsToken>` 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.
  • Duplicated block (10 lines × 2) engine/src/Scanner/Security/D31/Scanners/MutableGitCloneScan.cs:142 — engine/src/Scanner/Security/D31/Scanners/MutableGitCloneScan.cs:142-151 | engine/src/Scanner/Security/Shared/Scanners/UnverifiedRemoteInstallerScan.cs:1341-1350 — 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 `engine/src/Scanner/Security/D31/Scanners/MutableGitCloneScan.cs:142` 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 (10 lines × 2) engine/src/Scanner/Security/D31/Scanners/SetuidBinaryGrantScan.cs:151 — engine/src/Scanner/Security/D31/Scanners/SetuidBinaryGrantScan.cs:151-160 | engine/src/Scanner/Security/D31/Scanners/WorldWritableOwnedPathScan.cs:326-335 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/D31/Scanners/SetuidBinaryGrantScan.cs:151` 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 (10 lines × 2) engine/src/Core/ModelAware/RepoProfiler.cs:219 — engine/src/Core/ModelAware/RepoProfiler.cs:219-228 | engine/src/Core/ModelAware/RepoProfiler.cs:238-247 — 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 `engine/src/Core/ModelAware/RepoProfiler.cs:219` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:6143 — engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:6143-6152 | engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:6227-6236 — 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 `engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:6143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) engine/src/Scanner/ArchitectureModel/AX7/SliceCohesionAnalyzer.cs:194 — engine/src/Scanner/ArchitectureModel/AX7/SliceCohesionAnalyzer.cs:194-203 | engine/src/Scanner/ArchitectureModel/AX7/SliceCohesionAnalyzer.cs:272-281 — 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 `engine/src/Scanner/ArchitectureModel/AX7/SliceCohesionAnalyzer.cs:194` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:170 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:170-179 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:79-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:170` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:111 — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:111-120 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Vb.cs:37-46 — 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 `engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Java.cs:1517 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Java.cs:1517-1526 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs:1093-1102 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:554 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:554-563 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs:804-813 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1408 — engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1408-1417 | engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1427-1436 — 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) engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:265 — engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:265-274 | engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:301-310 — 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 `engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:265` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) engine/src/Scanner/Security/D28/Scanners/CommittedKeyStoreScan.cs:81 — engine/src/Scanner/Security/D28/Scanners/CommittedKeyStoreScan.cs:81-90 | engine/src/Scanner/Security/D28/Scanners/CommittedPrivateKeyBlobScan.cs:55-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/D28/Scanners/CommittedKeyStoreScan.cs:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) engine/src/Core/Dependencies/HexRegistryClient.cs:141 — engine/src/Core/Dependencies/HexRegistryClient.cs:141-150 | engine/src/Core/Dependencies/UnityRegistryClient.cs:139-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Dependencies/HexRegistryClient.cs:141` 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 (10 lines × 2) engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:1670 — engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:1670-1681 | engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:1734-1743 — 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 `engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:1670` 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 (10 lines × 2) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:1826 — engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:1826-1835 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:2013-2022 — 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 `engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:1826` 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.
  • + 21 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×43
  • Duplicated block (8 lines × 2) engine/src/Core/Discovery/UnreadManifestDisclosure.cs:374 — engine/src/Core/Discovery/UnreadManifestDisclosure.cs:374-381 | engine/src/Core/Discovery/UnreadManifestDisclosure.cs:424-431 — 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 `engine/src/Core/Discovery/UnreadManifestDisclosure.cs:374` 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 (8 lines × 2) engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:654 — engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:654-661 | engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:877-884 — 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 `engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:654` 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 (8 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs:790 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs:790-797 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Ruby.cs:667-674 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Scala.cs:138 — engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Scala.cs:138-145 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.cs:733-740 — 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 `engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Scala.cs:138` 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 (8 lines × 2) engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:396 — engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:396-403 | engine/src/Scanner/Security/Shared/Scanners/DockerfileSyntax.cs:333-340 — 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 `engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:396` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Kotlin.cs:80 — engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Kotlin.cs:80-87 | engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Scala.cs:92-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Kotlin.cs:80` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) engine/src/Scanner/Defects/X14/AddressClassifierAnalyzer.cs:24 — engine/src/Scanner/Defects/X14/AddressClassifierAnalyzer.cs:24-31 | engine/src/Scanner/Defects/X15/UntrustedLengthAnalyzer.cs:45-52 — 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 `engine/src/Scanner/Defects/X14/AddressClassifierAnalyzer.cs:24` 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 (8 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:289 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:289-296 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Rust.cs:319-326 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:289` 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 (8 lines × 2) engine/src/Core/Dependencies/MixManifestHygiene.cs:407 — engine/src/Core/Dependencies/MixManifestHygiene.cs:407-414 | engine/src/Core/Dependencies/RebarManifestHygiene.cs:353-360 — 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 (8 lines × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:800 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:800-807 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Scala.cs:919-926 — 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 `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:800` 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 (8 lines × 2) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:121 — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:121-128 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Scala.cs:226-233 — 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 (8 lines × 2) engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Vb.cs:251 — engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Vb.cs:251-258 | engine/src/Scanner/Defects/X28/UncoveredIndexGuardAnalyzer.cs:522-529 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) engine/src/Scanner/Defects/X24/ForeignMarkupTaintScan.cs:287 — engine/src/Scanner/Defects/X24/ForeignMarkupTaintScan.cs:287-294 | engine/src/Scanner/Defects/X24/ForeignMarkupTaintScan.cs:307-314 — 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 `engine/src/Scanner/Defects/X24/ForeignMarkupTaintScan.cs:287` 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 (8 lines × 2) engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:561 — engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:561-568 | engine/src/Scanner/ModelAware/ModelAware.Prework/EventDrivenScan.cs:224-231 — 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 `engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:561` 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 (8 lines × 2) engine/src/Core/Architecture/Topology/Extractors/CrossplaneExtractor.cs:33 — engine/src/Core/Architecture/Topology/Extractors/CrossplaneExtractor.cs:33-40 | engine/src/Core/Architecture/Topology/Extractors/KubernetesExtractor.cs:32-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Architecture/Topology/Extractors/CrossplaneExtractor.cs:33` 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 (8 lines × 2) engine/src/Core/Dependencies/PnpmLockfileReader.cs:235 — engine/src/Core/Dependencies/PnpmLockfileReader.cs:235-242 | engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:10555-10562 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:1076 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:1076-1083 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:900-907 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs:898 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs:898-905 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Ruby.cs:785-792 — 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 (8 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:116 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:116-123 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Python.cs:95-102 — 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 (8 lines × 2) engine/src/Scanner/Security/D29/Scanners/InlineScriptShadow.cs:65 — engine/src/Scanner/Security/D29/Scanners/InlineScriptShadow.cs:65-72 | engine/src/Scanner/Security/D29/Scanners/PrimaryConstructorShadow.cs:91-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/D29/Scanners/InlineScriptShadow.cs:65` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/Scanner/Security/D29/Scanners/InlineScriptShadow.cs:73` calls `Select`, `ToList` and `engine/src/Scanner/Security/D29/Scanners/PrimaryConstructorShadow.cs:99` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) engine/src/Scanner/Security/D31/Scanners/AutomountedServiceAccountTokenScan.cs:353 — engine/src/Scanner/Security/D31/Scanners/AutomountedServiceAccountTokenScan.cs:353-360 | engine/src/Scanner/Security/D31/Scanners/HostPathPersistentVolumeScan.cs:217-224 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Scanner/Security/D31/Scanners/HostPathPersistentVolumeScan.cs:213` calls `IsPlaceholder`, `IsMatch` and `engine/src/Scanner/Security/D31/Scanners/AutomountedServiceAccountTokenScan.cs:349` 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 (8 lines × 2) engine/src/Core/ModelAware/RepoProfiler.cs:254 — engine/src/Core/ModelAware/RepoProfiler.cs:254-261 | engine/src/Core/ModelAware/RepoProfiler.cs:512-519 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `types` to `IReadOnlyList<INamedTypeSymbol>` in one and `IReadOnlyList<Nm.ICodeType>` 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.
  • Duplicated block (8 lines × 2) engine/src/Scanner/CodeShape/D4/CodeShape/DuplicationAnalyzer.cs:4750 — engine/src/Scanner/CodeShape/D4/CodeShape/DuplicationAnalyzer.cs:4750-4757 | engine/src/Scanner/CodeShape/D4/CodeShape/DuplicationAnalyzer.cs:4758-4765 — 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) engine/src/Scanner/ArchitectureModel/AX1/GetItRegistrations.cs:202 — engine/src/Scanner/ArchitectureModel/AX1/GetItRegistrations.cs:202-209 | engine/src/Scanner/ArchitectureModel/AX1/GetXRegistrations.cs:143-150 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/ArchitectureModel/AX1/GetItRegistrations.cs:202` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAuditTrail.cs:61 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAuditTrail.cs:61-68 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.PythonAuditTrail.cs:72-79 — 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.
  • + 18 more in this group — see findings.md.
D5 · Coupling · Off the main sequence · ×43
  • Off the main sequence: CodeHealth.Core.Synthesis engine/src/Core/Synthesis/CodeHealth.Core.Synthesis.csproj:1 — CodeHealth.Core.Synthesis: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Accessibility engine/src/Core/Accessibility/CodeHealth.Core.Accessibility.csproj:1 — CodeHealth.Core.Accessibility: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Io engine/src/Core/Io/CodeHealth.Core.Io.csproj:1 — CodeHealth.Core.Io: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.JsLexing engine/src/Core/JsLexing/CodeHealth.Core.JsLexing.csproj:1 — CodeHealth.Core.JsLexing: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 40 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.SpecPrints engine/src/Core/SpecPrints/CodeHealth.Core.SpecPrints.csproj:1 — CodeHealth.Core.SpecPrints: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.ScriptLexing engine/src/Core/ScriptLexing/CodeHealth.Core.ScriptLexing.csproj:1 — CodeHealth.Core.ScriptLexing: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 29 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Languages.Erlang.Defects engine/src/Core/Languages/Erlang/Defects/CodeHealth.Core.Languages.Erlang.Defects.csproj:1 — CodeHealth.Core.Languages.Erlang.Defects: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Languages.FSharp.Defects engine/src/Core/Languages/FSharp/Defects/CodeHealth.Core.Languages.FSharp.Defects.csproj:1 — CodeHealth.Core.Languages.FSharp.Defects: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.MarkupOutput engine/src/Core/MarkupOutput/CodeHealth.Core.MarkupOutput.csproj:1 — CodeHealth.Core.MarkupOutput: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.SourceTree engine/src/Core/SourceTree/CodeHealth.Core.SourceTree.csproj:1 — CodeHealth.Core.SourceTree: abstractness 0.00, instability 0.01, distance 0.99 — zone of pain — concrete and depended on by 99 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Classification engine/src/Core/Classification/CodeHealth.Core.Classification.csproj:1 — CodeHealth.Core.Classification: abstractness 0.00, instability 0.02, distance 0.98 — zone of pain — concrete and depended on by 96 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Languages.Ruby.Defects engine/src/Core/Languages/Ruby/Defects/CodeHealth.Core.Languages.Ruby.Defects.csproj:1 — CodeHealth.Core.Languages.Ruby.Defects: abstractness 0.00, instability 0.04, distance 0.96 — zone of pain — concrete and depended on by 23 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.SourceCensus engine/src/Core/SourceCensus/CodeHealth.Core.SourceCensus.csproj:1 — CodeHealth.Core.SourceCensus: abstractness 0.00, instability 0.05, distance 0.95 — zone of pain — concrete and depended on by 53 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Toolchain engine/src/CodeHealth.Toolchain/CodeHealth.Toolchain.csproj:1 — CodeHealth.Toolchain: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 58 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Languages.Swift.Domain engine/src/Core/Languages/Swift/Domain/CodeHealth.Core.Languages.Swift.Domain.csproj:1 — CodeHealth.Core.Languages.Swift.Domain: abstractness 0.00, instability 0.07, distance 0.93 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Languages.Dart.Domain engine/src/Core/Languages/Dart/Domain/CodeHealth.Core.Languages.Dart.Domain.csproj:1 — CodeHealth.Core.Languages.Dart.Domain: abstractness 0.00, instability 0.07, distance 0.93 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Symbols engine/src/Core/Symbols/CodeHealth.Core.Symbols.csproj:1 — CodeHealth.Core.Symbols: abstractness 0.00, instability 0.08, distance 0.92 — zone of pain — concrete and depended on by 49 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Languages.Rust.Domain engine/src/Core/Languages/Rust/Domain/CodeHealth.Core.Languages.Rust.Domain.csproj:1 — CodeHealth.Core.Languages.Rust.Domain: abstractness 0.00, instability 0.10, distance 0.90 — zone of pain — concrete and depended on by 18 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Enforcement engine/src/Core/Enforcement/CodeHealth.Core.Enforcement.csproj:1 — CodeHealth.Core.Enforcement: abstractness 0.00, instability 0.12, distance 0.88 — zone of pain — concrete and depended on by 21 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Languages.Erlang.Domain engine/src/Core/Languages/Erlang/Domain/CodeHealth.Core.Languages.Erlang.Domain.csproj:1 — CodeHealth.Core.Languages.Erlang.Domain: abstractness 0.00, instability 0.13, distance 0.87 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.Languages.Go.Domain engine/src/Core/Languages/Go/Domain/CodeHealth.Core.Languages.Go.Domain.csproj:1 — CodeHealth.Core.Languages.Go.Domain: abstractness 0.00, instability 0.16, distance 0.84 — zone of pain — concrete and depended on by 16 project(s), so it's rigid to change.
  • Off the main sequence: Kennel.Cai src/Kennel.Cai/Kennel.Cai.csproj:1 — Kennel.Cai: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Scanner.Accessibility.Prework engine/src/Scanner/Accessibility/Accessibility.Prework/CodeHealth.Scanner.Accessibility.Prework.csproj:1 — CodeHealth.Scanner.Accessibility.Prework: abstractness 0.00, instability 0.18, distance 0.82 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Core.FileQuality engine/src/Core/FileQuality/CodeHealth.Core.FileQuality.csproj:1 — CodeHealth.Core.FileQuality: abstractness 0.00, instability 0.18, distance 0.82 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
  • Off the main sequence: CodeHealth.Scanner.Defects.Prework engine/src/Scanner/Defects/Defects.Prework/CodeHealth.Scanner.Defects.Prework.csproj:1 — CodeHealth.Scanner.Defects.Prework: abstractness 0.00, instability 0.19, distance 0.81 — zone of pain — concrete and depended on by 28 project(s), so it's rigid to change.
  • + 18 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×40
  • Duplicated block (7 lines × 2) engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs:116 — engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs:116-122 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.cs:249-255 — 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 (7 lines × 2) engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Dart.cs:162 — engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Dart.cs:162-168 | engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.cs:252-258 — 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 (7 lines × 2) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Ruby.cs:190 — engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Ruby.cs:190-196 | engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Scala.cs:207-213 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Ruby.cs:190` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Ruby.cs:429 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Ruby.cs:429-435 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Ruby.cs:415-421 — 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 `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Ruby.cs:429` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Ruby.cs:237 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Ruby.cs:237-243 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Ruby.cs:397-403 — 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 `engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Ruby.cs:237` 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 (7 lines × 2) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:150 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:150-156 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:108-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:150` 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 (7 lines × 2) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Python.cs:437 — engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Python.cs:437-443 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Scala.cs:517-523 — 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 `engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Python.cs:437` 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 (7 lines × 2) engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Go.cs:89 — engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Go.cs:89-95 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Swift.cs:137-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Go.cs:89` 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 (7 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:175 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:175-181 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Scala.cs:121-127 — 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 (7 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:398 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:398-404 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Scala.cs:271-277 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:398` 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 (7 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirRetention.cs:42 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirRetention.cs:42-48 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.PythonRetention.cs:34-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:568 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:568-574 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Rust.cs:82-88 — 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 `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:568` 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 (7 lines × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:791 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:791-797 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:657-663 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:791` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `first` to `KotlinCreated` in one and `ScalaCreated` 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.
  • Duplicated block (7 lines × 2) engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:198 — engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:198-204 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Ruby.cs:233-239 — 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 (7 lines × 2) engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:642 — engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:642-648 | engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:731-737 — 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 `engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:642` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1443 — engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1443-1449 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1768-1774 — 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 `engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1443` 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 `licences` to `GoLicenseReport` in one and `PubLicenseReport` 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.
  • Duplicated block (7 lines × 2) engine/src/Scanner/Security/Shared/Scanners/CargoLockGraph.cs:352 — engine/src/Scanner/Security/Shared/Scanners/CargoLockGraph.cs:352-358 | engine/src/Scanner/Security/Shared/Scanners/CargoLockGraph.cs:453-459 — 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 `engine/src/Scanner/Security/Shared/Scanners/CargoLockGraph.cs:352` 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 (7 lines × 2) engine/src/CodeHealth.Reporting/Architecture/DsmHtml.cs:380 — engine/src/CodeHealth.Reporting/Architecture/DsmHtml.cs:380-386 | engine/src/Core/ExplicitDebt/MarkdownSnippetReferenceScanner.cs:157-163 — 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 `engine/src/CodeHealth.Reporting/Architecture/DsmHtml.cs:380` 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 (7 lines × 2) engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:7075 — engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:7075-7081 | engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:8382-8388 — 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 `engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:7075` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `lines` to `List<string>` in one and `string[]` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:7074` calls `LeadingSpaces` and `engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:8381` 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 (7 lines × 2) engine/src/Scanner/ArchitectureModel/AX2/NeutralStatefulSingletons.Scala.cs:123 — engine/src/Scanner/ArchitectureModel/AX2/NeutralStatefulSingletons.Scala.cs:123-129 | engine/src/Scanner/ArchitectureModel/AX2/NeutralStatefulSingletons.cs:335-341 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/ArchitectureModel/AX2/NeutralStatefulSingletons.Scala.cs:123` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:89 — engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:89-96 | engine/src/Scanner/Defects/X24/ForeignMarkupTaintScan.cs:176-182 — 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 `engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:89 — engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:89-96 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs:139-145 — 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 `engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Java.cs:65 — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Java.cs:65-71 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:423-429 — 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 (7 lines × 2) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:577 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:577-583 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Scala.cs:589-595 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:577` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:576` calls `Add`, `EmitRange` and `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Scala.cs:589` 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 (7 lines × 2) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:149 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:149-155 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs:161-167 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:149` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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.
  • + 15 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×40
  • Untrusted text written into markup unescaped src/Kennel.Admin.Core/Admin/Pages/AdminDeploy/Deploy.razor:574 — `$"<span class=\"muted small\">unreadable — {System.Net.WebUtility.HtmlEncode(why)}</span>"` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Admin.Core/Admin/Pages/AdminDeploy/Deploy.razor:586 — `$"<code>{version}</code> <code class=\"muted\">{commit}</code><br>" + $"<span class=\"muted small\">{when}</span>{closed}"` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Admin.Core/Admin/Pages/AdminLanguageBoard/LanguageBoard.razor:107 — `AdminBoardSparkline.Render(lang.History)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Admin.Core/Admin/Pages/AdminQueueWait/QueueWait.razor:102 — `QueueTimelineChart.Render(view.Buckets)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Admin.Core/Admin/Pages/AdminRunbook/Runbook.razor:130 — `Markdig.Markdown.ToHtml(_view.RunbookText)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/ReportDetail.razor:147 — `ArtifactHtmlRenderer.ToHtmlFragment(markdown)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Assay.Core/DecisionReports/Pages/AssayProductReports/PortfolioReportDetail.razor:84 — `ArtifactHtmlRenderer.ToHtmlFragment(markdown)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Assay.Core/DecisionReports/Rendering/ArtifactDocument.cs:52 — `body` is text this program did not author, and it is written into the text of an element through markup this method returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Assay.Core/Profiles/ProfilesModule.cs:457 — `rendered.Html!` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Core/Billing/Pages/MyTerms/TermsPage.razor:92 — `html` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Core/Billing/Pages/Organization/Organization.razor:422 — `( "Read access follows TEAM membership: whoever is on the team that holds a repository can read it. " + "Set that up under Teams above — <em>visibility only</em> (who can MANAGE a repository is decided " + "by the git provider, never here). One person needs one repository outside their teams? " + "<a href=\"/ui/organization/grants\">Open the access exceptions</a>")` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Core/Billing/Partners/PartnerStatementDocument.cs:82 — `E(partnerName)` is text this program did not author, and it is written into the text of an element through a `StringBuilder` building markup with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Core/Billing/Partners/PartnerStatementDocument.cs:84 — `E(partnerName)` is text this program did not author, and it is written into the text of an element through a `StringBuilder` building markup with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:225 — `html` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:296 — `html` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:337 — `html` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Core/Questionnaires/Pages/ReviewRunner/ReviewRunner.razor:743 — `html` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Core/Questionnaires/Pages/ReviewRunner/ReviewRunner.razor:766 — `linked` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Hosting/Ui/KennelUiHostingExtensions.cs:275 — `html` is text this program did not author, and it is written into the text of an element through `HttpResponse.WriteAsync` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Ui/Components/Sprite.razor:4 — `Load()` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Watchdog.App/Dev/DevGitHubStandIn.cs:77 — `body` is text this program did not author, and it is written into the text of an element through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Watchdog.App/Dev/DevGitHubStandIn.cs:78 — `WebUtility.HtmlEncode(href)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `Content(…, "text/html")` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/Kennel.Watchdog.Core/Architecture/Pages/RepoArchitecture/Architecture.razor:278 — `C4SvgRenderer.Render(_model)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/Kennel.Watchdog.Core/Architecture/Pages/RepoArchitecture/Architecture.razor:283 — `C4SvgRenderer.RenderTopology(_topology)` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:217 — `_structure.MatrixHtml` is text this program did not author, and it is written into the text of an element through Blazor's `MarkupString` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×39
  • Duplicated block (9 lines × 2) engine/src/Core/Architecture/Topology/Extractors/BicepExtractor.cs:155 — engine/src/Core/Architecture/Topology/Extractors/BicepExtractor.cs:155-163 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.cs:672-680 — 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 `engine/src/Core/Architecture/Topology/Extractors/BicepExtractor.cs:155` 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) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:114 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:114-122 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Rust.cs:100-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:114` 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 after the matched lines, `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Rust.cs:109` calls `ReadSqlRetention` and `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:123` 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 (9 lines × 2) engine/src/Core/Dependencies/BunLockfileReader.cs:65 — engine/src/Core/Dependencies/BunLockfileReader.cs:65-73 | engine/src/Core/Dependencies/NpmLockfileReader.cs:148-156 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Dependencies/BunLockfileReader.cs:65` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) engine/src/Core/Architecture/Topology/Extractors/CdkExtractor.cs:66 — engine/src/Core/Architecture/Topology/Extractors/CdkExtractor.cs:66-74 | engine/src/Core/Architecture/Topology/Extractors/PulumiExtractor.cs:40-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Architecture/Topology/Extractors/CdkExtractor.cs:66` 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) engine/src/CodeHealth.Llm.Abstractions/Validation/LlmFindingIntegrity.cs:34 — engine/src/CodeHealth.Llm.Abstractions/Validation/LlmFindingIntegrity.cs:34-42 | engine/src/CodeHealth.Llm.Abstractions/Validation/LlmFindingIntegrity.cs:385-393 — 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 `engine/src/CodeHealth.Llm.Abstractions/Validation/LlmFindingIntegrity.cs:34` 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) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:188 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:188-196 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:175-183 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:194 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:194-202 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Ruby.cs:476-484 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:194` 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) engine/src/Core/Dependencies/NpmRegistryClient.cs:163 — engine/src/Core/Dependencies/NpmRegistryClient.cs:163-171 | engine/src/Core/Dependencies/NpmRegistryClient.cs:204-212 — 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 `engine/src/Core/Dependencies/NpmRegistryClient.cs:163` 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) engine/src/Core/Dependencies/UnityPackageHygiene.cs:144 — engine/src/Core/Dependencies/UnityPackageHygiene.cs:144-152 | engine/src/Core/Security/DotnetProjectLicensesCollector.cs:696-704 — 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 `engine/src/Core/Dependencies/UnityPackageHygiene.cs:144` 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) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:639 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:639-647 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:543-551 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Ruby.cs:137 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Ruby.cs:137-145 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Swift.cs:190-198 — 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 (9 lines × 2) engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:145 — engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:145-153 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:208-216 — 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 `engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:145` 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 (9 lines × 2) engine/src/Core/ModelAware/NeutralInvocationMatching.cs:101 — engine/src/Core/ModelAware/NeutralInvocationMatching.cs:101-109 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:1129-1137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) engine/src/Core/ExplicitDebt/RazorMarkupReferenceScanner.cs:294 — engine/src/Core/ExplicitDebt/RazorMarkupReferenceScanner.cs:294-302 | engine/src/Core/ExplicitDebt/XamlMarkupReferenceScanner.cs:221-229 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/ExplicitDebt/RazorMarkupReferenceScanner.cs:294` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:174 — engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:174-182 | engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:225-233 — 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, `engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:201` calls `IsUiThreadAffineViewType` and `engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:234` 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 (9 lines × 2) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.PasswordStorage.cs:296 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.PasswordStorage.cs:296-304 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.PasswordStorage.cs:338-346 — 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 `engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.PasswordStorage.cs:296` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (9 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:232 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:232-240 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:251-259 — 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 `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:232` 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 × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinRetention.cs:58 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinRetention.cs:58-66 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ScalaRetention.cs:60-68 — 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. 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 × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:445 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:445-453 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:668-676 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:445` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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 × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:627 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:627-635 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:531-539 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs:95 — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs:95-103 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Php.cs:67-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 2) engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:76 — engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:76-84 | engine/src/Scanner/Defects/X4/StructuredLoggingDimension.cs:47-55 — 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 `engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Scanner/Defects/X4/StructuredLoggingDimension.cs:45` calls `ThrowIfNull` and `engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:75` 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 (9 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:222 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:222-230 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Scala.cs:167-175 — 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 (9 lines × 2) engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:169 — engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:169-177 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:236-244 — 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 `engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:236` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:257 — engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:257-265 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:820-830 — 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 `engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:257` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 14 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×37
  • Duplicated block (6 lines × 2) engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3704 — engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3704-3709 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:5073-5078 — 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) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:264 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:264-269 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Census.cs:113-118 — 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 `engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:264` 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 (6 lines × 2) engine/src/Scanner/Defects/X4/ForeignStructuredLoggingScan.Kotlin.cs:249 — engine/src/Scanner/Defects/X4/ForeignStructuredLoggingScan.Kotlin.cs:249-254 | engine/src/Scanner/Defects/X4/ForeignStructuredLoggingScan.Scala.cs:583-588 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X4/ForeignStructuredLoggingScan.Kotlin.cs:249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Php.cs:143 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Php.cs:143-148 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Php.cs:297-302 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Java.cs:207 — engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Java.cs:207-212 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.cs:459-464 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Dart.cs:140 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Dart.cs:140-145 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Ruby.cs:62-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Dart.cs:140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:633 — engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:633-638 | engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.cs:800-805 — 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 `engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:633` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:105 — engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:105-110 | engine/src/Scanner/Defects/Defects.Shared/CSharpCards.cs:1428-1433 — 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 `engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:105` 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 after the matched lines, `engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:114` calls `Max` and `engine/src/Scanner/Defects/Defects.Shared/CSharpCards.cs:1437` 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 (6 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:498 — engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:498-503 | engine/src/Scanner/ModelAware/ModelAware.Prework/PerformanceScan.cs:65-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.cs:104 — engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.cs:104-109 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.cs:125-130 — 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 `engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.cs:104` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) engine/src/CodeHealth.Reporting/Changelog/KnownNarrations.cs:279 — engine/src/CodeHealth.Reporting/Changelog/KnownNarrations.cs:279-284 | engine/src/CodeHealth.Reporting/Changelog/SlottedChangelogNarrator.cs:708-713 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/CodeHealth.Reporting/Changelog/KnownNarrations.cs:279` 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 (6 lines × 2) engine/src/Scanner/ArchitectureModel/AX2/NeutralStatefulSingletons.cs:564 — engine/src/Scanner/ArchitectureModel/AX2/NeutralStatefulSingletons.cs:564-569 | engine/src/Scanner/ArchitectureModel/AX2/NeutralStatefulSingletons.cs:790-795 — 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 `engine/src/Scanner/ArchitectureModel/AX2/NeutralStatefulSingletons.cs:564` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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 (6 lines × 2) engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:615 — engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:615-622 | engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:626-631 — 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) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.cs:359 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.cs:359-364 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.cs:387-392 — 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 (6 lines × 2) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Java.cs:170 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Java.cs:170-175 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs:352-357 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Java.cs:170` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `cls` to `JavaClass` in one and `ClassSpan` 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.
  • Duplicated block (6 lines × 2) engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:96 — engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:96-101 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:207-212 — 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) engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:122 — engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:122-127 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:144-149 — 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 `engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) engine/src/Core/Markup/BuilderDslMarkupProducer.cs:2693 — engine/src/Core/Markup/BuilderDslMarkupProducer.cs:2693-2698 | engine/src/Core/Markup/BuilderDslMarkupProducer.cs:2905-2910 — 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 `engine/src/Core/Markup/BuilderDslMarkupProducer.cs:2693` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) engine/src/CodeHealth.Reporting/Synthesis/SynthesisEngine.cs:626 — engine/src/CodeHealth.Reporting/Synthesis/SynthesisEngine.cs:626-631 | engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:3328-3333 — 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.
  • Duplicated block (6 lines × 2) engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:719 — engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsAnalyzer.cs:719-724 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:579-584 — 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.
  • Duplicated block (6 lines × 2) engine/src/Core/Architecture/PassThroughFacadeDetector.cs:162 — engine/src/Core/Architecture/PassThroughFacadeDetector.cs:162-167 | engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:799-804 — 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.
  • Duplicated block (6 lines × 2) engine/src/Scanner/Defects/Defects.Prework/DefectsScan.cs:213 — engine/src/Scanner/Defects/Defects.Prework/DefectsScan.cs:213-218 | engine/src/Scanner/ModelAware/DM8/PrimitiveDataClumpsAnalyzer.cs:376-381 — 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.
  • Duplicated block (6 lines × 2) engine/src/Scanner/Security/Shared/NuGetVulnerabilityArm.cs:515 — engine/src/Scanner/Security/Shared/NuGetVulnerabilityArm.cs:515-520 | engine/src/Scanner/Security/Shared/Scanners/DeepScan.cs:1899-1904 — 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.
  • Duplicated block (6 lines × 2) engine/src/CodeHealth.CodeModel.FSharp/FSharpProvider.fs:89 — engine/src/CodeHealth.CodeModel.FSharp/FSharpProvider.fs:89-94 | engine/src/CodeHealth.CodeModel.FSharp/SyntaxModel.fs:31-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) engine/src/CodeHealth.Toolchain/MsBuild/ResxFileRefNormalizer.cs:173 — engine/src/CodeHealth.Toolchain/MsBuild/ResxFileRefNormalizer.cs:173-178 | engine/src/CodeHealth.Toolchain/MsBuild/SdkPinReconciler.cs:179-184 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/CodeHealth.Toolchain/MsBuild/ResxFileRefNormalizer.cs:173` 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.
  • + 12 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×31
  • Duplicated block (11 lines × 2) engine/src/Scanner/ModelAware/ED3/EventNamingAnalyzer.cs:380 — engine/src/Scanner/ModelAware/ED3/EventNamingAnalyzer.cs:380-390 | engine/src/Scanner/ModelAware/ED3/EventNamingAnalyzer.cs:410-420 — 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 `engine/src/Scanner/ModelAware/ED3/EventNamingAnalyzer.cs:380` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) engine/src/Scanner/Security/Shared/Scanners/SocketAndUpgradeRecheck.cs:288 — engine/src/Scanner/Security/Shared/Scanners/SocketAndUpgradeRecheck.cs:288-298 | engine/src/Scanner/Security/Shared/Scanners/SocketAndUpgradeRecheck.cs:406-416 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:1157 — engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:1157-1167 | engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:1187-1197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:1717 — engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:1717-1727 | engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:1778-1788 — 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 `engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:1717` 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) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:928 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:928-938 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Scala.cs:929-939 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:928` 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) engine/src/Core/ExplicitDebt/RazorMarkupReferenceScanner.cs:44 — engine/src/Core/ExplicitDebt/RazorMarkupReferenceScanner.cs:44-54 | engine/src/Core/ExplicitDebt/RazorMarkupReferenceScanner.cs:90-100 — 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 `engine/src/Core/ExplicitDebt/RazorMarkupReferenceScanner.cs:44` 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) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:613 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:613-623 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:688-698 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:613` 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) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Rust.cs:294 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Rust.cs:294-304 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Rust.cs:352-362 — 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 `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Rust.cs:294` 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 (11 lines × 2) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:738 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:738-748 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Scala.cs:754-764 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:738` 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) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Php.cs:717 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Php.cs:717-727 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Php.cs:746-756 — 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 `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Php.cs:717` 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) engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:92 — engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:92-102 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:121-131 — 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 `engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:92` 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) engine/src/Scanner/Incompleteness/Incompleteness.Shared/ScriptFunctions.Dart.cs:1097 — engine/src/Scanner/Incompleteness/Incompleteness.Shared/ScriptFunctions.Dart.cs:1097-1107 | engine/src/Scanner/Incompleteness/Incompleteness.Shared/ScriptFunctions.cs:186-196 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Incompleteness/Incompleteness.Shared/ScriptFunctions.Dart.cs:1097` 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 `q` to `int` in one and `ref int` 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.
  • Duplicated block (11 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAuditTrail.cs:44 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAuditTrail.cs:44-54 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirDataSubjectRights.cs:27-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAuditTrail.cs:44` 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) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Kotlin.cs:126 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Kotlin.cs:126-136 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:179-189 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Kotlin.cs:126` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Ruby.cs:129 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Ruby.cs:129-139 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Scala.cs:350-360 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs:1048 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs:1048-1058 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:957-967 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) engine/src/Scanner/GitMining/D15/HotspotAnalyzer.cs:570 — engine/src/Scanner/GitMining/D15/HotspotAnalyzer.cs:570-580 | engine/src/Scanner/GitMining/D15/HotspotAnalyzer.cs:587-597 — 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 `engine/src/Scanner/GitMining/D15/HotspotAnalyzer.cs:570` 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 (11 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs:33 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs:33-43 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.RustAuditTrail.cs:37-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs:33` 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, `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.RustAuditTrail.cs:34` calls `RustCrateNames`, `Overlaps` and `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs:32` 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 (11 lines × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:605 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:605-615 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:699-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. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:605` 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 (11 lines × 2) engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.cs:510 — engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.cs:510-520 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.cs:409-419 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:726 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:726-736 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:603-613 — 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 (11 lines × 2) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:605 — engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:605-615 | engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Scala.cs:411-421 — 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. 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 (11 lines × 2) engine/src/Scanner/Defects/X24/ForeignMarkupTaintScan.cs:1334 — engine/src/Scanner/Defects/X24/ForeignMarkupTaintScan.cs:1334-1344 | engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:815-825 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:401 — engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:401-411 | engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:473-483 — 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 `engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:401` 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 (11 lines × 2) engine/src/Scanner/Security/Shared/DependencyVulnerabilityUnion.cs:159 — engine/src/Scanner/Security/Shared/DependencyVulnerabilityUnion.cs:159-169 | engine/src/Scanner/Security/Shared/OsvScannerAnalyzer.cs:391-417 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/Shared/DependencyVulnerabilityUnion.cs:159` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `g` to `List<ScanFinding>` in one and `IGrouping<string, ScanFinding>` 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.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×26
  • Duplicated block (12 lines × 2) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:177 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:177-188 | engine/src/Scanner/Defects/X6/ForeignHandRolledParsingScan.Elixir.cs:32-43 — 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 `engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:177` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Ruby.cs:268 — engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Ruby.cs:268-279 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Rust.cs:158-169 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Ruby.cs:268` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) engine/src/CodeHealth.Core/Scoring/WcagCoverage.cs:60 — engine/src/CodeHealth.Core/Scoring/WcagCoverage.cs:60-71 | engine/src/CodeHealth.Core/Scoring/WcagCoverage.cs:99-110 — 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 (12 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAccessControl.cs:564 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAccessControl.cs:564-575 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:736-747 — 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.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Readiness/P3/SecurityAndPerfToolingAnalyzer.cs:1011 — engine/src/Scanner/Readiness/P3/SecurityAndPerfToolingAnalyzer.cs:1011-1022 | engine/src/Scanner/Readiness/P3/SecurityAndPerfToolingAnalyzer.cs:1075-1086 — 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 `engine/src/Scanner/Readiness/P3/SecurityAndPerfToolingAnalyzer.cs:1011` 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 (12 lines × 2) engine/src/Scanner/Defects/X10/StringContractSmellAnalyzer.cs:96 — engine/src/Scanner/Defects/X10/StringContractSmellAnalyzer.cs:96-107 | engine/src/Scanner/Defects/X9/CoherenceSmellAnalyzer.cs:88-99 — 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 `engine/src/Scanner/Defects/X10/StringContractSmellAnalyzer.cs:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:533 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:533-544 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Scala.cs:477-488 — 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 (12 lines × 2) engine/src/Core/Dependencies/CargoManifestHygiene.cs:271 — engine/src/Core/Dependencies/CargoManifestHygiene.cs:271-282 | engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:786-797 — 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 `engine/src/Core/Dependencies/CargoManifestHygiene.cs:271` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:118 — engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:118-129 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.cs:2826-2837 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:279 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:279-290 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Scala.cs:320-331 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Security/D31/Scanners/SetuidBinaryGrantScan.cs:111 — engine/src/Scanner/Security/D31/Scanners/SetuidBinaryGrantScan.cs:111-122 | engine/src/Scanner/Security/D31/Scanners/WorldWritableOwnedPathScan.cs:287-298 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/D31/Scanners/SetuidBinaryGrantScan.cs:111` 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 `command` to `IReadOnlyList<string> Paths)? SetuidPaths(string` in one and `IReadOnlyList<string> Paths)? WorldWritablePaths(string` 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.
  • Duplicated block (12 lines × 2) engine/src/Core/Markup/MarkupBlindnessCensus.cs:238 — engine/src/Core/Markup/MarkupBlindnessCensus.cs:238-249 | engine/src/Scanner/Accessibility/AC6/ReducedMotionScope.cs:226-237 — 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 `engine/src/Core/Markup/MarkupBlindnessCensus.cs:238` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:82 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:82-93 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Scala.cs:101-112 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:93 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:93-104 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:100-111 — 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 (12 lines × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:358 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:358-369 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:324-335 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:168 — engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:168-179 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Scala.cs:169-180 — 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 (12 lines × 2) engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:170 — engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:170-181 | engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:291-302 — 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 `engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:170` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:225 — engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:225-236 | engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:342-353 — 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 `engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:225` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Architecture/D6/CohesionAnalyzer.cs:78 — engine/src/Scanner/Architecture/D6/CohesionAnalyzer.cs:78-89 | engine/src/Scanner/Architecture/D6/CohesionAnalyzer.cs:182-194 — 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 `engine/src/Scanner/Architecture/D6/CohesionAnalyzer.cs:78` 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 (12 lines × 2) engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Dart.cs:264 — engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Dart.cs:264-275 | engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Scala.cs:404-415 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs:985 — engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs:985-996 | engine/src/Scanner/ModelAware/ModelAware.Prework/PerformanceScan.cs:614-625 — 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 `engine/src/Scanner/ModelAware/ModelAware.Prework/PerformanceScan.cs:614` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Accessibility/Accessibility.Prework/LoadedScripts.cs:302 — engine/src/Scanner/Accessibility/Accessibility.Prework/LoadedScripts.cs:302-313 | engine/src/Scanner/Accessibility/Accessibility.Prework/SubtreeNaming.cs:192-204 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Accessibility/Accessibility.Prework/LoadedScripts.cs:302` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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 (12 lines × 2) engine/src/Scanner/LlmJudgedLanguage/LA1/GdprPersonalDataAnalyzer.cs:57 — engine/src/Scanner/LlmJudgedLanguage/LA1/GdprPersonalDataAnalyzer.cs:57-68 | engine/src/Scanner/ModelAware/ModelAware.Prework/EventSourcingScan.cs:162-173 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:227 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:227-238 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:886-897 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) engine/src/Scanner/Defects/X2/ForeignCancellationScan.cs:1022 — engine/src/Scanner/Defects/X2/ForeignCancellationScan.cs:1022-1033 | engine/src/Scanner/Defects/X4/ForeignStructuredLoggingScan.Rust.cs:562-573 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • + 1 more in this group — see findings.md.
DM10 · One transaction, one aggregate · One operation mutates 2 aggregates · ×26
  • One operation mutates 2 aggregates: Seeding.Draw src/Kennel.Admin.App/Modules/ProgrammeCycleDevSeeder.cs:109 — `Seeding.Draw` saves `TrainingRepo`, `HoldoutDraw` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: PersonalNotificationRuleStore.SetChoiceAsync src/Kennel.Core/Accounts/Services/PersonalNotificationRuleStore.cs:155 — `PersonalNotificationRuleStore.SetChoiceAsync` saves `PersonalNotificationRule`, `PersonalNotificationTriggerSeed` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: PersonalNotificationRuleStore.SeedTeamReportDefaultAsync src/Kennel.Core/Accounts/Services/PersonalNotificationRuleStore.cs:429 — `PersonalNotificationRuleStore.SeedTeamReportDefaultAsync` saves `PersonalNotificationRule`, `PersonalNotificationTriggerSeed` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: AssayEntitlementService.BuyAnnualForRepoAsync src/Kennel.Core/Billing/Services/AssayEntitlementService.cs:38 — `AssayEntitlementService.BuyAnnualForRepoAsync` saves `AssayRepoEntitlement`, `AssayReportChargeLine` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: OrgManagementService.CreateOrgAsync src/Kennel.Core/Billing/Services/OrgManagementService.cs:149 — `OrgManagementService.CreateOrgAsync` saves `Organization`, `OrganizationMember` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: OrgProvisioning.EnsurePersonalOrgWithFactsAsync src/Kennel.Core/Billing/Services/OrgProvisioning.cs:91 — `OrgProvisioning.EnsurePersonalOrgWithFactsAsync` saves `Organization`, `OrganizationMember` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: PartnerCodeMinting.MintAsync src/Kennel.Core/Billing/Partners/PartnerCodeMinting.cs:39 — `PartnerCodeMinting.MintAsync` saves `Coupon`, `PartnerCode` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: PartnerRedemption.RedeemAsync src/Kennel.Core/Billing/Partners/PartnerRedemption.cs:75 — `PartnerRedemption.RedeemAsync` saves `SubscriptionPartnerAttribution`, `SubscriptionCoupon` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: ComplianceDeliveryService.MintAndSignAsync src/Kennel.Core/Compliance/Report/ComplianceDeliveryService.cs:52 — `ComplianceDeliveryService.MintAndSignAsync` saves `Delivery`, `ComplianceDelivery` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: ContributorDailyDraw.HandOutFromStandardAsync src/Kennel.Core/Contributors/ContributorDailyDraw.cs:208 — `ContributorDailyDraw.HandOutFromStandardAsync` saves `QuestionnaireAssignment`, `ContributorOffer` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: BacklogService.GateAsync src/Kennel.Core/LanguageTraining/Services/BacklogService.Hygiene.cs:161 — `BacklogService.GateAsync` saves `BacklogRejectionOverride`, `BacklogItem` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: LanguageTrainingService.RecordRoundReportAsync src/Kennel.Core/LanguageTraining/Services/LanguageTrainingService.cs:595 — `LanguageTrainingService.RecordRoundReportAsync` saves `TrainingRoundReport`, `TrainingRoundRow` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: ProgrammeCycleService.OpenAsync src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs:45 — `ProgrammeCycleService.OpenAsync` saves `ProgrammeCycle`, `CycleLanguage` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: FindingHistory.FoldAsync src/Kennel.Core/Metrics/FindingHistory.cs:13 — `FindingHistory.FoldAsync` saves `FindingFirstSeen`, `FindingHistoryFold` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: MetricsWriter.RecordAsync src/Kennel.Core/Metrics/MetricsWriter.cs:34 — `MetricsWriter.RecordAsync` saves `MetricPoint`, `RunFinding` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: QuestionnaireRunner.AnswerAsync src/Kennel.Core/Questionnaires/Services/QuestionnaireRunner.cs:355 — `QuestionnaireRunner.AnswerAsync` saves `Answer`, `AnswerEvent` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: RepoHandoverService.HandoverAsync src/Kennel.Core/Repositories/Services/RepoHandoverService.cs:50 — `RepoHandoverService.HandoverAsync` saves `RepositorySponsorship`, `RepositoryMember` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: SponsorshipSettingsService.UntrackAsync src/Kennel.Core/Repositories/Services/SponsorshipSettingsService.cs:92 — `SponsorshipSettingsService.UntrackAsync` saves `RepositorySponsorship`, `RepositoryMember` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: AgentAdvisoryFeedbackService.SubmitAsync src/Kennel.Watchdog.Core/Agents/Services/AgentAdvisoryFeedbackService.cs:30 — `AgentAdvisoryFeedbackService.SubmitAsync` saves `AdvisoryFeedback`, `AgentEvent` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: AgentDisputeService.Add src/Kennel.Watchdog.Core/Agents/Services/AgentDisputeService.cs:252 — `AgentDisputeService.Add` saves `FindingDispute`, `AgentEvent` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: DetectorGapService.RecordAsync src/Kennel.Watchdog.Core/Agents/Services/DetectorGapService.cs:164 — `DetectorGapService.RecordAsync` saves `DetectorGap`, `AgentEvent` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: HideRuleService.HideAsync src/Kennel.Watchdog.Core/Agents/Services/HideRuleService.cs:67 — `HideRuleService.HideAsync` saves `HideRule`, `FindingDispute` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: SarifComparisonService.CompareAsync src/Kennel.Watchdog.Core/Calibration/Application/SarifComparisonService.cs:39 — `SarifComparisonService.CompareAsync` saves `SarifComparison`, `ExternalRebuttal` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: EngagementDeliveryService.MintAndSignAsync src/Kennel.Assay.Core/Governance/Application/EngagementDeliveryService.cs:50 — `EngagementDeliveryService.MintAndSignAsync` saves `Delivery`, `EngagementDelivery` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: AdminStaffExam.WithdrawAsync src/Kennel.Admin.Core/Admin/Services/AdminStaffExam.cs:197 — `AdminStaffExam.WithdrawAsync` saves `ResponseSession`, `QuestionnaireAssignment` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • + 1 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×24
  • Repeated repair: src/Kennel.Improve.Orchestrator/Ports/Ports.cs src/Kennel.Improve.Orchestrator/Ports/Ports.cs:53 — src/Kennel.Improve.Orchestrator/Ports/Ports.cs changed 22 times in last 90 days and 16 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is BacklogUnavailableException.Chain at line 53), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(improve): the per-shell gate runs the engine's hermetic guards; a stale census no longer costs the turn a bisect”; “fix(improve): a red pre-lock that does not reproduce is a flake, not a culprit; a registry outage is waited out”; “fix(improve): a shell the Claude API dropped is relaunched every 3 minutes, in its worktree, until it ends on its own terms”; “fix(improve): a dimension measured in one arm, reproduced by every rescan, is the engine's coverage change and is scored”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Improve.Orchestrator/Ports/Ports.cs`: 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: engine/src/CodeHealth.Reporting/Briefing/BriefText.cs engine/src/CodeHealth.Reporting/Briefing/BriefText.cs:155 — engine/src/CodeHealth.Reporting/Briefing/BriefText.cs changed 18 times in last 90 days and 13 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is DimensionText.DocKinds at line 155), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(brief): the summary's text patterns carry no wall-clock match timeout”; “fix(brief): a much larger next step beats the lens step, "comes next" only for the second, provisional says the security picture, one finding is no cause”; “fix(brief): left-over findings said as what they need, a plain group said again, the lens explained, "in part because", installs of undeclared packages are packages”; “fix(brief): causes in plain words ("does poorly on", two findings causes), documented settings counted as settings, each security place keeps its "in"”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/CodeHealth.Reporting/Briefing/BriefText.cs`: 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: engine/src/Core/Manifests/BuildUnits.cs engine/src/Core/Manifests/BuildUnits.cs:267 — engine/src/Core/Manifests/BuildUnits.cs changed 13 times in last 90 days and 11 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 BuildUnits.UnitDirectory at line 267), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine/D26): loose Ruby is run in place like loose Python — a script under a Rakefile belongs to its directory, and one no unit encloses to the checkout (backlog 01a109f4-f616)”; “fix(engine/D26): a Ruby gem is a build unit — a .gemspec declares one, and so does Bundler's gems.rb spelling of a Gemfile; socketry/async's Ruby is measured, not our gap (backlog 01a109f4-f616)”; “fix(engine/D26): source an example app owns is not product left unread — a Flutter plugin is measured over its package, not held to its example apps' Dart, Kotlin and Swift (backlog 01a108c2)”; “fix(engine/D26): loose Python under a build D26 does not read belongs to that build's directory — a Makefile, Bazel BUILD or CMakeLists above a manifest-less script now owns it as a unit named for the build, instead of leaving it unread (backlog 01a0fd61)”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Core/Manifests/BuildUnits.cs`: 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: engine/src/Scanner/Architecture/D26/ProjectCohesionAnalyzer.BuildUnits.cs engine/src/Scanner/Architecture/D26/ProjectCohesionAnalyzer.BuildUnits.cs:33 — engine/src/Scanner/Architecture/D26/ProjectCohesionAnalyzer.BuildUnits.cs changed 14 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ProjectCohesionAnalyzer.MeasureBuildUnitsAsync at line 33), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine/D26): a Ruby gem is a build unit — a .gemspec declares one, and so does Bundler's gems.rb spelling of a Gemfile; socketry/async's Ruby is measured, not our gap (backlog 01a109f4-f616)”; “fix(engine/D26): source an example app owns is not product left unread — a Flutter plugin is measured over its package, not held to its example apps' Dart, Kotlin and Swift (backlog 01a108c2)”; “fix(engine/D26): an F# project is a build unit — a .fsproj declares the directory holding it, and F#'s assembly-wide internal counts (backlog 01a0fece-5699)”; “fix(engine/D26): a checkout that declares no build at all is its one unit — a hand-compiled stomp.erl is measured (backlog 01a0fe24)”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/Architecture/D26/ProjectCohesionAnalyzer.BuildUnits.cs`: 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: REDACTED REDACTED:169 — REDACTED changed 13 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is ScriptGateRunner.ReadDelta at line 169), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(improve): the per-shell gate runs the engine's hermetic guards; a stale census no longer costs the turn a bisect”; “fix(improve): a red pre-lock that does not reproduce is a flake, not a culprit; a registry outage is waited out”; “fix(improve): a dimension measured in one arm, reproduced by every rescan, is the engine's coverage change and is scored”; “fix(improve): a concept suite whose scan never started is the instrument, not a rejection of the package”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +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.
  • Repeated repair: engine/src/CodeHealth.CodeModel.FSharp/FSharpProvider.fs engine/src/CodeHealth.CodeModel.FSharp/FSharpProvider.fs:85 — engine/src/CodeHealth.CodeModel.FSharp/FSharpProvider.fs changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is FSharpProvider.SignatureRefs at line 85), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(fsharp): the provider registers MSBuild under the same gate it loads MSBuild under, so two parallel cracks cannot race”; “fix(engine/fsharp): one F# project load at a time per process (backlog 01a10430-e402)”; “fix(engine/fsharp): undo the SDK alignment's environment once the F# projects are loaded (backlog 01a10430-e402)”; “fix(engine/fsharp): the F# design-time build runs on the SDK whose MSBuild the process loaded, not the one global.json names (backlog 01a10430-e402)”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/CodeHealth.CodeModel.FSharp/FSharpProvider.fs`: 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: src/Kennel.Improve.Orchestrator/Adapters/Infrastructure.cs src/Kennel.Improve.Orchestrator/Adapters/Infrastructure.cs:56 — src/Kennel.Improve.Orchestrator/Adapters/Infrastructure.cs changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is ShipScript.Unjudged at line 56), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(improve): a side move that is a gain on every count is admitted, not rejected as "an unrelated dimension moved"”; “fix(improve): remove --usage-ceiling; the orchestrator waits only on the account's own refusal”; “fix(ship,improve-orchestrator): a .NET crash that was a stage's only red is UNJUDGED, exit 6 - never RED, never a parked package”; “fix(improve-orchestrator): a rebase conflict at ship requeues the merged packages instead of parking them; main moved, the packages were not judged”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Improve.Orchestrator/Adapters/Infrastructure.cs`: 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: engine/src/Core/Dependencies/GradleCurrencyCollector.cs engine/src/Core/Dependencies/GradleCurrencyCollector.cs:77 — engine/src/Core/Dependencies/GradleCurrencyCollector.cs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is GradleCurrencyCollector.CollectAsync at line 77), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine/D12): Gradle parity with the Maven arm — a FAILED row under exit 0 is a partial graph, and a build stopped by the fence's 403 names the host and routes to the egress abstention (backlog 01a10c9f-023f)”; “fix(dependencies/D12): a wrapper-pinned Gradle runs on a JDK its release supports — LiFT's 6.8.3 died on the image's JDK 21 one step after the wrapper fix (backlog 01a10c9f)”; “fix(dependencies/D12): the committed Gradle wrapper builds the project — the image's 9.5.1 cannot run a 6.8.3 build script, and D12 filed that as "cannot be measured for scala" (backlog 01a10c9f)”; “fix(engine/D12): a Scala build is never told to change language — org.scala-lang upgrades stay on the declared 2.x minor / 3.x line (backlog 01a10cd3-eb03)”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Core/Dependencies/GradleCurrencyCollector.cs`: 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: engine/src/Scanner/Security/Shared/Scanners/SemgrepPremiseRegistry.cs engine/src/Scanner/Security/Shared/Scanners/SemgrepPremiseRegistry.cs:64 — engine/src/Scanner/Security/Shared/Scanners/SemgrepPremiseRegistry.cs changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is SemgrepPremiseRegistry.Answering at line 64), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(D29): three Java premises the source refutes: the doctype feature set from a constant table, a socket that only connects, setSecure on something that is not a cookie”; “chore(engine): measure-2026.10.4 for the self-scan fairness fixes; D13's word-shaped exemption narrowed to lookup keys”; “fix(d29): refute REDACTED where the destination's authority is repo-authored”; “fix(D29): missing-authorization reads the handler that is mapped, the helpers it calls and the layout it renders in; two SQL rows that cannot inject”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/Security/Shared/Scanners/SemgrepPremiseRegistry.cs`: 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: src/Kennel.Infrastructure/Projections/ProjectionParityCheck.cs src/Kennel.Infrastructure/Projections/ProjectionParityCheck.cs:135 — src/Kennel.Infrastructure/Projections/ProjectionParityCheck.cs changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is ProjectionParityCheck.IsLockNotAvailable at line 135), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(post-promote): production rebuilds once with no parity, a locked table is retried not queued, a projection-only run waits for no scan”; “fix(ops): a projection rebuild gets 90 minutes, so the projections after it always fit inside T_REBUILD”; “fix(ops): a projection rebuild gets two hours, not Marten's five minutes, and rebuild all rebuilds every projection after one that fails”; “fix(projections): a slice store hands its documents back in key order; parity says what was appended during a check”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Infrastructure/Projections/ProjectionParityCheck.cs`: 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: engine/src/CodeHealth.Toolchain/Tools/ProcessToolRunner.cs engine/src/CodeHealth.Toolchain/Tools/ProcessToolRunner.cs:271 — engine/src/CodeHealth.Toolchain/Tools/ProcessToolRunner.cs changed 7 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 8 (its worst body is ProcessToolRunner.BuildStartInfo at line 271), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine/toolchain): every child's TMPDIR is its own, and a run whose tree vanished stops (backlog 01a10ac9-5d4c)”; “fix(toolchain): a bare `dotnet` resolves on the child's PATH, so a provisioned SDK is actually used (backlog 01a10446-eee4)”; “fix(toolchain): a child dotnet no longer inherits the analyzer's MSBuildLocator-registered MSBuild (backlog 01a103d8-baf8)”; “fix(engine/D30,D43): D30's expired budget no longer becomes D43's "scanner output unparseable" (backlog 01a0f966)”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/CodeHealth.Toolchain/Tools/ProcessToolRunner.cs`: 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: src/Kennel.Improve.Orchestrator/Adapters/ClaudeShellRunner.cs src/Kennel.Improve.Orchestrator/Adapters/ClaudeShellRunner.cs:20 — src/Kennel.Improve.Orchestrator/Adapters/ClaudeShellRunner.cs changed 5 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 6 (its worst body is ClaudeShellRunner.RunAsync at line 20), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(improve): a shell whose session died on an API error is stopped after a minute, not left waiting on its own background work”; “fix(improve): a shell the Claude API dropped is relaunched every 3 minutes, in its worktree, until it ends on its own terms”; “fix(improve): an API failure under a shell is the instrument, not a failed attempt of its package”; “fix(improve): an instrument mismatch is rescanned in the arm that lost the dimension before it breaks a gate”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Improve.Orchestrator/Adapters/ClaudeShellRunner.cs`: 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: src/Kennel.Improve.Orchestrator/Gates/GatePolicy.cs src/Kennel.Improve.Orchestrator/Gates/GatePolicy.cs:29 — src/Kennel.Improve.Orchestrator/Gates/GatePolicy.cs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is GatePolicy.Cell at line 29), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(improve): a dimension measured in one arm, reproduced by every rescan, is the engine's coverage change and is scored”; “fix(bench,improve): a move within tolerance is listed, so an unrelated dimension cannot get worse unseen”; “fix(improve): a side move that is a gain on every count is admitted, not rejected as "an unrelated dimension moved"”; “fix(improve): an instrument mismatch is rescanned in the arm that lost the dimension before it breaks a gate”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Improve.Orchestrator/Gates/GatePolicy.cs`: 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: src/Kennel.Improve.Orchestrator/Model/Package.cs src/Kennel.Improve.Orchestrator/Model/Package.cs:40 — src/Kennel.Improve.Orchestrator/Model/Package.cs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is Dimension.Overlap at line 40), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(improve): packages with an open false negative or positive go first; a daily scoreboard says whether the loop moves the needle”; “fix(improve): a backlog item is routed by the concept its filer stated; the list row carries it”; “fix(improve): the backlog feeds the improve loop again, after the PROGRESS rows”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Improve.Orchestrator/Model/Package.cs`: 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: src/Kennel.Core/Compliance/Ui/ComplianceDevDataSeeder.cs src/Kennel.Core/Compliance/Ui/ComplianceDevDataSeeder.cs:201 — src/Kennel.Core/Compliance/Ui/ComplianceDevDataSeeder.cs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is ComplianceDevDataSeeder.SeedProductComplianceAsync at line 201), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(a11y): main's a11y job is green again. The catch-all's deliberate 404 is audited, the karma page has a second period to link, and the dev seed carries a contract”; “fix(dev-seed): the compliance demo's repositories belong to Acme, not the personal org”; “fix(dev-seed): a sponsorship is one row per (repository, account) — RepositorySponsorship.Of, and the seeders honour it”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Core/Compliance/Ui/ComplianceDevDataSeeder.cs`: 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: src/Kennel.Watchdog.Core/Reporting/Application/ReportingFactsBackfill.cs src/Kennel.Watchdog.Core/Reporting/Application/ReportingFactsBackfill.cs:85 — src/Kennel.Watchdog.Core/Reporting/Application/ReportingFactsBackfill.cs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is ChangelogEntriesBackfill.WalkAsync at line 85), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ops): changelog-entries walks one repository at a time — the write process ran out of its 4 GB re-taking this census after writing 113,278 entries on the prod copy”; “fix(ops): changelog-entries writes the entries its stream never said, by id — counting facts refused 1,788 streams on the prod copy; post-promote prints each refusing step's own streams”; “fix(security): a webhook's secret path never reaches a fact or a document again; five notification-rule writers that saved without a fact now say it, and the personal-notifications backfill heals a short stream row by row”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Watchdog.Core/Reporting/Application/ReportingFactsBackfill.cs`: 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: engine/src/Scanner/Security/Shared/OsvScannerAnalyzer.RebarSbom.cs engine/src/Scanner/Security/Shared/OsvScannerAnalyzer.RebarSbom.cs:122 — engine/src/Scanner/Security/Shared/OsvScannerAnalyzer.RebarSbom.cs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is ScratchSboms.Attribute at line 122), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine/D30): a tracked-but-ignored lockfile's copy carries its osv-scanner.toml (backlog 01a10212)”; “fix(engine/D30): a lockfile git tracks but a .gitignore matches is read by the osv arm (backlog 01a10212)”; “fix(D30): osv-scanner 2.6.0 applies a pom's import-scoped BOMs — what else it changed is held to 2.0.2's reading (backlog 01a101df)”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/Security/Shared/OsvScannerAnalyzer.RebarSbom.cs`: 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: src/Kennel.Improve.Orchestrator/Gates/OneAtATimeOnTheBaseArm.cs src/Kennel.Improve.Orchestrator/Gates/OneAtATimeOnTheBaseArm.cs:18 — src/Kennel.Improve.Orchestrator/Gates/OneAtATimeOnTheBaseArm.cs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is OneAtATimeOnTheBaseArm.OnBase at line 18), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(improve): the per-shell gate runs the engine's hermetic guards; a stale census no longer costs the turn a bisect”; “fix(improve): a red pre-lock that does not reproduce is a flake, not a culprit; a registry outage is waited out”; “fix(improve): a dimension measured in one arm, reproduced by every rescan, is the engine's coverage change and is scored”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Improve.Orchestrator/Gates/OneAtATimeOnTheBaseArm.cs`: 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: src/Kennel.Watchdog.Core/Reporting/Rendering/PublicReportSanitizer.cs src/Kennel.Watchdog.Core/Reporting/Rendering/PublicReportSanitizer.cs:46 — src/Kennel.Watchdog.Core/Reporting/Rendering/PublicReportSanitizer.cs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is PublicReportSanitizer.Apply at line 46), 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: “report: the executive report's sections 1-10 in the wording agreed with the owner, and the fixes the review found”; “fix(public): the public report REMOVES every security finding from its bytes, not hides it by CSS (backlog 01a0f3b1)”; “fix(public): a corpus repository gone upstream says so on every public surface, and its survey stays published (backlog 01a0f83a)”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Watchdog.Core/Reporting/Rendering/PublicReportSanitizer.cs`: 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: engine/src/Core/ComplexityRoslyn/RoslynMethodComplexity.cs engine/src/Core/ComplexityRoslyn/RoslynMethodComplexity.cs:27 — engine/src/Core/ComplexityRoslyn/RoslynMethodComplexity.cs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is RoslynMethodComplexity.AddMethodsAsync at line 27), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine/D1): a guard prelude over one flat boolean table is a flat dispatcher — cognitive 9 of which 5 are the boolean runs no longer reads as tangled (backlog 01a11638-62ba)”; “fix(engine/D1,D2): a C# static local function is a named nested unit, like Rust's nested fn (QA dispute 01a103ab-c55a-70dd)”; “fix(engine/D15): a declaration with no body is not a body — an interface whose fix commits only widened the contract is not "under repeated repair" (closes dispute group 01a0fe09-71b2-7617)”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Core/ComplexityRoslyn/RoslynMethodComplexity.cs`: 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: engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Python.cs engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Python.cs:85 — engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Python.cs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is ForeignAsyncCorrectnessScan.PythonCallee at line 85), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(defects/X1): `import asyncio.subprocess` binds `asyncio`, as Python does”; “fix(defects/X1,X13): a Python import after a `;` or a one-line header's `:` is read, and an import ends at its `;`”; “fix(defects/X1,X14,X23,X24,X26,X30): a Python positional-only marker no longer hides what follows it; the shared step also reads a lambda's marker”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Python.cs`: 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: src/Kennel.Watchdog.Core/PublicGallery/Embed/PublicFindingsCarousel.razor src/Kennel.Watchdog.Core/PublicGallery/Embed/PublicFindingsCarousel.razor — src/Kennel.Watchdog.Core/PublicGallery/Embed/PublicFindingsCarousel.razor changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3, UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ui): the owner's preprod batch — Plan 500, full-width documents, a Repositories tab, and no link ends in an arrow”; “fix(ui/repo-ia): phone width, member visibility and a stale pixel layer — found hardening the repo IA after V19”; “fix(public-gallery/embed): the carousel and band-scale cards carry wd-card, so their name, chip, rows and score are laid out”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- src/Kennel.Watchdog.Core/PublicGallery/Embed/PublicFindingsCarousel.razor`: 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: engine/src/Core/Classification/TemplateProjectTrees.cs engine/src/Core/Classification/TemplateProjectTrees.cs:60 — engine/src/Core/Classification/TemplateProjectTrees.cs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is TemplateProjectTrees.ForRepo at line 60), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(classification): a project in a template tree that shipped code depends on is shipped in every ecosystem, and only a shipped consumer counts (backlog 01a17023-0258-7e84); measure-2026.10.29”; “fix(classification): a template directory holding only template projects is scaffolding as a whole, and the knowledge census leaves template trees out (backlog 01a17023); measure-2026.10.19”; “fix(classification): a scaffolding template is recognised by every ecosystem's project file, and D1/D2 ask it (backlog 01a16fca); measure-2026.10.18”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Core/Classification/TemplateProjectTrees.cs`: 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: engine/src/Core/Classification/NonProductionPaths.JvmSourceSets.cs engine/src/Core/Classification/NonProductionPaths.JvmSourceSets.cs:131 — engine/src/Core/Classification/NonProductionPaths.JvmSourceSets.cs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is NonProductionPaths.IsJvmResourceAsData at line 131), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(engine/X17): a JVM file's leading Spec/Test token no longer drops it as a test tree — only the basename's trailing token votes (backlog 01a11a03-363d-7f95-8c0b-6368a2e6c439)”; “fix(d9): a JVM src/main file is not a test suite the polyglot gate must name (backlog 01a10cb5-dcd5)”; “fix(classification/D1,D2,D3): a sample word below a JVM source root is a package name, not a sample tree — slick.examples.codegen is the product (backlog 01a10d0a-5aaf)”. 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-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 09:23:05 +01:00' --until='2026-10-28 09:23:05 +01:00' --full-history --no-merges -- engine/src/Core/Classification/NonProductionPaths.JvmSourceSets.cs`: 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×23
  • Swallowed exception (empty catch) engine/src/CodeHealth.Cli/Commands/RoslynLoadDiagnosis.cs:376 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:70 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/Scanner/Security/Shared/Scanners/DeclaredDependencies.cs:822 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/Scanner/Security/Shared/Scanners/DeclaredDependencies.cs:823 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/Core/Diagnostics/ScanBudgets.cs:567 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/Core/Diagnostics/ScanBudgets.cs:793 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/Core/Diagnostics/ScanBudgets.cs:999 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/Core/Diagnostics/ScanBudgets.cs:1199 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/Core/Frontend/FrontendWorkspaceWalk.cs:680 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Core/Billing/Services/PlanPickerService.cs:411 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Core/Repositories/Services/AddUploadService.cs:292 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs:1568 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs:2204 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs:2207 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Core/Scans/Sources/ZipSourceExtractor.cs:384 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Watchdog.Core/Calibration/Application/SarifPath.cs:33 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Assay.Core/AccessGrants/Pages/Access/AssayAccessReader.cs:110 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/AssayCodebaseReader.cs:113 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Assay.Core/DecisionReports/Pages/AssayProductReports/AssayProductReportsReader.cs:66 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Admin.Core/Admin/Services/AdminConsoleService.cs:156 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Admin.Core/Admin/Services/G2KappaSyncService.cs:59 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Admin.Core/Admin/Services/WorkerFleetDevSeeder.cs:196 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/Kennel.Infrastructure/EventStore/InMemoryDomainEventOutbox.cs:29 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D3 · God Classes · MethodTooLong · ×22
  • MethodTooLong: AnalyzeCommand.ExecuteCoreAsync engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs:298 — MethodTooLong — ExecuteCoreAsync runs 297 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 197 over it, 2.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BillingDbContext.OnModelCreating src/Kennel.Core/Billing/Persistence/BillingDbContext.cs:101 — MethodTooLong — OnModelCreating runs 293 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 193 over it, 2.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LanguageTrainingDbContext.OnModelCreating src/Kennel.Core/LanguageTraining/Persistence/LanguageTrainingDbContext.cs:92 — MethodTooLong — OnModelCreating runs 282 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 182 over it, 2.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AdminOperatorModule.ConfigureServices src/Kennel.Admin.Core/Admin/AdminOperatorModule.cs:86 — MethodTooLong — ConfigureServices runs 237 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 137 over it, 2.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AgentsDbContext.OnModelCreating src/Kennel.Watchdog.Core/Agents/Persistence/AgentsDbContext.cs:80 — MethodTooLong — OnModelCreating runs 198 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TurnRunner.RunTurnAsync src/Kennel.Improve.Orchestrator/Turns/TurnRunner.cs:196 — MethodTooLong — RunTurnAsync runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ReportViewModelFactory.Build engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:68 — MethodTooLong — Build runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TrainingConfigSeeder.DefaultPrompts src/Kennel.Core/LanguageTraining/Seed/TrainingConfigSeeder.cs:263 — MethodTooLong — DefaultPrompts runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: InfrastructureSecurityAnalyzer.RunAsync engine/src/Scanner/Security/D31/InfrastructureSecurityAnalyzer.cs:40 — MethodTooLong — RunAsync runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FrontendWorkspaceLoader.Load engine/src/Core/Frontend/FrontendWorkspaceLoader.cs:64 — MethodTooLong — Load runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ComplianceContractsBackfill.SurveyAsync src/Kennel.Core/Compliance/Application/ComplianceContractsBackfill.cs:75 — MethodTooLong — SurveyAsync runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ComplianceDbContext.OnModelCreating src/Kennel.Core/Compliance/Persistence/ComplianceDbContext.cs:58 — MethodTooLong — OnModelCreating runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: JvmCodeType.SetGraph engine/src/CodeHealth.CodeModel.Jvm/Model.cs:879 — MethodTooLong — SetGraph runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ProgrammeTrackedFacts.Collect src/Kennel.Core/LanguageTraining/Services/ProgrammeTrackedFacts.cs:72 — MethodTooLong — Collect runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CohesionAnalyzer.RunAsync engine/src/Scanner/Architecture/D6/CohesionAnalyzer.cs:31 — MethodTooLong — RunAsync runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ShellGate.JudgeAsync src/Kennel.Improve.Orchestrator/Gates/ShellGate.cs:99 — MethodTooLong — JudgeAsync runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TestReliabilityAnalyzer.ErlangOnlyAsync engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3997 — MethodTooLong — ErlangOnlyAsync runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HotspotAnalyzer.RunAsync engine/src/Scanner/GitMining/D15/HotspotAnalyzer.cs:37 — MethodTooLong — RunAsync runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DisclosurePolicyReading.Judge engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyReading.cs:50 — MethodTooLong — Judge runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LanguageTrainingService.RecordRoundReportAsync src/Kennel.Core/LanguageTraining/Services/LanguageTrainingService.cs:595 — MethodTooLong — RecordRoundReportAsync runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TrainingCensusBackfill.SurveyAsync src/Kennel.Core/LanguageTraining/Application/TrainingCensusBackfill.cs:34 — MethodTooLong — SurveyAsync runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Builder.ParseMarkdown engine/src/Scanner/Docs/D19/MarkupDocument.cs:206 — MethodTooLong — ParseMarkdown runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · ClassTooLong · ×22
  • ClassTooLong: ScoringSpecModel engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs — ClassTooLong — 1094 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 694 over it, 2.74× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: FindingTranslations src/Kennel.Assay.Core/DecisionReports/FindingTranslations.cs — ClassTooLong — 566 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 166 over it, 1.42× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: SolutionShapeAnalyzer engine/src/Scanner/BuildDependent/D18/SolutionShape/SolutionShapeAnalyzer.cs — ClassTooLong — 547 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 147 over it, 1.37× 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.
  • ClassTooLong: ProgrammeCycleService src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs — ClassTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 135 over it, 1.34× 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.
  • ClassTooLong: Emitter engine/sidecars/kotlin-frontend/src/main/kotlin/dev/canine/codehealth/kotlin/Emitter.kt:61 — ClassTooLong — 512 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 112 over it, 1.28× 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.
  • ClassTooLong: Emitter engine/sidecars/java-spoon/src/main/java/dev/canine/codehealth/java/Emitter.java:53 — ClassTooLong — 502 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 102 over it, 1.26× 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.
  • ClassTooLong: BacklogApi src/Kennel.Admin.Core/Admin/BacklogApi.cs — ClassTooLong — 496 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 96 over it, 1.24× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: CouplingAnalyzer engine/src/Scanner/Architecture/D5/CouplingAnalyzer.cs — ClassTooLong — 476 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 76 over it, 1.19× 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.
  • ClassTooLong: Extractor engine/sidecars/swift-frontend/Sources/codehealth-swift-sidecar/Extractor.swift:8 — ClassTooLong — 472 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 72 over it, 1.18× 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.
  • ClassTooLong: BacklogMcpTools src/Kennel.Admin.Core/Admin/Mcp/BacklogMcpTools.cs — ClassTooLong — 466 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 66 over it, 1.17× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: HotspotAnalyzer engine/src/Scanner/GitMining/D15/HotspotAnalyzer.cs — ClassTooLong — 460 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 60 over it, 1.15× 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.
  • ClassTooLong: ReportingModule src/Kennel.Watchdog.Core/Reporting/ReportingModule.cs — ClassTooLong — 456 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 56 over it, 1.14× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: AdminOperatorModule src/Kennel.Admin.Core/Admin/AdminOperatorModule.cs — ClassTooLong — 455 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 55 over it, 1.14× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: BodyVisitor engine/sidecars/rust-frontend/src/body.rs:177 — ClassTooLong — 442 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 3 blocks, lines 177-1263. The bar is 400 significant lines; this is 42 over it, 1.11× 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.
  • ClassTooLong: StripeBillingGateway src/Kennel.Core/Billing/Services/StripeBillingGateway.cs — ClassTooLong — 441 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 41 over it, 1.10× 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.
  • ClassTooLong: Main engine/sidecars/java-spoon/src/main/java/dev/canine/codehealth/java/Main.java:31 — ClassTooLong — 435 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 35 over it, 1.09× 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.
  • ClassTooLong: TeamEditorHandlers src/Kennel.Watchdog.Core/Teams/Pages/TeamEditor/Handlers/TeamEditorHandlers.cs — ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 30 over it, 1.08× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: DimensionConsequences src/Kennel.Assay.Core/Profiles/Documents/DimensionConsequences.cs — ClassTooLong — 423 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 23 over it, 1.06× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: ComplexityScoring engine/src/Scanner/Complexity/Complexity.Shared/ComplexityScoring.cs — ClassTooLong — 411 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 11 over it, 1.03× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: MaintainerQaService src/Kennel.Admin.Core/Admin/Services/MaintainerQaService.cs — ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 10 over it, 1.03× 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.
  • ClassTooLong: DegradedRunBacklogRegistrar src/Kennel.Core/Scans/Services/DegradedRunBacklogRegistrar.cs — ClassTooLong — 409 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 9 over it, 1.02× 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.
  • ClassTooLong: SelfMutatingLoopAnalyzer engine/src/Scanner/Defects/X27/SelfMutatingLoopAnalyzer.cs — ClassTooLong — 406 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 6 over it, 1.02× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
X2 · Cancellation propagation · Async method without CancellationToken · ×21
  • Async method without CancellationToken: ParseAsync engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:252 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: ConfirmReindentsAsync engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:493 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunLogAsync engine/src/CodeHealth.Toolchain/Git/GitLogHistoryExtractor.cs:121 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetBlameAsync engine/src/CodeHealth.Toolchain/Git/LibGit2GitAccessor.cs:95 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetLineCommitsAsync engine/src/CodeHealth.Toolchain/Git/LibGit2GitAccessor.cs:144 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunGitBlameAsync engine/src/CodeHealth.Toolchain/Git/LibGit2GitAccessor.cs:180 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: AttributedHotspotsAsync engine/src/Scanner/GitMining/D15/HotspotAnalyzer.cs:530 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: TouchedWorstAsync engine/src/Scanner/GitMining/D15/HotspotAnalyzer.cs:1280 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunDimensionsAsync engine/src/CodeHealth.Cli.Edition/Program.cs:240 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunMetaEmittersAsync engine/src/CodeHealth.Cli.Edition/Program.cs:287 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: WriteOutputsAsync engine/src/CodeHealth.Cli.Edition/Program.cs:330 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: OrganisesByBoundedContextAsync engine/src/Scanner/ArchitectureJudged/D23/BoundaryCouplingAnalyzer.cs:578 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: UnreadCardAsync engine/src/Scanner/LlmJudgedLanguage/LA1/GdprPersonalDataAnalyzer.cs:176 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: StillOrphanedAsync engine/src/Scanner/GitMining/D34/KnowledgeFreshnessAnalyzer.cs:522 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: WithoutTestsAsync engine/src/Scanner/Testing/D8/CoverageNotMeasured.cs:103 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: ForeignSuiteAsync engine/src/Scanner/Testing/D8/CoverageNotMeasured.cs:425 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: NoRunnableCSharpTestSurfaceAsync engine/src/Scanner/Testing/D8/CoverageNotMeasured.cs:1392 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: AnalyzeNeutralAsync engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs:215 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: ComputeAsync engine/src/Scanner/Defects/X7/NeutralSilentFallback.cs:444 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GatherNeutralAsync engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs:852 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: AdmittedNeutralTypesAsync engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs:894 — No CancellationToken parameter — this work can't be stopped early once started.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×20
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2944 — engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2944-2976 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3005-3037 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3063-3083 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3174-3206 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:4943 — engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:4943-4997 | engine/src/Scanner/LlmJudgedLanguage/LA4/DockerImages.cs:354-377 | engine/src/Scanner/Security/D31/Scanners/ComposeServiceSurface.cs:454-477 | engine/src/Scanner/Security/D31/Scanners/UnscopedBuildContextCopyScan.cs:293-320 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Markup/BuilderDslMarkupProducer.cs:882 — engine/src/Core/Markup/BuilderDslMarkupProducer.cs:882-897 | engine/src/Scanner/CodeShape/D4/CodeShape/DuplicationAnalyzer.cs:2647-2662 | engine/src/Scanner/Readiness/P7/ForeignHttpResilienceScan.cs:562-577 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:1732-1747 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs:169 — engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs:169-212 | engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs:752-767 | engine/src/Scanner/ModelAware/ModelAware.Prework/DomainModelScan.cs:133-237 | engine/src/Scanner/ModelAware/ModelAware.Prework/EventDrivenScan.cs:148-186 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs:31 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs:31-60 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinAuditTrail.cs:23-54 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.RustAuditTrail.cs:32-69 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ScalaAuditTrail.cs:46-84 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:323 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:323-341 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Python.cs:129-146 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Ruby.cs:257-279 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.cs:275-293 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:90 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:90-122 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:97-130 | engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Scala.cs:115-154 | engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.Ruby.cs:63-91 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:554 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:554-583 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:257-290 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:553-595 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:555-573 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:641 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:641-655 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Ruby.cs:585-603 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Ruby.cs:685-706 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs:962-975 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1514 — engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1514-1562 | engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1606-1632 | engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1660-1692 | engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1721-1750 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:223 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:223-243 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:178-199 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Scala.cs:226-246 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.cs:378-398 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs:984 — engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs:984-1028 | engine/src/Scanner/Accessibility/AC7/A11yEnforcementAnalyzer.cs:1110-1143 | engine/src/Scanner/Accessibility/Accessibility.Prework/RepoStylesheets.cs:199-244 | engine/src/Scanner/ModelAware/ModelAware.Prework/PerformanceScan.cs:613-645 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:691 — engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:691-731 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:787-825 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:846-885 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:1757-1787 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:115 — engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:115-155 | engine/src/Scanner/Security/D31/Scanners/GitOwnershipCheckDisabledScan.cs:86-131 | engine/src/Scanner/Security/D31/Scanners/SetuidBinaryGrantScan.cs:62-104 | engine/src/Scanner/Security/D31/Scanners/WorldWritableOwnedPathScan.cs:95-139 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Scanner/Accessibility/AC1/TextAlternativesAnalyzer.cs:17 — engine/src/Scanner/Accessibility/AC1/TextAlternativesAnalyzer.cs:17-53 | engine/src/Scanner/Accessibility/AC2/FormsAndLabelsAnalyzer.cs:17-51 | engine/src/Scanner/Accessibility/AC4/KeyboardSemanticsAnalyzer.cs:17-56 | engine/src/Scanner/Accessibility/AC5/AriaCorrectnessAnalyzer.cs:17-50 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Dependencies/CratesIoClient.cs:186 — engine/src/Core/Dependencies/CratesIoClient.cs:186-195 | engine/src/Core/Dependencies/HexRegistryClient.cs:128-137 | engine/src/Core/Dependencies/OsvAdvisoryClient.cs:145-152 | engine/src/Core/Dependencies/UnityRegistryClient.cs:128-135 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Dependencies/CratesIoClient.cs:334 — engine/src/Core/Dependencies/CratesIoClient.cs:334-377 | engine/src/Core/Dependencies/HexRegistryClient.cs:161-201 | engine/src/Core/Dependencies/OsvAdvisoryClient.cs:178-216 | engine/src/Core/Dependencies/UnityRegistryClient.cs:160-203 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/Core/Diagnostics/ScanBudgets.cs:520 — engine/src/Core/Diagnostics/ScanBudgets.cs:520-530 | engine/src/Core/Diagnostics/ScanBudgets.cs:665-675 | engine/src/Core/Diagnostics/ScanBudgets.cs:961-971 | engine/src/Core/Diagnostics/ScanBudgets.cs:1111-1121 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) tools/multilang/agg_combined3.py:192 — tools/multilang/agg_combined3.py:192-204 | tools/multilang/agg_combined4.py:225-237 | tools/multilang/agg_combined5.py:231-243 | tools/multilang/agg_combined6.py:242-254 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/sidecars/kotlin-frontend/selftest/k1-error-check.py:46 — engine/sidecars/kotlin-frontend/selftest/k1-error-check.py:46-83 | engine/sidecars/kotlin-frontend/selftest/modules-check.py:49-86 | engine/sidecars/kotlin-frontend/selftest/repeated-annotation-check.py:60-94 | engine/sidecars/scala-frontend/selftest/modules-check.py:70-82 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×17
  • Swallowed exception (caught, then discarded) engine/src/CodeHealth.Core/Scoring/RubricArchiveProbe.cs:111 — `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:579 — `catch (UnauthorizedAccessException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) engine/src/Core/Frontend/NxDependencyConstraints.cs:231 — `catch (UnauthorizedAccessException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) engine/src/Core/Languages/Ts/TsConfigJsChecking.cs:62 — `catch (IOException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) engine/src/Core/Languages/Ts/TsConfigJsChecking.cs:66 — `catch (UnauthorizedAccessException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Ui/LandingDiversion.cs:26 — `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Core/Repositories/Services/ProviderConnectService.cs:615 — `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Core/Scans/Execution/EngineScanExecutor.cs:2192 — `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Core/Scans/ReadModel/RunLlmCallWriter.cs:274 — `catch (JsonException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Watchdog.Core/Agents/Services/AgentVerdictService.cs:72 — `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Watchdog.Core/Reporting/Composition/RepoSprintPipelineReader.cs:67 — `catch (JsonException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/AssayCodebaseReader.cs:82 — `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/AssayCodebaseReader.cs:118 — `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Assay.Core/DecisionReports/Pages/AssayReports/AssayReportsReader.cs:126 — `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Assay.Core/DecisionReports/Pages/AssayReports/AssayReportsReader.cs:136 — `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Admin.Core/Admin/Health/HostProbes.cs:230 — `catch (Exception) when (…)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
  • Swallowed exception (caught, then discarded) src/Kennel.Admin.Core/Admin/Services/Preprod/PreprodDump.cs:91 — `catch (ArgumentException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
D10 · Test Quality · Races the wall clock · ×16
  • Races the wall clock: An_Expired_Username_Invite_Is_Not_Claimed tests/Kennel.Billing.Tests/OrgInvitationClaimHookTests.cs:103 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: The_buy_annual_entitlement_endpoint_is_reachable_and_records_the_entitlement tests/Kennel.DecisionReports.Tests/DecisionReportPagesTests.cs:176 — This test reads `DateTimeOffset.UtcNow` and compares it against the value the code under test computed from its own clock read, compared exactly in `entitlement.Year.ShouldBe(DateTimeOffset.UtcNow.Year)`. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: Lists_only_the_orgs_teams_ordered_by_name tests/Kennel.Reporting.Tests/OrgTeamDirectoryTests.cs:30 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: Membership_validation_accepts_the_orgs_own_team_and_refuses_foreign_or_unknown_ones tests/Kennel.Reporting.Tests/OrgTeamDirectoryTests.cs:61 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: Team_rosters_name_every_active_teams_members_and_repositories_in_one_read tests/Kennel.Reporting.Tests/OrgTeamDirectoryTests.cs:87 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: Repository_ids_for_a_team_are_its_memberships_only tests/Kennel.Reporting.Tests/OrgTeamDirectoryTests.cs:128 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: Assigning_through_the_port_repoints_a_repo_to_the_new_team tests/Kennel.Reporting.Tests/OrgTeamDirectoryTests.cs:156 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: A_member_may_act_only_in_their_own_teams tests/Kennel.Reporting.Tests/TeamMembershipTests.cs:52 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: A_newcomer_with_no_team_named_joins_the_oldest_active_team_and_no_other tests/Kennel.Reporting.Tests/TeamMembershipTests.cs:77 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: A_placement_by_invite_is_said_so_the_pages_that_fold_members_see_it tests/Kennel.Reporting.Tests/TeamMembershipTests.cs:110 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: A_member_of_no_team_may_act_nowhere tests/Kennel.Reporting.Tests/TeamMembershipTests.cs:138 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: An_admin_is_automatically_in_every_team_without_any_membership_rows tests/Kennel.Reporting.Tests/TeamMembershipTests.cs:152 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: A_dead_owners_reservation_holds_until_R1_requeues_the_claim_and_then_leaves_with_it tests/Kennel.Scheduling.Tests/BoxLedgerPostgresTests.cs:181 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: Two_dispatchers_racing_over_one_queue_never_claim_a_repository_twice tests/Kennel.Scheduling.Tests/TwoWorkersPostgresTests.cs:40 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: The_database_refuses_a_second_live_claim_on_a_repository_even_past_the_guard tests/Kennel.Scheduling.Tests/TwoWorkersPostgresTests.cs:108 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
  • Races the wall clock: After_a_database_outage_B_is_blind_and_recovers_nothing_until_connected_for_a_full_ttl tests/Kennel.Scheduling.Tests/TwoWorkersPostgresTests.cs:191 — This test reads `DateTimeOffset.UtcNow` and compares it against the real system clock (`TimeProvider.System`) handed to the code under test. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×16
  • Duplicated block (16 lines × 2) engine/src/Scanner/Accessibility/Accessibility.Prework/MainLandmarks.cs:143 — engine/src/Scanner/Accessibility/Accessibility.Prework/MainLandmarks.cs:143-158 | engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:5595-5610 — 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 `engine/src/Scanner/Accessibility/Accessibility.Prework/MainLandmarks.cs:143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2413 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2413-2428 | engine/src/Scanner/Testing/D8/CoverageNotMeasured.cs:1361-1376 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:94 — engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:94-109 | engine/src/Scanner/Defects/X30/ForeignInvertedSupportGuardScan.cs:82-97 — 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.
  • Duplicated block (16 lines × 2) engine/src/Scanner/Defects/X2/CancellationPropagationAnalyzer.cs:40 — engine/src/Scanner/Defects/X2/CancellationPropagationAnalyzer.cs:40-55 | engine/src/Scanner/Defects/X3/ExceptionHandlingAnalyzer.cs:30-45 — 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 `engine/src/Scanner/Defects/X2/CancellationPropagationAnalyzer.cs:40` 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 (16 lines × 2) engine/src/CodeHealth.Toolchain/Git/GitTrackedPaths.cs:31 — engine/src/CodeHealth.Toolchain/Git/GitTrackedPaths.cs:31-46 | engine/src/CodeHealth.Toolchain/Git/GitTrackedPaths.cs:59-74 — 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 `engine/src/CodeHealth.Toolchain/Git/GitTrackedPaths.cs:31` 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 (16 lines × 2) engine/src/CodeHealth.Llm.ClaudeCli/ClaudeCliLlmProvider.cs:91 — engine/src/CodeHealth.Llm.ClaudeCli/ClaudeCliLlmProvider.cs:91-106 | engine/src/CodeHealth.Llm.CopilotCli/CopilotCliLlmProvider.cs:104-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) engine/src/Core/CodeShape/RoslynDuplicationDetector.cs:3335 — engine/src/Core/CodeShape/RoslynDuplicationDetector.cs:3335-3350 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:6072-6087 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) engine/src/Scanner/LlmJudgedLanguage/LA5/LinkTextQualityAnalyzer.cs:68 — engine/src/Scanner/LlmJudgedLanguage/LA5/LinkTextQualityAnalyzer.cs:68-83 | engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:64-79 — 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 `engine/src/Scanner/LlmJudgedLanguage/LA5/LinkTextQualityAnalyzer.cs:68` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:710 — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:710-725 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:589-604 — 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 `engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:710` 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 (16 lines × 2) engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Ruby.cs:407 — engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Ruby.cs:407-422 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Swift.cs:621-636 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Ruby.cs:407` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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 (16 lines × 2) engine/src/Core/Dependencies/OsvAdvisoryClient.cs:253 — engine/src/Core/Dependencies/OsvAdvisoryClient.cs:253-268 | engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:2146-2161 — 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 `engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:2146` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:800 — engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:800-815 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Scala.cs:720-735 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Rust.cs:206 — engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Rust.cs:206-221 | engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Scala.cs:211-227 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) engine/src/CodeHealth.Toolchain/Git/GitTrackedPaths.cs:31 — engine/src/CodeHealth.Toolchain/Git/GitTrackedPaths.cs:31-46 | engine/src/CodeHealth.Toolchain/Git/GitTrackedPaths.cs:59-74 — 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 `engine/src/CodeHealth.Toolchain/Git/GitTrackedPaths.cs:31` 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 (16 lines × 2) engine/src/Core/Languages/CSharp/CSharpCloneTokenizer.cs:59 — engine/src/Core/Languages/CSharp/CSharpCloneTokenizer.cs:59-74 | engine/src/Core/Languages/Vb/Clones/VbCloneTokenizer.cs:53-68 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/Core/Languages/CSharp/CSharpCloneTokenizer.cs:79` calls `Append` and `engine/src/Core/Languages/Vb/Clones/VbCloneTokenizer.cs:71` 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 (16 lines × 2) engine/src/Core/Roslyn/CodeModel/RoslynMethodBody.cs:143 — engine/src/Core/Roslyn/CodeModel/RoslynMethodBody.cs:143-158 | engine/src/Core/Roslyn/CodeModel/RoslynVbMethodBody.cs:129-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Roslyn/CodeModel/RoslynMethodBody.cs:143` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×16
  • Duplicated block (15 lines × 2) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs:234 — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs:234-248 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Scala.cs:366-380 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs:234` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) engine/src/Core/Security/NativeSecretScanner.cs:3115 — engine/src/Core/Security/NativeSecretScanner.cs:3115-3129 | engine/src/Scanner/Security/D28/Scanners/ConfigCredentialBindingScan.cs:555-569 — 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 `engine/src/Core/Security/NativeSecretScanner.cs:3115` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (15 lines × 2) engine/src/Core/Dependencies/CargoVersion.cs:73 — engine/src/Core/Dependencies/CargoVersion.cs:73-87 | engine/src/Core/Dependencies/PubVersion.cs:65-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Dependencies/CargoVersion.cs:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) engine/src/CodeHealth.Reporting/Findings/FindingsSummaryBuilder.cs:186 — engine/src/CodeHealth.Reporting/Findings/FindingsSummaryBuilder.cs:186-200 | engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:2091-2105 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) engine/src/CodeHealth.Reporting/Security/SecurityWatchRenderer.cs:130 — engine/src/CodeHealth.Reporting/Security/SecurityWatchRenderer.cs:130-144 | engine/src/CodeHealth.Reporting/Security/SecurityWatchRenderer.cs:162-176 — 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 `engine/src/CodeHealth.Reporting/Security/SecurityWatchRenderer.cs:130` 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 `current` to `RunSidecar` in one and `IReadOnlyList<string> Cleared) NewAndClearedLabels(RunSidecar` 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.
  • Duplicated block (15 lines × 2) engine/src/Core/Adr/AdrStatus.cs:104 — engine/src/Core/Adr/AdrStatus.cs:104-118 | engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:1283-1297 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Scala.cs:391 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Scala.cs:391-405 | engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:991-1005 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:445 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:445-459 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:370-384 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Ruby.cs:440 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Ruby.cs:440-454 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Ruby.cs:426-440 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) engine/src/Core/Api/SetuptoolsDistribution.cs:167 — engine/src/Core/Api/SetuptoolsDistribution.cs:167-181 | engine/src/Core/Markup/IndentedMarkupProducer.cs:790-804 — 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 `engine/src/Core/Api/SetuptoolsDistribution.cs:167` 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 (15 lines × 2) engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs:6175 — engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs:6175-6189 | engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs:6224-6238 — 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 `engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs:6175` 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 (15 lines × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:321 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:321-335 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:302-316 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:321` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `imports` to `KotlinImports` in one and `ScalaImports` 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.
  • Duplicated block (15 lines × 2) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:684 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:684-698 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs:1017-1031 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) engine/src/Scanner/Security/D31/Scanners/EndOfLifeBaseImageScan.cs:185 — engine/src/Scanner/Security/D31/Scanners/EndOfLifeBaseImageScan.cs:185-199 | engine/src/Scanner/Security/D31/Scanners/MutableBaseImageScan.cs:110-125 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/D31/Scanners/EndOfLifeBaseImageScan.cs:185` 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, `engine/src/Scanner/Security/D31/Scanners/MutableBaseImageScan.cs:110` calls `IsVendorReadableDockerfileName` and `engine/src/Scanner/Security/D31/Scanners/EndOfLifeBaseImageScan.cs:185` does not — after which the two agree again for 5 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 (15 lines × 2) engine/src/Core/Architecture/Topology/Extractors/BicepExtractor.cs:155 — engine/src/Core/Architecture/Topology/Extractors/BicepExtractor.cs:155-169 | engine/src/Core/Architecture/Topology/Extractors/TerraformExtractor.cs:159-173 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Architecture/Topology/Extractors/BicepExtractor.cs:155` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) engine/src/Core/Markup/BuilderDslMarkupProducer.cs:905 — engine/src/Core/Markup/BuilderDslMarkupProducer.cs:905-919 | engine/src/Core/Markup/IndentedMarkupProducer.cs:97-111 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Markup/BuilderDslMarkupProducer.cs:905` 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 · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×15
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:665 — engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:665-671 | engine/src/CodeHealth.Toolchain/Git/GitLogHistoryExtractor.cs:374-387 | engine/src/CodeHealth.Toolchain/Git/LibGit2GitAccessor.cs:373-379 | engine/src/Scanner/Security/D28/Scanners/PrivateKeyBlobHistoryScan.cs:560-566 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:2502-2508 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/CodeHealth.Toolchain/MsBuild/CentralPackageManagement.cs:86 — engine/src/CodeHealth.Toolchain/MsBuild/CentralPackageManagement.cs:86-123 | engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:430-476 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.RazorScript.cs:270-334 | engine/src/Scanner/Security/D29/Scanners/EngineRuleWalk.cs:35-112 | engine/src/Scanner/Security/Shared/Scanners/CheckoutWalk.cs:32-114 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Dart.cs:99 — engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Dart.cs:99-135 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Java.cs:496-526 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScript.cs:149-181 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Ruby.cs:107-145 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Scala.cs:105-156 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs:214 — engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs:214-252 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.FSharp.cs:89-118 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Go.cs:203-227 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Scala.cs:179-211 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.cs:723-757 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:24 — engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:24-90 | engine/src/Scanner/Defects/X15/UntrustedLengthAnalyzer.cs:22-59 | engine/src/Scanner/Defects/X16/ShrinkLoopAnalyzer.cs:24-84 | engine/src/Scanner/Defects/X19/ScopedGlobalMutationAnalyzer.cs:24-84 | engine/src/Scanner/Defects/X30/InvertedSupportGuardAnalyzer.cs:24-81 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X1/AsyncCorrectnessAnalyzer.cs:29 — engine/src/Scanner/Defects/X1/AsyncCorrectnessAnalyzer.cs:29-77 | engine/src/Scanner/Defects/X13/UndrainedStreamAnalyzer.cs:24-74 | engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:24-88 | engine/src/Scanner/Defects/X25/InertKnobAnalyzer.cs:24-90 | engine/src/Scanner/Defects/X28/UncoveredIndexGuardAnalyzer.cs:25-89 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:133 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:133-184 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:41-93 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:120-172 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Ruby.cs:81-132 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:46-97 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Dart.cs:183 — engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Dart.cs:183-193 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Go.cs:445-455 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Kotlin.cs:135-145 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Scala.cs:404-414 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Swift.cs:267-277 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:54 — engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:54-116 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:122-134 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:144-156 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:186-200 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:206-219 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:349 — engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:349-400 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:409-490 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:497-535 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:545-587 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:598-635 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2085 — engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2085-2130 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2162-2213 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2335-2384 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2576-2629 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2705-2717 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs:337 — engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs:337-359 | engine/src/Scanner/Security/D31/Scanners/MutableGitCloneScan.cs:140-162 | engine/src/Scanner/Security/Shared/Scanners/UnverifiedRemoteInstallerScan.cs:879-912 | engine/src/Scanner/Security/Shared/Scanners/UnverifiedRemoteInstallerScan.cs:1339-1380 | engine/src/Scanner/Security/Shared/Scanners/UnverifiedRemoteInstallerScan.cs:1385-1407 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) tools/multilang/agg_combined.py:35 — tools/multilang/agg_combined.py:35-45 | tools/multilang/agg_combined3.py:47-55 | tools/multilang/agg_combined4.py:57-65 | tools/multilang/agg_combined5.py:61-69 | tools/multilang/agg_combined6.py:70-78 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) tools/multilang/agg_combined.py:117 — tools/multilang/agg_combined.py:117-120 | tools/multilang/agg_combined3.py:93-106 | tools/multilang/agg_combined4.py:112-126 | tools/multilang/agg_combined5.py:118-132 | tools/multilang/agg_combined6.py:129-143 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) tools/train/dimension-routing.py:140 — tools/train/dimension-routing.py:140-146 | tools/train/judge-calibration.py:590-596 | tools/train/run-arms.py:34-41 | tools/train/seeded_draw.py:26-34 | tools/train/sidecarlib.py:163-170 — 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 (5 lines × 3) · ×15
  • Duplicated block (5 lines × 3) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:169 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:169-173 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:78-82 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:83-87 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:169` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 3) engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Dart.cs:78 — engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Dart.cs:78-82 | engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.FSharp.cs:56-60 | engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Scala.cs:90-94 — 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 all 3 call sites, so a change lands once.
  • Duplicated block (5 lines × 3) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Php.cs:59 — engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Php.cs:59-63 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Php.cs:143-147 | engine/src/Scanner/Defects/X30/ForeignInvertedSupportGuardScan.Php.cs:57-61 — 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 `engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Php.cs:59` 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 (5 lines × 3) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Java.cs:66 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Java.cs:66-70 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:46-50 | engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Java.cs:49-53 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 3) engine/src/CodeHealth.Reporting/Changelog/ChangelogRenderer.cs:232 — engine/src/CodeHealth.Reporting/Changelog/ChangelogRenderer.cs:232-236 | engine/src/CodeHealth.Reporting/Changelog/ChangelogRenderer.cs:330-334 | engine/src/CodeHealth.Reporting/Security/SecurityWatchRenderer.cs:197-201 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/CodeHealth.Reporting/Changelog/ChangelogRenderer.cs:232` 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 (5 lines × 3) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:556 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:556-560 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:259-263 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:556-560 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:556` 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 (5 lines × 3) engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:123 — engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:123-127 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:145-149 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:208-212 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:375 — engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:375-379 | engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:435-439 | engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:498-502 — 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 `engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:375` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 3) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:659 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:659-663 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Rust.cs:752-756 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Scala.cs:609-613 — 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 all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 3) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:275 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:275-279 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:203-207 | engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.cs:204-208 — 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.
  • Duplicated block (5 lines × 3) engine/src/Core/Dependencies/HexRegistryClient.cs:72 — engine/src/Core/Dependencies/HexRegistryClient.cs:72-76 | engine/src/Core/Dependencies/PubClient.cs:57-61 | engine/src/Core/Dependencies/UnityRegistryClient.cs:73-77 — 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 all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 3) engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:666 — engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:666-670 | engine/src/CodeHealth.Toolchain/Git/GitLogHistoryExtractor.cs:382-386 | engine/src/CodeHealth.Toolchain/Git/LibGit2GitAccessor.cs:374-378 — 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 all 3 call sites, so a change lands once. 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 (5 lines × 3) tools/multilang/agg_combined4.py:199 — tools/multilang/agg_combined4.py:199-203 | tools/multilang/agg_combined5.py:205-209 | tools/multilang/agg_combined6.py:216-220 — before extracting anything, compare `tools/multilang/agg_combined4.py` and `tools/multilang/agg_combined5.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 110 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.
  • Duplicated block (5 lines × 3) tools/multilang/agg_holdout4.py:161 — tools/multilang/agg_holdout4.py:161-165 | tools/multilang/agg_holdout5.py:188-192 | tools/multilang/agg_holdout6.py:246-250 — before extracting anything, compare `tools/multilang/agg_holdout4.py` and `tools/multilang/agg_holdout5.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 34 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 × 3) tools/train/evidence-ab.py:76 — tools/train/evidence-ab.py:76-80 | tools/train/fallback-judge.py:82-86 | tools/train/gold-consistency.py:53-57 — 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 all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×12
  • Duplicated block (14 lines × 2) engine/src/Scanner/Security/Shared/Scanners/SecretNoiseFilter.cs:1346 — engine/src/Scanner/Security/Shared/Scanners/SecretNoiseFilter.cs:1346-1359 | engine/src/Scanner/Security/Shared/Scanners/SecretNoiseFilter.cs:1381-1394 — 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 `engine/src/Scanner/Security/Shared/Scanners/SecretNoiseFilter.cs:1346` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (14 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinAuditTrail.cs:28 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinAuditTrail.cs:28-41 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ScalaAuditTrail.cs:53-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinAuditTrail.cs:28` 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) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:127 — engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:127-140 | engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Scala.cs:127-140 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:127` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (14 lines × 2) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1535 — engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1535-1548 | engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1625-1638 — 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 `engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1535` 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 (14 lines × 2) engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:793 — engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:793-806 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:852-865 — 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 `engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:793` 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) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:1006 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:1006-1019 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Scala.cs:1024-1037 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:450 — engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:450-463 | engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:553-566 — 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 `engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:450` 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) engine/src/CodeHealth.Core/Scoring/CaiScoring.cs:113 — engine/src/CodeHealth.Core/Scoring/CaiScoring.cs:113-126 | engine/src/CodeHealth.Reporting/Scorecard/ScorecardJsonRenderer.cs:30-43 — 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.
  • Duplicated block (14 lines × 2) engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:2665 — engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:2665-2678 | engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:2890-2903 — 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 `engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:2665` 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) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:98 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:98-111 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:771-784 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:98` 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) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Dart.cs:197 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Dart.cs:197-210 | engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:960-973 — 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 `engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Dart.cs:197` 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 (14 lines × 2) tools/multilang/dimension-coverage.py:593 — tools/multilang/dimension-coverage.py:593-606 | tools/multilang/dimension-coverage.py:636-649 — 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) · ×11
  • Duplicated block (13 lines × 2) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1080 — engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1080-1092 | engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1662-1674 — 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 `engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1080` 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 (13 lines × 2) engine/src/Scanner/ArchitectureModel/AX1/GetItRegistrations.cs:133 — engine/src/Scanner/ArchitectureModel/AX1/GetItRegistrations.cs:133-145 | engine/src/Scanner/ArchitectureModel/AX1/GetXRegistrations.cs:99-111 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) engine/src/Scanner/ArchitectureModel/AX7/SliceCohesionAnalyzer.cs:212 — engine/src/Scanner/ArchitectureModel/AX7/SliceCohesionAnalyzer.cs:212-224 | engine/src/Scanner/ArchitectureModel/AX7/SliceCohesionAnalyzer.cs:558-570 — 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 `engine/src/Scanner/ArchitectureModel/AX7/SliceCohesionAnalyzer.cs:212` 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 (13 lines × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:540 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:540-552 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:728-740 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) engine/src/Scanner/Security/D31/Scanners/MutableGitCloneScan.cs:92 — engine/src/Scanner/Security/D31/Scanners/MutableGitCloneScan.cs:92-104 | engine/src/Scanner/Security/D31/Scanners/NoOpToolShimScan.cs:109-121 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) engine/src/Core/Markup/BuilderDslMarkupProducer.cs:944 — engine/src/Core/Markup/BuilderDslMarkupProducer.cs:944-956 | engine/src/Core/Markup/IndentedMarkupProducer.cs:115-127 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:1164 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:1164-1176 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Scala.cs:1061-1073 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:1164` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `param` to `KotlinParameter` in one and `ScalaParameter` 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.
  • Duplicated block (13 lines × 2) engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:170 — engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:170-183 | engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:637-649 — 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 `engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:170` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:635` calls `WritableStateFinding` and `engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:168` 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 (13 lines × 2) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/BootedAppRenderer.cs:147 — engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/BootedAppRenderer.cs:147-159 | engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/BootedAppRenderer.cs:263-277 — 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 `engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/BootedAppRenderer.cs:147` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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 (13 lines × 2) engine/src/Core/ModelAware/NeutralScatteredDerivation.cs:163 — engine/src/Core/ModelAware/NeutralScatteredDerivation.cs:163-175 | engine/src/Scanner/ModelAware/DM9/NeutralScatteredDecision.cs:86-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) engine/src/Core/Languages/CSharp/CSharpCloneTokenizer.cs:571 — engine/src/Core/Languages/CSharp/CSharpCloneTokenizer.cs:571-583 | engine/src/Core/Languages/Vb/Clones/VbCloneTokenizer.cs:246-258 — 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.
AX2 · Stateful singletons · Stateful singleton · ×8
  • Stateful singleton: LlmCacheLocation engine/src/CodeHealth.Llm.Abstractions/Caching/LlmCacheLocation.cs:24 — `LlmCacheLocation` is a singleton (one shared instance) but mutates instance state outside any lock (_directory, IsOverridden; e.g. `_directory` at line 49).
  • Stateful singleton: CopilotCliRunner engine/src/CodeHealth.Llm.CopilotCli/Process/CopilotCliRunner.cs:9 — `CopilotCliRunner` is a singleton (one shared instance) but mutates instance state outside any lock (_available; e.g. `_available` at line 51).
  • Stateful singleton: NodeDependencyInstaller engine/src/Core/Testing/NodeDependencyInstaller.cs:25 — `NodeDependencyInstaller` is a singleton (one shared instance) but mutates instance state outside any lock (_environment; e.g. `_environment` at line 61).
  • Stateful singleton: LeaderGatedHostedService src/Kennel.Hosting/LeaderGatedHostedService.cs:38 — `LeaderGatedHostedService` is a singleton (one shared instance) but mutates instance state outside any lock (Runs; e.g. `Runs` at line 153).
  • Stateful singleton: InstanceHeartbeatHostedService src/Kennel.Core/Runtime/InstanceHeartbeatHostedService.cs:28 — `InstanceHeartbeatHostedService` is a singleton (one shared instance) but mutates instance state outside any lock (_drainWrite; e.g. `_drainWrite` at line 166).
  • Stateful singleton: DispatcherHostedService src/Kennel.Watchdog.Core/Scheduling/Services/SchedulingHostedServices.cs:70 — `DispatcherHostedService` is a singleton (one shared instance) but mutates instance state outside any lock (_cooldown; e.g. `_cooldown` at line 113).
  • Stateful singleton: DeployHealthRecorder src/Kennel.Admin.Core/Admin/Services/DeployHealthRecorder.cs:248 — `DeployHealthRecorder` is a singleton (one shared instance) but mutates instance state outside any lock (_healthTail; e.g. `_healthTail` at line 365).
  • Stateful singleton: EntraSecretRotationService src/Kennel.Admin.Core/Admin/Services/EntraSecretRotationService.cs:31 — `EntraSecretRotationService` is a singleton (one shared instance) but mutates instance state outside any lock (_lastNotifiedOn; e.g. `_lastNotifiedOn` at line 181).
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×8
  • Duplicated block (19 lines × 2) engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2945 — engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2945-2963 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3175-3193 — 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 `engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2945` 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 (19 lines × 2) engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:87 — engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:87-105 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.RazorScript.cs:341-359 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.cs:1637 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.cs:1637-1655 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs:856-874 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) engine/src/Scanner/Security/D31/Scanners/DuplicateResourceCopyAggregator.cs:273 — engine/src/Scanner/Security/D31/Scanners/DuplicateResourceCopyAggregator.cs:273-291 | engine/src/Scanner/Security/D31/Scanners/NamespaceScopedRuleAggregator.cs:312-330 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) engine/src/Core/CodeShape/MemberFamilyRollup.cs:482 — engine/src/Core/CodeShape/MemberFamilyRollup.cs:482-500 | engine/src/Core/CodeShape/MemberPairRollup.cs:159-177 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:100 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:100-118 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Java.cs:162-180 — 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 `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:100` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (19 lines × 2) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:530 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:530-548 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs:620-638 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:530` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (19 lines × 2) engine/src/Core/Dependencies/NpmManifestHygiene.cs:577 — engine/src/Core/Dependencies/NpmManifestHygiene.cs:577-595 | engine/src/Core/Dependencies/NpmManifestHygiene.cs:656-674 — 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 `engine/src/Core/Dependencies/NpmManifestHygiene.cs:577` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×8
  • Duplicated block (17 lines × 2) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:377 — engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:377-393 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Scala.cs:335-351 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:377` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (17 lines × 2) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:166 — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:166-182 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:221-237 — 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 `engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (17 lines × 2) engine/src/Scanner/Security/D29/Scanners/EngineRuleWalk.cs:47 — engine/src/Scanner/Security/D29/Scanners/EngineRuleWalk.cs:47-63 | engine/src/Scanner/Security/Shared/Scanners/CheckoutWalk.cs:45-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/D29/Scanners/EngineRuleWalk.cs:47` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/Scanner/Security/Shared/Scanners/CheckoutWalk.cs:63` calls `Sort` and `engine/src/Scanner/Security/D29/Scanners/EngineRuleWalk.cs:65` 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 (17 lines × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:923 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:923-939 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:761-777 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:923` 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 `uses` to `KotlinFieldUses` in one and `ScalaFieldUses` 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.
  • Duplicated block (17 lines × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.cs:1175 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.cs:1175-1191 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs:758-774 — 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 `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs:758` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (17 lines × 2) engine/src/Scanner/Defects/X20/ForeignArgumentGuardScan.FSharp.cs:358 — engine/src/Scanner/Defects/X20/ForeignArgumentGuardScan.FSharp.cs:358-374 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Census.cs:127-143 — 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 `engine/src/Scanner/Defects/X20/ForeignArgumentGuardScan.FSharp.cs:358` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:227 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:227-243 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Scala.cs:230-246 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:227` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (17 lines × 2) engine/sidecars/rust-frontend/selftest/fixture/src/dup_pair.rs:14 — engine/sidecars/rust-frontend/selftest/fixture/src/dup_pair.rs:14-30 | engine/sidecars/rust-frontend/selftest/fixture/src/dup_pair.rs:33-49 — 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 × 3) · ×8
  • Duplicated block (6 lines × 3) engine/src/CodeHealth.Reporting/Changelog/ChangelogNarrator.cs:2337 — engine/src/CodeHealth.Reporting/Changelog/ChangelogNarrator.cs:2337-2342 | engine/src/CodeHealth.Reporting/Changelog/Folds/FoldNarrator.cs:203-208 | engine/src/CodeHealth.Reporting/Prose/LlmReportProseGenerator.cs:153-158 — 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 `engine/src/CodeHealth.Reporting/Changelog/ChangelogNarrator.cs:2337` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs:382 — engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs:382-387 | engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs:406-411 | engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs:430-435 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:61 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:61-66 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Rust.cs:82-87 | engine/src/Scanner/Defects/X30/ForeignInvertedSupportGuardScan.Rust.cs:74-79 — 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 `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:61` 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 (6 lines × 3) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:89 — engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:89-94 | engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Php.cs:60-65 | engine/src/Scanner/Defects/X30/ForeignInvertedSupportGuardScan.Php.cs:58-63 — 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 `engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:94 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:94-99 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Java.cs:84-89 | engine/src/Scanner/Defects/X30/ForeignInvertedSupportGuardScan.Java.cs:42-47 — 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 `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:156 — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:156-161 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:211-216 | engine/src/Scanner/Defects/X30/ForeignInvertedSupportGuardScan.Kotlin.cs:53-58 — 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 `engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:156` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Scanner/Defects/X30/ForeignInvertedSupportGuardScan.Kotlin.cs:52` calls `KotlinNumberSuffix`, `Replace` and `engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:210` 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 (6 lines × 3) tools/train/report_detection_delta.py:147 — tools/train/report_detection_delta.py:147-152 | tools/train/report_round.py:96-101 | tools/train/report_verification.py:59-64 — 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 all 3 call sites, so a change lands once.
  • Duplicated block (6 lines × 3) tools/multilang/agg_combined3.py:38 — tools/multilang/agg_combined3.py:38-43 | tools/multilang/agg_combined4.py:48-53 | tools/multilang/agg_combined5.py:52-57 — before extracting anything, compare `tools/multilang/agg_combined3.py` and `tools/multilang/agg_combined4.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 66 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.
ES3 · PII in the event store · PII in event · ×8
  • PII in event: CustomerContactSaved src/Kennel.Core/AccessGrants/Domain/Events/CustomerContactEvents.cs:24 — Persisted event carries personal data (Email: email, name token "email" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure.
  • PII in event: UserProvisioned src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:14 — Persisted event carries personal data (Email: email, name token "email" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure.
  • PII in event: UserProfileChanged src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:19 — Persisted event carries personal data (Email: email, name token "email" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure.
  • PII in event: OrgInvitationIssued src/Kennel.Core/Billing/Domain/Events/OrganizationSliceFacts.cs:12 — Persisted event carries personal data (Email: email, name token "email" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure.
  • PII in event: PartnerRegistered src/Kennel.Core/Billing/Domain/Events/PartnerFacts.cs:16 — Persisted event carries personal data (ContactEmail: email, name token "email" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure.
  • PII in event: PartnerInvited src/Kennel.Core/Billing/Domain/Events/PartnerFacts.cs:41 — Persisted event carries personal data (Email: email, name token "email" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure.
  • PII in event: PartnerDetailsSet src/Kennel.Core/Billing/Domain/Events/PartnerFacts.cs:45 — Persisted event carries personal data (ContactEmail: email, name token "email" (en), TaxId: gov-id, name token "taxid" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure.
  • PII in event: StaffMemberRegistered src/Kennel.Admin.Core/Admin/Domain/Events/AdminOpsFacts.cs:37 — Persisted event carries personal data (Email: email, name token "email" (en), FullName: name, name token "fullname" (en), corroborated by `Email` on the same type, Phone: phone, name token "phone" (en)) — no crypto-shredding strategy covers it, so it collides with the GDPR right-to-erasure.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×7
  • Duplicated block (10 lines × 3) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:333 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:333-342 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Rust.cs:431-440 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Scala.cs:248-257 — 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 all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `src` to `ElixirSource` in one and `RustSource` 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.
  • Duplicated block (10 lines × 3) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:56 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:56-65 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Ruby.cs:96-105 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:61-70 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:56` 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 (10 lines × 3) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:150 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:150-159 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Dart.cs:150-159 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs:297-306 — 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 `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:150` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `s` to `StringBuilder` in one and `string` 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.
  • Duplicated block (10 lines × 3) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:488 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:488-497 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:606-615 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:700-709 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:488` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `t` to `HashSet<string> Paths) KotlinTypedNames(IReadOnlyList<JsToken>` in one and `IReadOnlyList<JsToken>` 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.
  • Duplicated block (10 lines × 3) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:633 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:633-642 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Ruby.cs:563-572 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Rust.cs:726-735 — 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 all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 3) tools/multilang/agg_combined4.py:182 — tools/multilang/agg_combined4.py:182-191 | tools/multilang/agg_combined5.py:188-197 | tools/multilang/agg_combined6.py:199-208 — before extracting anything, compare `tools/multilang/agg_combined4.py` and `tools/multilang/agg_combined5.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 110 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.
  • Duplicated block (10 lines × 3) engine/sidecars/go/discover.go:48 — engine/sidecars/go/discover.go:48-59 | engine/sidecars/go/discover.go:300-309 | engine/sidecars/go/discover.go:329-338 — 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 `engine/sidecars/go/discover.go:48` 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 lines × 3) · ×7
  • Duplicated block (7 lines × 3) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:562 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:562-568 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:693-699 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:511-517 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:562` 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 (7 lines × 3) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Dart.cs:429 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Dart.cs:429-435 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:502-508 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:510-516 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Dart.cs:429` 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 (7 lines × 3) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:93 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:93-99 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:100-106 | engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Scala.cs:119-125 — 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 `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:93` 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 (7 lines × 3) engine/src/Scanner/ModelAware/ES2/ImmutableEventsAnalyzer.cs:150 — engine/src/Scanner/ModelAware/ES2/ImmutableEventsAnalyzer.cs:150-156 | engine/src/Scanner/ModelAware/ES2/ImmutableEventsAnalyzer.cs:178-184 | engine/src/Scanner/ModelAware/ES2/ImmutableEventsAnalyzer.cs:209-215 — 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 `engine/src/Scanner/ModelAware/ES2/ImmutableEventsAnalyzer.cs:150` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 3) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Rust.cs:194 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Rust.cs:194-200 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:210-216 | engine/src/Scanner/Defects/X30/ForeignInvertedSupportGuardScan.Kotlin.cs:52-58 — 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 `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Rust.cs:194` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Scanner/Defects/X30/ForeignInvertedSupportGuardScan.Kotlin.cs:52` calls `KotlinNumberSuffix`, `Replace` and `engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:210` 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 (7 lines × 3) tools/multilang/agg_combined4.py:130 — tools/multilang/agg_combined4.py:130-136 | tools/multilang/agg_combined5.py:136-142 | tools/multilang/agg_combined6.py:147-153 — before extracting anything, compare `tools/multilang/agg_combined4.py` and `tools/multilang/agg_combined5.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 110 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 (7 lines × 3) tools/multilang/agg_combined4.py:215 — tools/multilang/agg_combined4.py:215-221 | tools/multilang/agg_combined5.py:221-227 | tools/multilang/agg_combined6.py:232-238 — before extracting anything, compare `tools/multilang/agg_combined4.py` and `tools/multilang/agg_combined5.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 110 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.
D17 · Explicit Debt · BarePragmaDisable · ×6
  • BarePragmaDisable engine/src/Core/Api/SbtPluginProjects.cs:99 — #pragma warning disable CHA0004 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable engine/src/Core/Frontend/DependencyCruiserRules.cs:90 — #pragma warning disable CHA0004 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable engine/src/Core/Frontend/NxDependencyConstraints.cs:126 — #pragma warning disable CHA0004 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable engine/src/Core/Frontend/NxDependencyConstraints.cs:210 — #pragma warning disable CHA0004 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable engine/src/Core/Frontend/NxDependencyConstraints.cs:229 — #pragma warning disable CHA0004 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
  • BarePragmaDisable engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:577 — #pragma warning disable CHA0004 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×6
  • Duplicated block (13 lines × 3) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Dart.cs:73 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Dart.cs:73-85 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:73-85 | engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Java.cs:76-88 — 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 `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Dart.cs:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 3) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:119 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:119-131 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Kotlin.cs:153-165 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Ruby.cs:101-113 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:119` 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 `t` to `IReadOnlyList<JsToken>` in one and `List<JsToken>` 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.
  • Duplicated block (13 lines × 3) engine/src/Scanner/Security/D31/Scanners/ComposeServiceSurface.cs:325 — engine/src/Scanner/Security/D31/Scanners/ComposeServiceSurface.cs:325-337 | engine/src/Scanner/Security/Shared/Scanners/ComposeRuntimeSocketMountScan.cs:198-210 | engine/src/Scanner/Security/Shared/Scanners/WranglerPlaintextVarScan.cs:398-410 — 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 `engine/src/Scanner/Security/D31/Scanners/ComposeServiceSurface.cs:325` 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 (13 lines × 3) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:103 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:103-115 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Php.cs:139-151 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Rust.cs:171-183 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:103` 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 (13 lines × 3) engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs:986 — engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs:986-998 | engine/src/Scanner/Accessibility/AC7/A11yEnforcementAnalyzer.cs:1111-1123 | engine/src/Scanner/Accessibility/Accessibility.Prework/RepoStylesheets.cs:205-217 — 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 `engine/src/Scanner/Accessibility/AC7/A11yEnforcementAnalyzer.cs:1111` 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 (13 lines × 3) engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:4976 — engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:4976-4988 | engine/src/Scanner/Security/D31/Scanners/ComposeServiceSurface.cs:456-468 | engine/src/Scanner/Security/D31/Scanners/UnscopedBuildContextCopyScan.cs:299-311 — 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 `engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:4976` 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 (8 lines × 3) · ×6
  • Duplicated block (8 lines × 3) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.cs:1649 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.cs:1649-1656 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Java.cs:1219-1226 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs:868-875 — 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 `engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.cs:1649` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (8 lines × 3) engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:450 — engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:450-457 | engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:516-523 | engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:553-560 — 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 `engine/src/Scanner/Security/Shared/Scanners/ScanParsers.cs:450` 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 (8 lines × 3) engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.cs:84 — engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.cs:84-92 | engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:88-95 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.cs:74-81 — 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 `engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.cs: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.
  • Duplicated block (8 lines × 3) engine/src/Core/CodeShape/ChainedFamilyRollup.cs:345 — engine/src/Core/CodeShape/ChainedFamilyRollup.cs:345-352 | engine/src/Core/CodeShape/LineBasedGodClassDetector.cs:518-525 | engine/src/Scanner/Architecture/D6/Cohesion/Lcom4Calculator.cs:1640-1647 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 3) engine/src/Scanner/Readiness/Readiness.Prework/ReadinessScan.cs:131 — engine/src/Scanner/Readiness/Readiness.Prework/ReadinessScan.cs:131-141 | engine/src/Scanner/Security/Shared/RuntimeHardeningScan.cs:361-371 | engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:4585-4592 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `tokens` to `params string[]` in one and `string[]` 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.
  • Duplicated block (8 lines × 3) engine/src/Core/Dependencies/SbtBuildManifest.cs:411 — engine/src/Core/Dependencies/SbtBuildManifest.cs:411-418 | engine/src/Scanner/Defects/X24/ForeignMarkupTaintScan.Python.cs:287-294 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Elixir.cs:561-568 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×6
  • Duplicated block (11 lines × 3) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:181 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:181-191 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:408-418 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Ruby.cs:139-149 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:181` 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 × 3) engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:377 — engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:377-387 | engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:414-424 | engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:69-79 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:377` 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 × 3) engine/src/Scanner/Security/D29/Scanners/JsDeadFieldRoundTripRecheck.cs:57 — engine/src/Scanner/Security/D29/Scanners/JsDeadFieldRoundTripRecheck.cs:57-67 | engine/src/Scanner/Security/D29/Scanners/JsRedundantReDefaultRecheck.cs:56-66 | engine/src/Scanner/Security/D29/Scanners/JsRegexCaptureGroupRecheck.cs:52-62 — 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 all 3 call sites, so a change lands once.
  • Duplicated block (11 lines × 3) engine/src/Scanner/Maturity/M1/DocumentationDimension.cs:25 — engine/src/Scanner/Maturity/M1/DocumentationDimension.cs:25-35 | engine/src/Scanner/Maturity/M2/ArchitectureDocsDimension.cs:25-35 | engine/src/Scanner/Maturity/M3/FolderStructureDimension.cs:25-35 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 3) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:149 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:149-159 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:58-68 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:63-73 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:149` 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 × 3) engine/src/Core/Dependencies/BunLockfileReader.cs:64 — engine/src/Core/Dependencies/BunLockfileReader.cs:64-74 | engine/src/Core/Dependencies/NpmLockfileReader.cs:58-70 | engine/src/Core/Dependencies/NpmLockfileReader.cs:147-157 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Dependencies/BunLockfileReader.cs:64` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Core/Dependencies/BunLockfileReader.cs:63` calls `TryGetProperty` and `engine/src/Core/Dependencies/NpmLockfileReader.cs:58` 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 (9 lines × 3) · ×6
  • Duplicated block (9 lines × 3) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:98 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:98-106 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Java.cs:88-96 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Java.cs:160-168 — 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 `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:98` 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 × 3) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:98 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:98-106 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:771-779 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Dart.cs:96-104 — 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 `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:98` 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 × 3) engine/src/Scanner/Security/D31/Scanners/DockerfileShapeRuleFilter.cs:985 — engine/src/Scanner/Security/D31/Scanners/DockerfileShapeRuleFilter.cs:985-993 | engine/src/Scanner/Security/D31/Scanners/DockerfileShapeRuleFilter.cs:1030-1039 | engine/src/Scanner/Security/D31/Scanners/DockerfileShapeRuleFilter.cs:1096-1104 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Scanner/Security/D31/Scanners/DockerfileShapeRuleFilter.cs:1028` calls `foreach` and `engine/src/Scanner/Security/D31/Scanners/DockerfileShapeRuleFilter.cs:1094` 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 (9 lines × 3) engine/src/Core/Enforcement/CiGateDetection.cs:274 — engine/src/Core/Enforcement/CiGateDetection.cs:274-282 | engine/src/Scanner/Security/D31/Scanners/ConfigMapContentRuleFilter.cs:155-163 | engine/src/Scanner/Security/Shared/Scanners/SemgrepClaimRecheck.cs:404-412 — 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. 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 (9 lines × 3) tools/multilang/agg_combined4.py:147 — tools/multilang/agg_combined4.py:147-155 | tools/multilang/agg_combined5.py:153-161 | tools/multilang/agg_combined6.py:164-172 — before extracting anything, compare `tools/multilang/agg_combined4.py` and `tools/multilang/agg_combined5.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 110 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.
  • Duplicated block (9 lines × 3) engine/sidecars/kotlin-frontend/selftest/k1-error-check.py:46 — engine/sidecars/kotlin-frontend/selftest/k1-error-check.py:46-54 | engine/sidecars/kotlin-frontend/selftest/modules-check.py:49-57 | engine/sidecars/kotlin-frontend/selftest/repeated-annotation-check.py:60-68 — 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 all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×6
  • Duplicated block (5 lines × 4) engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1529 — engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1529-1533 | engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1611-1615 | engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1667-1671 | engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1727-1731 — 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 `engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1529` 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 (5 lines × 4) engine/src/Core/Dependencies/CratesIoClient.cs:355 — engine/src/Core/Dependencies/CratesIoClient.cs:355-359 | engine/src/Core/Dependencies/HexRegistryClient.cs:182-186 | engine/src/Core/Dependencies/OsvAdvisoryClient.cs:195-199 | engine/src/Core/Dependencies/UnityRegistryClient.cs:183-187 — 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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Dependencies/CratesIoClient.cs:355` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 4) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:97 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:97-101 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Java.cs:87-91 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:210-214 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Java.cs:159-163 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:97` 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 (5 lines × 4) tools/multilang/agg_combined3.py:122 — tools/multilang/agg_combined3.py:122-126 | tools/multilang/agg_combined4.py:144-148 | tools/multilang/agg_combined5.py:150-154 | tools/multilang/agg_combined6.py:161-165 — before extracting anything, compare `tools/multilang/agg_combined3.py` and `tools/multilang/agg_combined4.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 66 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 × 4) tools/multilang/agg_combined3.py:130 — tools/multilang/agg_combined3.py:130-134 | tools/multilang/agg_combined4.py:151-155 | tools/multilang/agg_combined5.py:157-161 | tools/multilang/agg_combined6.py:168-172 — before extracting anything, compare `tools/multilang/agg_combined3.py` and `tools/multilang/agg_combined4.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 66 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.
  • Duplicated block (5 lines × 4) engine/sidecars/kotlin-frontend/selftest/k1-error-check.py:52 — engine/sidecars/kotlin-frontend/selftest/k1-error-check.py:52-56 | engine/sidecars/kotlin-frontend/selftest/modules-check.py:55-59 | engine/sidecars/kotlin-frontend/selftest/repeated-annotation-check.py:66-70 | engine/sidecars/scala-frontend/selftest/modules-check.py:73-77 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
X28 · Index access outside its own emptiness guard · Index access outside its own emptiness guard · ×6
  • Index access outside its own emptiness guard engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:538 — This condition tests `v` for emptiness and then indexes it on a branch that test does not reach. `v[0]` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `v` being empty — so an empty `v` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing: `v[1]` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `v` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `v`.
  • Index access outside its own emptiness guard engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:539 — This condition tests `v` for emptiness and then indexes it on a branch that test does not reach. `v[0]` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `v` being empty — so an empty `v` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing at line 538: `v[1]` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `v` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `v`.
  • Index access outside its own emptiness guard engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:539 — This condition tests `v` for emptiness and then indexes it on a branch that test does not reach. `v[^1]` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `v` being empty — so an empty `v` indexes position ^1 of nothing and throws. This same condition already shows the intended bracketing at line 538: `v[1]` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `v` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `v`.
  • Index access outside its own emptiness guard engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:541 — This condition tests `v` for emptiness and then indexes it on a branch that test does not reach. `v[0]` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `v` being empty — so an empty `v` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing at line 538: `v[1]` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `v` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `v`.
  • Index access outside its own emptiness guard engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:541 — This condition tests `v` for emptiness and then indexes it on a branch that test does not reach. `v[^1]` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `v` being empty — so an empty `v` indexes position ^1 of nothing and throws. This same condition already shows the intended bracketing at line 538: `v[1]` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `v` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `v`.
  • Index access outside its own emptiness guard engine/src/Scanner/Security/Shared.CSharp/DestructuredPersonalDataLogScan.cs:292 — This condition tests `words` for emptiness and then indexes it on a branch that test does not reach. `words[^1]` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `words` being empty — so an empty `words` indexes position ^1 of nothing and throws. This same condition already shows the intended bracketing at line 293: `words[^2]` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `words` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `words`.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×5
  • Focus outline removed in CSS without a :focus replacement src/Kennel.Ui/wwwroot/app.css:891 — `.info-hint:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/Kennel.Ui/wwwroot/app.css:1217 — `.rail-find-input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/Kennel.Ui/wwwroot/app.css:2955 — `.mm-node:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/Kennel.Ui/wwwroot/app.css:3034 — `.team-card-link .team-card-name:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/Kennel.Ui/wwwroot/app.css:3125 — `.mainseq a:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D17 · Explicit Debt · TodoComment · ×5
  • TodoComment engine/src/CodeHealth.Reporting/FileQuality/FileQualityScorer.cs:62 — // "one TODO → 6.x", never 0.0/Critical — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment engine/src/Scanner/ExplicitDebt/D17/ExplicitDebtAnalyzer.cs:890 — // the first few suppressions per file, then dampen logarithmically. Every other debt kind (TODO, commented-out — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Dart.cs:25 — // answer's UnimplementedError with no TODO beside it) is not a stub here, as NotSupportedException is not on C#. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/Kennel.Core/Scans/Recovery/OrphanedScanRunReconciler.cs:230 — // TODO(2026-10-26): delete once every build in production writes scans.run_owners (one release after P2 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/Kennel.Watchdog.Core/Scheduling/Services/StaleClaimReconciler.cs:194 — // TODO(2026-10-26): delete once every build in production writes ClaimedByInstanceId (one release after — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:108 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:108-138 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Kotlin.cs:89-117 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.PythonDataSubjectRights.cs:82-107 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Rust.cs:95-130 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Scala.cs:128-150 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Swift.cs:79-104 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Readiness/P1/CicdDimension.cs:25 — engine/src/Scanner/Readiness/P1/CicdDimension.cs:25-36 | engine/src/Scanner/Readiness/P12/CiGateHonestyDimension.cs:25-36 | engine/src/Scanner/Readiness/P3/SecurityAndPerfToolingDimension.cs:25-36 | engine/src/Scanner/Readiness/P4/DeploymentRollbackDimension.cs:25-36 | engine/src/Scanner/Readiness/P5/DisasterRecoveryDimension.cs:25-36 | engine/src/Scanner/Readiness/P6/ReleaseHygieneDimension.cs:25-36 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:112 — engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:112-152 | engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:157-172 | engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:177-192 | engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:197-212 | engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:217-232 | engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:237-252 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:116 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:116-143 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Kotlin.cs:150-173 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Ruby.cs:99-126 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:401-431 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:436-471 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:476-507 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) tools/multilang/agg_combined4.py:85 — tools/multilang/agg_combined4.py:85-90 | tools/multilang/agg_combined5.py:90-95 | tools/multilang/agg_combined6.py:100-105 | tools/multilang/agg_holdout4.py:45-50 | tools/multilang/agg_holdout5.py:59-64 | tools/multilang/agg_holdout6.py:65-70 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×5
  • Duplicated block (24 lines × 2) engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:37 — engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:37-60 | engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs:41-64 — before extracting anything, compare `engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs` and `engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:113 — engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:113-136 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:71-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Python.cs:174 — engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Python.cs:174-197 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs:234-257 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2575 — engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2575-2598 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2734-2758 — 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 (24 lines × 2) engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:5586 — engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:5586-5609 | engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1872-1895 — 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 `engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:5586` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×5
  • Duplicated block (21 lines × 2) engine/src/Scanner/Security/D29/Scanners/RecursiveOwnershipRootRecheck.cs:147 — engine/src/Scanner/Security/D29/Scanners/RecursiveOwnershipRootRecheck.cs:147-167 | engine/src/Scanner/Security/D29/Scanners/ShellCommandPrefixRecheck.cs:168-188 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) engine/src/Scanner/LlmJudgedLanguage/LA4/DockerImages.cs:356 — engine/src/Scanner/LlmJudgedLanguage/LA4/DockerImages.cs:356-376 | engine/src/Scanner/Security/D31/Scanners/UnscopedBuildContextCopyScan.cs:299-319 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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 (21 lines × 2) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:128 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:128-148 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Scala.cs:139-159 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:128` 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 `source` to `HashSet<int> Unconvicting) LexKotlinForKnobs(string` in one and `string` 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.
  • Duplicated block (21 lines × 2) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2634 — engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2634-2655 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2671-2691 — 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 (21 lines × 2) engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs:986 — engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs:986-1006 | engine/src/Scanner/Accessibility/Accessibility.Prework/RepoStylesheets.cs:205-225 — 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 `engine/src/Scanner/Accessibility/Accessibility.Prework/RepoStylesheets.cs:205` 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 (9 lines × 4) · ×5
  • Duplicated block (9 lines × 4) engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:57 — engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:57-65 | engine/src/Scanner/Compliance/C3/AuditTrailDimension.cs:61-69 | engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs:61-69 | engine/src/Scanner/Compliance/C5/DataSubjectRightsDimension.cs:64-72 — before extracting anything, compare `engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs` and `engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 4) engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:692 — engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:692-700 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:788-796 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:847-855 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:1758-1766 — 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 `engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:692` 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 × 4) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs:33 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs:33-41 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinAuditTrail.cs:28-36 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.RustAuditTrail.cs:37-45 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ScalaAuditTrail.cs:53-61 — 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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs:33` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinAuditTrail.cs:25` calls `Range`, `Where`, `IsWord` and `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.DartAuditTrail.cs:32` 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 (9 lines × 4) engine/src/Scanner/Accessibility/AC6/CssRules.cs:90 — engine/src/Scanner/Accessibility/AC6/CssRules.cs:90-98 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Js.cs:369-377 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.cs:780-788 | engine/src/Scanner/Readiness/P7/ForeignHttpResilienceScan.cs:1707-1715 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
  • Duplicated block (9 lines × 4) engine/src/Scanner/Security/D31/Scanners/MutableBaseImageScan.cs:214 — engine/src/Scanner/Security/D31/Scanners/MutableBaseImageScan.cs:214-222 | engine/src/Scanner/Security/D31/Scanners/MutableGitCloneScan.cs:337-345 | engine/src/Scanner/Security/D31/Scanners/NoOpToolShimScan.cs:410-418 | engine/src/Scanner/Security/D31/Scanners/UnpinnedToolchainInstallScan.cs:675-683 — 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 all 4 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×5
  • Duplicated block (12 lines × 3) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.PythonDataSubjectRights.cs:86 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.PythonDataSubjectRights.cs:86-97 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Rust.cs:100-111 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Scala.cs:132-143 — 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 all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 3) engine/src/Scanner/Defects/X20/ForeignArgumentGuardScan.FSharp.cs:357 — engine/src/Scanner/Defects/X20/ForeignArgumentGuardScan.FSharp.cs:357-368 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Census.cs:126-137 | engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.FSharp.cs:130-141 — 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 `engine/src/Scanner/Defects/X20/ForeignArgumentGuardScan.FSharp.cs:357` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Dart.cs:140 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Dart.cs:140-151 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:140-151 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Scala.cs:151-162 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Dart.cs:140` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `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. 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 (12 lines × 3) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:808 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:808-819 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:660-671 | engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.cs:819-830 — 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 `engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:660` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (12 lines × 3) engine/src/Scanner/Security/D29/Scanners/PowerShellFetchExecScriptRecheck.cs:64 — engine/src/Scanner/Security/D29/Scanners/PowerShellFetchExecScriptRecheck.cs:64-75 | engine/src/Scanner/Security/D29/Scanners/RecursiveOwnershipRootRecheck.cs:87-98 | engine/src/Scanner/Security/D29/Scanners/ShellCommandPrefixRecheck.cs:98-110 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/D29/Scanners/PowerShellFetchExecScriptRecheck.cs:64` 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 (14 lines × 3) · ×5
  • Duplicated block (14 lines × 3) engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2946 — engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2946-2959 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3007-3020 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3176-3189 — 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 `engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2946` 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 × 3) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:560 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:560-573 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:263-276 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:572-585 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:560` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 3) engine/src/Scanner/Defects/X14/AddressClassifierDimension.cs:25 — engine/src/Scanner/Defects/X14/AddressClassifierDimension.cs:25-38 | engine/src/Scanner/Defects/X17/UncappedDocumentWalkDimension.cs:25-38 | engine/src/Scanner/Defects/X3/ExceptionHandlingDimension.cs:25-38 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 3) engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:328 — engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:328-341 | engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:360-373 | engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:393-406 — 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 `engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:328` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (14 lines × 3) engine/src/Core/Roslyn/CodeModel/RoslynCodeProject.cs:5 — engine/src/Core/Roslyn/CodeModel/RoslynCodeProject.cs:5-18 | engine/src/Core/Roslyn/CodeModel/RoslynCodeType.cs:2-15 | engine/src/Core/Roslyn/CodeModel/RoslynMappings.cs:2-15 — 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 all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×5
  • Duplicated block (7 lines × 4) engine/src/Core/Diagnostics/ScanBudgets.cs:521 — engine/src/Core/Diagnostics/ScanBudgets.cs:521-527 | engine/src/Core/Diagnostics/ScanBudgets.cs:666-672 | engine/src/Core/Diagnostics/ScanBudgets.cs:962-968 | engine/src/Core/Diagnostics/ScanBudgets.cs:1112-1118 — 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. 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 × 4) engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2946 — engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2946-2952 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3007-3013 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3064-3070 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3176-3182 — 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 `engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:2946` 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 (7 lines × 4) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:93 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:93-99 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:100-106 | engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Scala.cs:119-125 | engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.Ruby.cs:64-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:93` 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 (7 lines × 4) engine/src/Core/Api/JpmsModuleDescriptor.cs:255 — engine/src/Core/Api/JpmsModuleDescriptor.cs:255-264 | engine/src/Scanner/Docs/D19/LicenceEvidence.cs:282-297 | engine/src/Scanner/Maturity/Maturity.Prework/MaturityPrework.cs:29-35 | engine/src/Scanner/ModelAware/ModelAware.Prework/ForeignBenchmarks.cs:813-819 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. 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 × 4) tools/multilang/agg_combined3.py:165 — tools/multilang/agg_combined3.py:165-171 | tools/multilang/agg_combined4.py:185-191 | tools/multilang/agg_combined5.py:191-197 | tools/multilang/agg_combined6.py:202-208 — before extracting anything, compare `tools/multilang/agg_combined3.py` and `tools/multilang/agg_combined4.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 66 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×5
  • Low cohesion: ScalaShape (LCOM4 10) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs:134 — ScalaShape's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: JvmCodeType (LCOM4 4) engine/src/CodeHealth.CodeModel.Jvm/Model.cs:536 — JvmCodeType's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: LinuxHostReadings (LCOM4 4) src/Kennel.Admin.Core/Admin/Services/HostSampler.cs:121 — LinuxHostReadings's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: User (LCOM4 4) src/Kennel.Core/Accounts/Domain/User.cs:19 — User's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TeamHubDocument (LCOM4 4) src/Kennel.Watchdog.Core/Teams/Pages/TeamHub/TeamHubDocument.cs:17 — TeamHubDocument's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
P12 · CI test-gate honesty · Tests run only outside the merge gate · ×5
  • Tests run only outside the merge gate .github/workflows/engine-integration.yml:101 — `dotnet test engine/tests/CodeHealth.Tests.Integration -c Release --no-build -m:1 /p:UseSharedCompilation=false --logger "trx;LogFileName=…` is the only CI command that runs 129 test(s) (e.g. AnalyzeCommandTests.Analyze_ProducesBothOutputFiles, AnalyzeCommandTests.Analyze_Report_Passes_Its_Own_Integrity_Lint), and the workflow runs only on a schedule — a failure there is found after the change merged, when the only remedy is a revert. Run them on pull requests (or in the merge queue).
  • Tests run only outside the merge gate .github/workflows/engine-integration.yml:120 — `dotnet test engine/tests/CodeHealth.Tests.FSharp -c Release --no-build -m:1 /p:UseSharedCompilation=false --logger "trx;LogFileName=engin…` is the only CI command that runs 135 test(s) (categories Crack, FSharp; e.g. Ax2FSharpHandlerStateTests.A_module_value_written_from_a_handler_is_a_positioned_global_write, Ax2FSharpHandlerStateTests.A_write_inside_lock_is_in_a_critical_section_and_a_local_mutable_is_not_global), and the workflow runs only on a schedule — a failure there is found after the change merged, when the only remedy is a revert. Run them on pull requests (or in the merge queue).
  • Tests run only outside the merge gate .github/workflows/engine-integration.yml:124 — `dotnet test engine/tests/CodeHealth.Tests.Jvm -c Release --no-build -m:1 /p:UseSharedCompilation=false --logger "trx;LogFileName=engine-j…` is the only CI command that runs 822 test(s) (categories Jvm; e.g. CloneUnitTests.A_Clone_Window_Never_Spans_Two_Member_Bodies, CloneUnitTests.No_Cited_Range_Is_Inverted), and the workflow runs only on a schedule — a failure there is found after the change merged, when the only remedy is a revert. Run them on pull requests (or in the merge queue).
  • Tests run only outside the merge gate .github/workflows/engine-integration.yml:137 — `dotnet test tools/qwen-poc/tests -c Release --no-build -m:1 /p:UseSharedCompilation=false --logger "trx;LogFileName=qwen-poc-results.trx"` is the only CI command that runs 359 test(s) (e.g. AcceptancePolicyTests.AGuardThatNeverGoesGreenCanStillBeAccepted, AcceptancePolicyTests.AGreenGuardIsAlsoAccepted), and the workflow runs only on a schedule — a failure there is found after the change merged, when the only remedy is a revert. Run them on pull requests (or in the merge queue).
  • Tests run only outside the merge gate .github/workflows/engine-integration.yml:149 — `CONCEPT_SUITE_WORK="$RUNNER_TEMP/concepts" dotnet test engine/tests/CodeHealth.Tests.Concepts -c Release -m:1 /p:UseSharedCompilation=fal…` is the only CI command that runs 6 test(s) (categories ConceptSuite; e.g. ConceptSuiteTests.Variant_holds_on_the_engines_sarif, ScanEnvironmentTests.An_unconfigured_suite_scan_takes_the_bench_s_slots_and_caps), and the workflow runs only on a schedule — a failure there is found after the change merged, when the only remedy is a revert. Run them on pull requests (or in the merge queue).
D12 · Dependency Hygiene · Deprecated · ×4
  • Deprecated: Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit engine/Directory.Packages.props:141 — Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit 1.1.2 — Legacy — the publisher's replacement is `Microsoft.CodeAnalysis.CSharp.Analyzer.Testing`; migrate the reference to it.
  • Deprecated: Verify.Xunit engine/Directory.Packages.props:140 — Verify.Xunit 31.12.5 — Legacy — the publisher's replacement is `Verify.XunitV3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
  • Deprecated: xunit engine/Directory.Packages.props:137 — xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
  • Deprecated: xunit Directory.Packages.props:130 — xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×4
  • Duplicated block (23 lines × 2) engine/src/Core/Api/PyprojectDistribution.cs:304 — engine/src/Core/Api/PyprojectDistribution.cs:304-326 | engine/src/Scanner/Security/Shared/Scanners/NginxDirectiveRecheck.cs:409-431 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 2) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:62 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:62-84 | engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Java.cs:65-87 — 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 `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:62` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `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 (23 lines × 2) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:295 — engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:295-317 | engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Scala.cs:385-407 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs:3911 — engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs:3911-3933 | engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs:4068-4090 — 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 `engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs:3911` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×4
  • Duplicated block (20 lines × 2) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:1020 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:1020-1039 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:858-877 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:1020` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.cs:1054 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.cs:1054-1073 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:1565-1584 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) engine/src/Core/Architecture/Topology/Extractors/CrossplaneExtractor.cs:140 — engine/src/Core/Architecture/Topology/Extractors/CrossplaneExtractor.cs:140-159 | engine/src/Core/Architecture/Topology/Extractors/KubernetesExtractor.cs:84-103 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) engine/src/Scanner/ModelAware/ED3/EventNamingAnalyzer.cs:118 — engine/src/Scanner/ModelAware/ED3/EventNamingAnalyzer.cs:118-140 | engine/src/Scanner/ModelAware/ED3/EventNamingAnalyzer.cs:506-525 — 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 `engine/src/Scanner/ModelAware/ED3/EventNamingAnalyzer.cs:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/Scanner/ModelAware/ED3/EventNamingAnalyzer.cs:527` calls `DeclaredConstantsByType`, `Select` and `engine/src/Scanner/ModelAware/ED3/EventNamingAnalyzer.cs:142` 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 (18 lines × 2) · ×4
  • Duplicated block (18 lines × 2) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Dart.cs:189 — engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Dart.cs:189-206 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:299-316 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `t` to `string? View)? DartSource(IReadOnlyList<JsToken>` in one and `string? View)? Source(IReadOnlyList<JsToken>` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:319` calls `IsPunct` and `engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Dart.cs:209` 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 (18 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:447 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:447-464 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Scala.cs:321-338 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:38 — engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:38-55 | engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:44-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) engine/src/Core/CodeShape/NeutralMethodLengthScanner.cs:774 — engine/src/Core/CodeShape/NeutralMethodLengthScanner.cs:774-791 | engine/src/Core/CodeShape/NeutralTypeLengthScanner.cs:154-171 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×4
  • Duplicated block (9 lines × 5) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:114 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:114-122 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.PythonDataSubjectRights.cs:86-94 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Rust.cs:100-108 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Scala.cs:132-140 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Swift.cs:83-91 — 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 all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:114` 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 after the matched lines, `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.PythonDataSubjectRights.cs:95` calls `ReadSqlRetention` and `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:123` 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 (9 lines × 5) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:133 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:133-141 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Dart.cs:133-141 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Lexing.cs:22-30 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs:270-278 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Scala.cs:408-416 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `s` to `StringBuilder` in one and `string` 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.
  • Duplicated block (9 lines × 5) engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:486 — engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:486-494 | engine/src/Scanner/Security/D31/Scanners/GitOwnershipCheckDisabledScan.cs:203-211 | engine/src/Scanner/Security/D31/Scanners/PythonInstallGuardDisabledScan.cs:271-279 | engine/src/Scanner/Security/D31/Scanners/SetuidBinaryGrantScan.cs:207-215 | engine/src/Scanner/Security/D31/Scanners/UnscopedBuildContextCopyScan.cs:421-429 — 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 all 5 call sites, so a change lands once.
  • Duplicated block (9 lines × 5) tools/multilang/agg_combined.py:37 — tools/multilang/agg_combined.py:37-45 | tools/multilang/agg_combined3.py:47-55 | tools/multilang/agg_combined4.py:57-65 | tools/multilang/agg_combined5.py:61-69 | tools/multilang/agg_combined6.py:70-78 — before extracting anything, compare `tools/multilang/agg_combined.py` and `tools/multilang/agg_combined3.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 before the matched lines, `tools/multilang/agg_combined6.py:66` calls `ctrl_map` and `tools/multilang/agg_combined3.py:43` 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 (10 lines × 4) · ×4
  • Duplicated block (10 lines × 4) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:147 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:147-156 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:56-65 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Ruby.cs:96-105 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:61-70 — 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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:147` 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 (10 lines × 4) engine/src/Scanner/Security/D29/Scanners/CloudFrontDefaultCertificateAdvice.cs:99 — engine/src/Scanner/Security/D29/Scanners/CloudFrontDefaultCertificateAdvice.cs:99-108 | engine/src/Scanner/Security/D29/Scanners/SpringSecurityActuatorRecheck.cs:248-257 | engine/src/Scanner/Security/D31/Scanners/DuplicateResourceCopyAggregator.cs:255-266 | engine/src/Scanner/Security/Shared/Scanners/TerraformVariableDefaultFilter.cs:282-291 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
  • Duplicated block (10 lines × 4) engine/src/Scanner/Security/D31/Scanners/AutomountedServiceAccountTokenScan.cs:116 — engine/src/Scanner/Security/D31/Scanners/AutomountedServiceAccountTokenScan.cs:116-125 | engine/src/Scanner/Security/D31/Scanners/HostPathPersistentVolumeScan.cs:110-119 | engine/src/Scanner/Security/D31/Scanners/UnresolvableImageReferenceScan.cs:91-100 | engine/src/Scanner/Security/Shared/Scanners/CommittedSecretManifestScan.cs:163-172 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 4) tools/multilang/agg_combined3.py:192 — tools/multilang/agg_combined3.py:192-201 | tools/multilang/agg_combined4.py:225-234 | tools/multilang/agg_combined5.py:231-240 | tools/multilang/agg_combined6.py:242-251 — before extracting anything, compare `tools/multilang/agg_combined3.py` and `tools/multilang/agg_combined4.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 66 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.
IC1 · Incompleteness & stubs · Hollow method · ×4
  • Hollow method — returns a constant without doing the work engine/src/Core/Analyzers/AbsentAnalyzerDiscovery.cs:19 — `DiscoverAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work engine/src/Core/Analyzers/AbsentArchitectureTestDiscovery.cs:17 — `DiscoverAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work src/Kennel.Core/Accounts/Services/TermsAcceptance.cs:28 — `HasAcceptedCurrentTermsAsync` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work tools/qwen-poc/Program.cs:482 — `AfterEdit` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
X1 · Async correctness · Blocking `File.ReadAllText` inside an `async` method · ×4
  • Blocking `File.ReadAllText` inside an `async` method engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:131 — `File.ReadAllText` blocks the thread on I/O while `File.ReadAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.ReadAllText` inside an `async` method REDACTED:55 — `File.ReadAllText` blocks the thread on I/O while `File.ReadAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.ReadAllText` inside an `async` method src/Kennel.Improve.Orchestrator/Program.cs:304 — `File.ReadAllText` blocks the thread on I/O while `File.ReadAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `File.ReadAllText` inside an `async` method engine/tools/noise-probe/Program.cs:68 — `File.ReadAllText` blocks the thread on I/O while `File.ReadAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (8 members, 50+ identical tokens) engine/src/Core/Api/CargoLibraryTarget.cs:878 — engine/src/Core/Api/CargoLibraryTarget.cs:878-893 | engine/src/Core/Api/CargoLibraryTarget.cs:1111-1126 | engine/src/Scanner/Accessibility/AC6/CssRules.cs:366-381 | engine/src/Scanner/CodeShape/D4/CodeShape/DuplicationAnalyzer.cs:4146-4161 | engine/src/Scanner/Defects/X7/RazorBranchModel.cs:366-381 | engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:4338-4353 | engine/src/Scanner/Security/Shared/Scanners/SemgrepUnsafeAdvice.cs:286-301 | engine/src/Scanner/Security/Shared/Scanners/SqlBuilderCompositionWalk.cs:345-360 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:100 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:100-143 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Go.cs:122-164 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:132-176 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:82-127 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Php.cs:136-159 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs:265-307 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Rust.cs:168-206 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Scala.cs:83-130 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) tools/multilang/agg_combined.py:50 — tools/multilang/agg_combined.py:50-59 | tools/multilang/agg_combined3.py:61-69 | tools/multilang/agg_combined4.py:72-80 | tools/multilang/agg_combined5.py:77-85 | tools/multilang/agg_combined6.py:87-95 | tools/multilang/agg_holdout4.py:32-40 | tools/multilang/agg_holdout5.py:46-54 | tools/multilang/agg_holdout6.py:52-60 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×3
  • Duplicated block (31 lines × 2) engine/src/Core/Dependencies/MixManifestHygiene.cs:698 — engine/src/Core/Dependencies/MixManifestHygiene.cs:698-728 | engine/src/Core/Dependencies/RebarManifestHygiene.cs:741-771 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:55 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:55-85 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:60-90 — 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 (31 lines × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:317 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:317-347 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Dart.cs:267-298 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×3
  • Duplicated block (26 lines × 2) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Rust.cs:792 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Rust.cs:792-817 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Rust.cs:823-848 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:698 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:698-723 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Scala.cs:719-744 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) engine/src/Scanner/Security/D13/SecretScanningAnalyzer.cs:285 — engine/src/Scanner/Security/D13/SecretScanningAnalyzer.cs:285-310 | engine/src/Scanner/Security/D13/SecretScanningAnalyzer.cs:335-360 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×3
  • Duplicated block (22 lines × 2) engine/src/Scanner/Security/D29/Scanners/JsDeadFieldRoundTripRecheck.cs:84 — engine/src/Scanner/Security/D29/Scanners/JsDeadFieldRoundTripRecheck.cs:84-105 | engine/src/Scanner/Security/D29/Scanners/JsRegexCaptureGroupRecheck.cs:79-100 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:747 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:747-768 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:830-851 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:771` calls `IsCatchAt`, `IsWord`, `IsPunct` and `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:853` 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 (22 lines × 2) engine/src/Core/Classification/TemplateProjectTrees.Consumption.Readers.cs:242 — engine/src/Core/Classification/TemplateProjectTrees.Consumption.Readers.cs:242-263 | engine/src/Core/Classification/TemplateProjectTrees.Consumption.cs:185-206 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Classification/TemplateProjectTrees.Consumption.Readers.cs:242` 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 (21–22 lines × 2) · ×3
  • Duplicated block (21–22 lines × 2) engine/src/CodeHealth.Llm.ClaudeCli/ClaudeCliLlmProvider.cs:40 — engine/src/CodeHealth.Llm.ClaudeCli/ClaudeCliLlmProvider.cs:40-61 | engine/src/CodeHealth.Llm.CopilotCli/CopilotCliLlmProvider.cs:39-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/CodeHealth.Llm.ClaudeCli/ClaudeCliLlmProvider.cs:40` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (21–22 lines × 2) engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:431 — engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:431-452 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.RazorScript.cs:278-298 — 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 `engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:431` 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 (21–22 lines × 2) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:443 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:443-463 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:478-499 — 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 `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:443` 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 (15 lines × 3) · ×3
  • Duplicated block (15 lines × 3) engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs:238 — engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs:238-252 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.FSharp.cs:104-118 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Scala.cs:197-211 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs:238` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (15 lines × 3) engine/src/Scanner/ArchitectureModel/AX1/RiverpodProviders.cs:375 — engine/src/Scanner/ArchitectureModel/AX1/RiverpodProviders.cs:375-389 | engine/src/Scanner/ArchitectureModel/AX1/SpringBeans.cs:1038-1052 | engine/src/Scanner/Defects/X2/ForeignCancellationScan.Kotlin.cs:377-391 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 3) engine/src/CodeHealth.Toolchain/Git/GitHeadCommit.cs:17 — engine/src/CodeHealth.Toolchain/Git/GitHeadCommit.cs:17-31 | engine/src/CodeHealth.Toolchain/Git/GitTrackedPaths.cs:31-45 | engine/src/CodeHealth.Toolchain/Git/GitTrackedPaths.cs:59-73 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/CodeHealth.Toolchain/Git/GitHeadCommit.cs:17` 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 (13–16 lines × 2) · ×3
  • Duplicated block (13–16 lines × 2) engine/src/Scanner/Docs/D24/AnnotatedUnit.cs:378 — engine/src/Scanner/Docs/D24/AnnotatedUnit.cs:378-393 | engine/src/Scanner/Docs/D24/VbAnnotatedUnit.cs:325-337 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Docs/D24/AnnotatedUnit.cs:378` 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 `node` to `SyntaxNode` in one and `StatementSyntax` 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.
  • Duplicated block (13–16 lines × 2) engine/src/Core/Docs/CurrentStateDocuments.cs:46 — engine/src/Core/Docs/CurrentStateDocuments.cs:46-58 | engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:203-218 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Core/Docs/CurrentStateDocuments.cs:45` calls `ThrowIfNull` and `engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:202` 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 (13–16 lines × 2) engine/src/Core/SourceCensus/DeclaredScriptExecutables.cs:396 — engine/src/Core/SourceCensus/DeclaredScriptExecutables.cs:396-411 | engine/src/Core/SourceCensus/DeclaredScriptExecutables.cs:510-522 — 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 `engine/src/Core/SourceCensus/DeclaredScriptExecutables.cs:396` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×3
  • Duplicated block (12–13 lines × 2) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ScalaRetention.cs:31 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ScalaRetention.cs:31-43 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.SwiftRetention.cs:35-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ScalaRetention.cs:31` 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 (12–13 lines × 2) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:184 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:184-195 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Rust.cs:181-193 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:184` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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 (12–13 lines × 2) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Dart.cs:51 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Dart.cs:51-63 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:50-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Dart.cs:51` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×3
  • Duplicated block (8 lines × 4) engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Js.cs:123 — engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Js.cs:123-130 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Ruby.cs:268-275 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Rust.cs:158-165 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.cs:2927-2934 — 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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Js.cs:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 4) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Kotlin.cs:90 — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Kotlin.cs:90-97 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.PythonDataSubjectRights.cs:83-90 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Scala.cs:129-136 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Swift.cs:80-87 — 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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Kotlin.cs:90` 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 (8 lines × 4) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:224 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:224-231 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:179-186 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Scala.cs:227-234 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.cs:379-386 — 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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:224` 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–12 lines × 2) · ×3
  • Duplicated block (11–12 lines × 2) engine/src/CodeHealth.Reporting/Changelog/SlottedChangelogNarrator.cs:924 — engine/src/CodeHealth.Reporting/Changelog/SlottedChangelogNarrator.cs:924-934 | engine/src/CodeHealth.Toolchain/Git/LibGit2DiffHunkReader.cs:224-235 — 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 `engine/src/CodeHealth.Reporting/Changelog/SlottedChangelogNarrator.cs:924` 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–12 lines × 2) engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs:508 — engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs:508-519 | engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.cs:500-510 — 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 `engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs:508` 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 (11–12 lines × 2) engine/src/CodeHealth.Llm.Abstractions/InstrumentingLlmProvider.cs:16 — engine/src/CodeHealth.Llm.Abstractions/InstrumentingLlmProvider.cs:16-27 | engine/src/CodeHealth.Llm.Abstractions/TrainingCaptureLlmProvider.cs:21-31 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/CodeHealth.Llm.Abstractions/InstrumentingLlmProvider.cs:16` 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 (5 lines × 5) · ×3
  • Duplicated block (5 lines × 5) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Dart.cs:186 — engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Dart.cs:186-190 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Go.cs:448-452 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Kotlin.cs:138-142 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Scala.cs:407-411 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Swift.cs:270-274 — 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 all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Dart.cs:186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 5) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Php.cs:80 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Php.cs:80-84 | engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Php.cs:97-101 | engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Php.cs:59-63 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Php.cs:143-147 | engine/src/Scanner/Defects/X30/ForeignInvertedSupportGuardScan.Php.cs:57-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Php.cs:80` 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 (5 lines × 5) tools/multilang/agg_combined.py:175 — tools/multilang/agg_combined.py:175-179 | tools/multilang/agg_combined3.py:167-171 | tools/multilang/agg_combined4.py:187-191 | tools/multilang/agg_combined5.py:193-197 | tools/multilang/agg_combined6.py:204-208 — before extracting anything, compare `tools/multilang/agg_combined.py` and `tools/multilang/agg_combined3.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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.
DM10 · One transaction, one aggregate · One operation mutates 3 aggregates · ×3
  • One operation mutates 3 aggregates: PersonalNotificationRuleStore.SeedStaffDefaultsAsync src/Kennel.Core/Accounts/Services/PersonalNotificationRuleStore.cs:370 — `PersonalNotificationRuleStore.SeedStaffDefaultsAsync` saves `PersonalNotificationRule`, `PersonalNotificationTriggerSeed`, `PersonalNotificationSeed` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 3 aggregates: DeliveryService.MintAsync src/Kennel.Core/Compliance/Contracts/DeliveryService.cs:60 — `DeliveryService.MintAsync` saves `Delivery`, `DeliveryItem`, `DeliveryDeclaration` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 3 aggregates: ContributorDailyDraw.HandOutAsync src/Kennel.Core/Contributors/ContributorDailyDraw.cs:98 — `ContributorDailyDraw.HandOutAsync` saves `Questionnaire`, `QuestionnaireAssignment`, `ContributorOffer` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
P12 · CI test-gate honesty · Test failure does not fail the CI gate · ×3
  • Test failure does not fail the CI gate .github/workflows/build.yml:864 — `continue-on-error: true` lets the step or job that runs `dotnet test --no-build --configuration Release -m:1 /p:UseSharedCompilation=false --logger "trx;LogFileName=test-results.trx"` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
  • Test failure does not fail the CI gate .github/workflows/build.yml:916 — `continue-on-error: true` lets the step or job that runs `dotnet test engine/tests/CodeHealth.Tests.Unit/CodeHealth.Tests.Unit.csproj -c Release --no-build -m:1 /p:UseSharedCompilation=false --lo…` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
  • Test failure does not fail the CI gate .github/workflows/build.yml:949 — `continue-on-error: true` lets the step or job that runs `dotnet run --project benchmarks/Kennel.Benchmarks -c Release --no-build -- --ci --filter '*'` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
X1 · Async correctness · Blocking `MemoryStream.Write` inside an `async` method · ×3
  • Blocking `MemoryStream.Write` inside an `async` method engine/src/CodeHealth.Toolchain.SdkProvisioning/IDotnetReleaseSource.cs:43 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Kennel.Watchdog.Core/Calibration/Endpoints/CalibrationEndpoints.cs:163 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
  • Blocking `MemoryStream.Write` inside an `async` method src/Kennel.Infrastructure/GitProviders/GitHubProviderClient.cs:983 — `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
D12 · Dependency Hygiene · Prerelease dependency · ×2
  • Prerelease dependency: Cai.Scoring — Cai.Scoring resolves to 0.2.0-ws-k, a prerelease build. Prerelease packages carry no support policy, may change breaking between previews and can be unlisted — pin a stable release before shipping, or record the reason this preview is required.
  • Prerelease dependency: Cai.Delivery — Cai.Delivery resolves to 0.2.0-ws-k, a prerelease build. Prerelease packages carry no support policy, may change breaking between previews and can be unlisted — pin a stable release before shipping, or record the reason this preview is required.
D17 · Explicit Debt · XxxComment · ×2
  • XxxComment engine/tests/CodeHealth.Tests.Unit/ExplicitDebt/RoslynExplicitDebtCollectorTests.cs:2248 — // XXX is not the lead-in rule's to decide: it is also the redaction glyph, so IsLowercaseProseSlot answers the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment engine/tests/CodeHealth.Tests.Unit/ExplicitDebt/XxxProseSlotTests.cs:45 — // GUARD — the gate is XXX-only: TODO/FIXME/HACK are not English words and never occupy a noun slot — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyFunctions · ×2
  • TooManyFunctions: FSharpBody engine/src/CodeHealth.CodeModel.FSharp/Body.fs:17 — TooManyFunctions — 44 functions. The bar is 30 functions; this is 14 over it, 1.47× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: codehealth_rust_sidecar::macro_expand engine/sidecars/rust-frontend/src/macro_expand.rs:22 — TooManyFunctions — 34 free functions. The bar is 30 free functions; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · FunctionTooLong · ×2
  • FunctionTooLong: member-emitters.memberEmitters engine/sidecars/tsjs-frontend/member-emitters.mjs:10 — FunctionTooLong — memberEmitters runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: outro.build docs/marketing/infomercial/screen/brand/outro.mjs:223 — FunctionTooLong — build runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×2
  • Duplicated block (16 lines × 3) engine/src/Scanner/Compliance/C3/AuditTrailDimension.cs:51 — engine/src/Scanner/Compliance/C3/AuditTrailDimension.cs:51-66 | engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs:51-66 | engine/src/Scanner/Compliance/C5/DataSubjectRightsDimension.cs:54-69 — before extracting anything, compare `engine/src/Scanner/Compliance/C3/AuditTrailDimension.cs` and `engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:402 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:402-417 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:442-457 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:477-492 — 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 `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:402` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×2
  • Duplicated block (20 lines × 3) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:688 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:688-707 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Rust.cs:866-885 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Scala.cs:620-639 — 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 all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 3) engine/src/CodeHealth.Reporting/Changelog/ChangelogNarrator.cs:1537 — engine/src/CodeHealth.Reporting/Changelog/ChangelogNarrator.cs:1537-1556 | engine/src/Core/Docs/GeneratorBoilerplate.cs:129-148 | engine/src/Scanner/Docs/D19/LicenceEvidence.cs:300-319 — 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×2
  • Duplicated block (20–21 lines × 2) engine/src/Scanner/Security/D31/Scanners/DockerfileShapeRuleFilter.cs:982 — engine/src/Scanner/Security/D31/Scanners/DockerfileShapeRuleFilter.cs:982-1001 | engine/src/Scanner/Security/D31/Scanners/DockerfileShapeRuleFilter.cs:1027-1047 — 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 `engine/src/Scanner/Security/D31/Scanners/DockerfileShapeRuleFilter.cs:982` 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 (20–21 lines × 2) engine/sidecars/rust-frontend/src/macro_scope.rs:75 — engine/sidecars/rust-frontend/src/macro_scope.rs:75-94 | engine/sidecars/rust-frontend/src/macro_scope.rs:181-201 — 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 (19–20 lines × 2) · ×2
  • Duplicated block (19–20 lines × 2) engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3246 — engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3246-3264 | engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:5863-5882 — 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 `engine/src/Scanner/Frontend/R10/JsDuplicationDetector.cs:3246` 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 (19–20 lines × 2) engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Kotlin.cs:410 — engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Kotlin.cs:410-429 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Scala.cs:236-254 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Kotlin.cs:410` 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 (18–19 lines × 2) · ×2
  • Duplicated block (18–19 lines × 2) engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:111 — engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:111-129 | engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:169-186 — 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 `engine/src/Scanner/ModelAware/ES1/FoldDeterminismAnalyzer.cs:111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18–19 lines × 2) engine/src/Core/Dependencies/PubspecManifest.cs:90 — engine/src/Core/Dependencies/PubspecManifest.cs:90-107 | engine/src/Core/Dependencies/PubspecManifest.cs:412-430 — 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 `engine/src/Core/Dependencies/PubspecManifest.cs:90` 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 (17–18 lines × 2) · ×2
  • Duplicated block (17–18 lines × 2) engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:374 — engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:374-391 | engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:412-428 — 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 `engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:374` 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 (17–18 lines × 2) engine/src/Scanner/Security/D29/Scanners/JsDeadFieldRoundTripRecheck.cs:57 — engine/src/Scanner/Security/D29/Scanners/JsDeadFieldRoundTripRecheck.cs:57-73 | engine/src/Scanner/Security/D29/Scanners/JsRedundantReDefaultRecheck.cs:56-73 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×2
  • Duplicated block (15–17 lines × 2) engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2072 — engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2072-2086 | engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2398-2414 — 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 `engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2072` 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 (15–17 lines × 2) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/BootedAppRenderer.cs:223 — engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/BootedAppRenderer.cs:223-239 | engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/BootedAppRenderer.cs:319-333 — 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 `engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/BootedAppRenderer.cs:223` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 5) · ×2
  • Duplicated block (15–16 lines × 5) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:24 — engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:24-39 | engine/src/Scanner/Defects/X15/UntrustedLengthAnalyzer.cs:22-37 | engine/src/Scanner/Defects/X16/ShrinkLoopAnalyzer.cs:24-38 | engine/src/Scanner/Defects/X19/ScopedGlobalMutationAnalyzer.cs:24-38 | engine/src/Scanner/Defects/X30/InvertedSupportGuardAnalyzer.cs:24-39 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `null` to `ForeignDeadBranchFacts? foreign =` in one and `ForeignUntrustedLengthFacts? foreign =` 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.
  • Duplicated block (15–16 lines × 5) engine/src/Scanner/Defects/X1/AsyncCorrectnessAnalyzer.cs:29 — engine/src/Scanner/Defects/X1/AsyncCorrectnessAnalyzer.cs:29-43 | engine/src/Scanner/Defects/X13/UndrainedStreamAnalyzer.cs:24-38 | engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:24-38 | engine/src/Scanner/Defects/X25/InertKnobAnalyzer.cs:24-38 | engine/src/Scanner/Defects/X28/UncoveredIndexGuardAnalyzer.cs:25-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X1/AsyncCorrectnessAnalyzer.cs:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `null` to `string? root =` in one and `ForeignUndrainedStreamFacts? foreign =` 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 (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) engine/src/Scanner/Security/D31/Scanners/DockerfileHardeningAdvice.cs:65 — engine/src/Scanner/Security/D31/Scanners/DockerfileHardeningAdvice.cs:65-80 | engine/src/Scanner/Security/D31/Scanners/DockerfileHardeningAdvice.cs:322-336 — 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 `engine/src/Scanner/Security/D31/Scanners/DockerfileHardeningAdvice.cs:65` 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 (15–16 lines × 2) engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs:1801 — engine/src/Scanner/Accessibility/AC3/PageStructureAnalyzer.cs:1801-1815 | engine/src/Scanner/Security/Shared/Scanners/MarkupEscapingRecheck.cs:1240-1255 — 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 `engine/src/Scanner/Security/Shared/Scanners/MarkupEscapingRecheck.cs:1240` 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 (13–15 lines × 2) · ×2
  • Duplicated block (13–15 lines × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:107 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:107-119 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Dart.cs:105-119 — 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 `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:107` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13–15 lines × 2) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:459 — engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:459-471 | engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:506-520 — 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 `engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:459` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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 × 6) · ×2
  • Duplicated block (11 lines × 6) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:121 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:121-131 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Kotlin.cs:155-165 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Ruby.cs:103-113 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:405-415 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:445-455 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:480-490 — there are 6 copies across 4 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 6 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `t` to `IReadOnlyList<JsToken>` in one and `List<JsToken>` 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.
  • Duplicated block (11 lines × 6) engine/src/Scanner/Readiness/P1/CicdDimension.cs:26 — engine/src/Scanner/Readiness/P1/CicdDimension.cs:26-36 | engine/src/Scanner/Readiness/P12/CiGateHonestyDimension.cs:26-36 | engine/src/Scanner/Readiness/P3/SecurityAndPerfToolingDimension.cs:26-36 | engine/src/Scanner/Readiness/P4/DeploymentRollbackDimension.cs:26-36 | engine/src/Scanner/Readiness/P5/DisasterRecoveryDimension.cs:26-36 | engine/src/Scanner/Readiness/P6/ReleaseHygieneDimension.cs:26-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×2
  • Duplicated block (13–14 lines × 2) engine/src/Scanner/Security/D31/Scanners/GitOwnershipCheckDisabledScan.cs:107 — engine/src/Scanner/Security/D31/Scanners/GitOwnershipCheckDisabledScan.cs:107-119 | engine/src/Scanner/Security/D31/Scanners/PythonInstallGuardDisabledScan.cs:197-210 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/D31/Scanners/GitOwnershipCheckDisabledScan.cs:107` 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 (13–14 lines × 2) engine/src/Scanner/Security/Shared/Scanners/PathCombineProvenanceRecheck.cs:88 — engine/src/Scanner/Security/Shared/Scanners/PathCombineProvenanceRecheck.cs:88-100 | engine/src/Scanner/Security/Shared/Scanners/PathCombineProvenanceRecheck.cs:209-222 — 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 `engine/src/Scanner/Security/Shared/Scanners/PathCombineProvenanceRecheck.cs:88` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×2
  • Duplicated block (11–13 lines × 2) engine/src/Scanner/Compliance/S1/S1Analyzer.cs:30 — engine/src/Scanner/Compliance/S1/S1Analyzer.cs:30-40 | engine/src/Scanner/Compliance/S1/S1Analyzer.cs:92-104 — 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 `engine/src/Scanner/Compliance/S1/S1Analyzer.cs:30` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `sites` to `List<(string Type, string FilePath, int Line)>` in one and `List<(string Setting, string Member, string FilePath, int Line)>` 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.
  • Duplicated block (11–13 lines × 2) engine/src/Core/ExplicitDebt/RazorCodeBlockProjection.cs:70 — engine/src/Core/ExplicitDebt/RazorCodeBlockProjection.cs:70-82 | engine/src/Scanner/Security/D29/Scanners/InlineScriptShadow.cs:176-186 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×2
  • Duplicated block (11 lines × 5) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Java.cs:86 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Java.cs:86-96 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:105-115 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:57-67 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Kotlin.cs:57-67 | engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Java.cs:60-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Java.cs:86` 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 × 5) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Python.cs:393 — engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Python.cs:393-412 | engine/src/Scanner/Defects/X13/ForeignUndrainedStreamScan.Python.cs:250-269 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Python.cs:985-1004 | engine/src/Scanner/Docs/D19/MarkupDocument.cs:815-834 | engine/src/Scanner/Security/Shared/Scanners/ShellExecRecheck.cs:647-657 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×2
  • Duplicated block (8–11 lines × 2) engine/src/Scanner/CodeShape/D4/CodeShape/DuplicationAnalyzer.cs:873 — engine/src/Scanner/CodeShape/D4/CodeShape/DuplicationAnalyzer.cs:873-880 | engine/src/Scanner/ExplicitDebt/D17/ExplicitDebtAnalyzer.cs:557-567 — 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.
  • Duplicated block (8–11 lines × 2) engine/sidecars/java-spoon/selftest/check.py:59 — engine/sidecars/java-spoon/selftest/check.py:59-66 | engine/sidecars/kotlin-frontend/selftest/check.py:47-57 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×2
  • Duplicated block (7 lines × 5) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2086 — engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2086-2092 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2163-2169 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2336-2342 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2577-2583 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2706-2712 — 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 `engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2086` 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 (7 lines × 5) engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsDimension.cs:24 — engine/src/Scanner/ArchitectureModel/AX2/StatefulSingletonsDimension.cs:24-34 | engine/src/Scanner/ArchitectureModel/AX3/CyclicDependenciesDimension.cs:24-30 | engine/src/Scanner/ArchitectureModel/AX5/ArchitectureStyleDimension.cs:24-30 | engine/src/Scanner/ArchitectureModel/AX6/InterfaceSegregationDimension.cs:24-30 | engine/src/Scanner/ArchitectureModel/AX8/TestIsolationDimension.cs:24-30 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×2
  • Duplicated block (6 lines × 5) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:147 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:147-152 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:56-61 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:134-139 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Ruby.cs:96-101 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:61-66 — 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 all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:147` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 5) engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:666 — engine/src/CodeHealth.Toolchain/Git/GitDiffShapes.cs:666-671 | engine/src/CodeHealth.Toolchain/Git/GitLogHistoryExtractor.cs:382-387 | engine/src/CodeHealth.Toolchain/Git/LibGit2GitAccessor.cs:374-379 | engine/src/Scanner/Security/D28/Scanners/PrivateKeyBlobHistoryScan.cs:561-566 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:2503-2508 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/CodeHealth.Toolchain/Git/GitLogHistoryExtractor.cs:382` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:2501` calls `WaitForExitAsync` and `engine/src/CodeHealth.Toolchain/Git/GitLogHistoryExtractor.cs:380` 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 (6 lines × 6) · ×2
  • Duplicated block (6 lines × 6) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:138 — engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:138-143 | engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:158-163 | engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:178-183 | engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:198-203 | engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:218-223 | engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:238-243 — 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 `engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:138` 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 (6 lines × 6) tools/multilang/agg_combined4.py:85 — tools/multilang/agg_combined4.py:85-90 | tools/multilang/agg_combined5.py:90-95 | tools/multilang/agg_combined6.py:100-105 | tools/multilang/agg_holdout4.py:45-50 | tools/multilang/agg_holdout5.py:59-64 | tools/multilang/agg_holdout6.py:65-70 — before extracting anything, compare `tools/multilang/agg_combined4.py` and `tools/multilang/agg_combined5.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 110 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 (6 lines × 9) · ×2
  • Duplicated block (6 lines × 9) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Java.cs:85 — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Java.cs:85-90 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:104-109 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:113-118 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:56-61 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Kotlin.cs:56-61 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:60-65 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Rust.cs:81-86 | engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Java.cs:59-64 | engine/src/Scanner/Defects/X25/ForeignInertKnobScan.Kotlin.cs:161-166 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 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 9 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Java.cs:85` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 9) engine/src/Core/Dependencies/MixManifestHygiene.cs:166 — engine/src/Core/Dependencies/MixManifestHygiene.cs:166-177 | engine/src/Core/Dependencies/RebarManifestHygiene.cs:805-816 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:1337-1342 | engine/src/Scanner/Security/D31/Scanners/NamespaceScopedRuleAggregator.cs:266-277 | engine/src/Scanner/Security/D31/Scanners/UnappliableTerraformModuleScan.cs:197-208 | engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:2122-2127 | engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:5676-5681 | engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:10215-10220 | engine/src/Scanner/SecurityPosture/D37/VulnerabilityDisclosurePolicyAnalyzer.cs:396-407 — there are 9 copies across 7 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 9 sites; resolving a subset leaves the remainder to drift apart. 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 (28 lines × 2) · ×2
  • Duplicated block (28 lines × 2) tools/train/judge_verification.py:112 — tools/train/judge_verification.py:112-139 | tools/train/rehearse_verification.py:101-128 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (28 lines × 2) engine/sidecars/python-frontend/selftest/accessor-fixture/field_like.py:25 — engine/sidecars/python-frontend/selftest/accessor-fixture/field_like.py:25-52 | engine/sidecars/python-frontend/selftest/accessor-fixture/field_like.py:55-82 — 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.
IC1 · Incompleteness & stubs · Both branches are identical · ×2
  • Both branches are identical — the condition decides nothing src/Kennel.Watchdog.Core/Architecture/Ui/ArchitectureDevSeeder.cs:154 — Both arms of `dark ? … : …` are `"#3c8f59"`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
  • Both branches are identical — the condition decides nothing src/Kennel.Watchdog.Core/Architecture/Ui/ArchitectureDevSeeder.cs:155 — Both arms of `dark ? … : …` are `"#c65a49"`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
X1 · Async correctness · Sync-over-async (deadlock risk) through `.Wait(…)` · ×2
  • Sync-over-async (deadlock risk) through `.Wait(…)` engine/src/CodeHealth.Toolchain/Git/FileUniverse.cs:444 — `.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters).
  • Sync-over-async (deadlock risk) through `.Wait(…)` engine/src/Core/SourceCensus/IgnoredUntrackedPaths.cs:78 — `.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters).
X1 · Async correctness · Sync-over-async (deadlock risk) through `.Result` · ×2
  • Sync-over-async (deadlock risk) through `.Result` engine/src/CodeHealth.Toolchain/Git/FileUniverse.cs:450 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` engine/src/Core/SourceCensus/IgnoredUntrackedPaths.cs:84 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
X5 · Nullable reference types · Null guard scopes only part of the work it protects · ×2
  • Null guard scopes only part of the work it protects engine/src/Scanner/Accessibility/Accessibility.Shared/AccessibilityCards.cs:107 — This method contradicts itself about `unreadStrings`: line 72 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 107 then dereferences `unreadStrings` as `unreadStrings.Examples` AFTER the block has closed, where the guard no longer applies. A null `unreadStrings` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `unreadStrings` truly cannot be null by then, the guard above is misleading and should go.
  • Null guard scopes only part of the work it protects src/Kennel.Admin.Core/Admin/Services/CaiSubmissionRunner.cs:386 — This method contradicts itself about `verdict`: line 370 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 386 then dereferences `verdict` as `verdict.Accepted` AFTER the block has closed, where the guard no longer applies. A null `verdict` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `verdict` truly cannot be null by then, the guard above is misleading and should go.
D1 · Cyclomatic Complexity · DisclosurePolicyReading.Judge (cyclomatic 59) · ×1
  • DisclosurePolicyReading.Judge (cyclomatic 59) engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyReading.cs:50 — DisclosurePolicyReading.Judge has cyclomatic complexity 59 (threshold 15). Of this number, 58 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProgrammeTrackedFacts.Collect (cyclomatic 54) · ×1
  • ProgrammeTrackedFacts.Collect (cyclomatic 54) src/Kennel.Core/LanguageTraining/Services/ProgrammeTrackedFacts.cs:72 — ProgrammeTrackedFacts.Collect has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TurnRunner.RunTurnAsync (cyclomatic 54) · ×1
  • TurnRunner.RunTurnAsync (cyclomatic 54) src/Kennel.Improve.Orchestrator/Turns/TurnRunner.cs:196 — TurnRunner.RunTurnAsync has cyclomatic complexity 54 (threshold 15). Of this number, 51 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Builder.ParseMarkdown (cyclomatic 52) · ×1
  • Builder.ParseMarkdown (cyclomatic 52) engine/src/Scanner/Docs/D19/MarkupDocument.cs:206 — Builder.ParseMarkdown 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 · ComplianceContractsBackfill.SurveyAsync (cyclomatic 51) · ×1
  • ComplianceContractsBackfill.SurveyAsync (cyclomatic 51) src/Kennel.Core/Compliance/Application/ComplianceContractsBackfill.cs:75 — ComplianceContractsBackfill.SurveyAsync 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 · CiTestGateSites.Js (cyclomatic 50) · ×1
  • CiTestGateSites.Js (cyclomatic 50) engine/src/Scanner/Readiness/P12/CiTestGateSites.cs:350 — CiTestGateSites.Js has cyclomatic complexity 50 (threshold 15). Of this number, 31 points are the body's own statements and 19 belong to 9 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsSinkReader.Kind (cyclomatic 50) · ×1
  • JsSinkReader.Kind (cyclomatic 50) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1029 — JsSinkReader.Kind 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 · DocumentationShape.Judge (cyclomatic 46) · ×1
  • DocumentationShape.Judge (cyclomatic 46) engine/src/Scanner/Docs/D19/DocumentationShape.cs:109 — DocumentationShape.Judge has cyclomatic complexity 46 (threshold 15). Of this number, 36 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ShellGate.JudgeAsync (cyclomatic 46) · ×1
  • ShellGate.JudgeAsync (cyclomatic 46) src/Kennel.Improve.Orchestrator/Gates/ShellGate.cs:99 — ShellGate.JudgeAsync has cyclomatic complexity 46 (threshold 15). Of this number, 44 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DomainInfraEdgesTs.SourceEdges (cyclomatic 45) · ×1
  • DomainInfraEdgesTs.SourceEdges (cyclomatic 45) engine/src/Scanner/ModelAware/DM6/DomainInfraEdgesTs.cs:231 — DomainInfraEdgesTs.SourceEdges has cyclomatic complexity 45 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Model.AnswersOnlyConstants (cyclomatic 45) · ×1
  • Model.AnswersOnlyConstants (cyclomatic 45) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1322 — Model.AnswersOnlyConstants has cyclomatic complexity 45 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JsInventory.Select (cyclomatic 42) · ×1
  • JsInventory.Select (cyclomatic 42) engine/src/Scanner/Readiness/P12/JsInventory.cs:346 — JsInventory.Select 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 · JsSinkReader.Chain (cyclomatic 41) · ×1
  • JsSinkReader.Chain (cyclomatic 41) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1161 — JsSinkReader.Chain 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 · CleartextTransmissionScan.Lex (cyclomatic 41) · ×1
  • CleartextTransmissionScan.Lex (cyclomatic 41) engine/src/Scanner/Security/D29/Scanners/CleartextTransmissionScan.cs:831 — CleartextTransmissionScan.Lex 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 · AdrRecordIntegrity.Parse (cyclomatic 40) · ×1
  • AdrRecordIntegrity.Parse (cyclomatic 40) engine/src/Scanner/Docs/D20/AdrRecordIntegrity.cs:558 — AdrRecordIntegrity.Parse has cyclomatic complexity 40 (threshold 15). Of this number, 38 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsSinkReader.IndexFunctions (cyclomatic 38) · ×1
  • JsSinkReader.IndexFunctions (cyclomatic 38) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:482 — JsSinkReader.IndexFunctions has cyclomatic complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Builder.ParseRst (cyclomatic 37) · ×1
  • Builder.ParseRst (cyclomatic 37) engine/src/Scanner/Docs/D19/MarkupDocument.cs:469 — Builder.ParseRst has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DocumentReader.CheckPackageManager (cyclomatic 37) · ×1
  • DocumentReader.CheckPackageManager (cyclomatic 37) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1175 — DocumentReader.CheckPackageManager has cyclomatic complexity 37 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExecutiveBrief.Input (cyclomatic 36) · ×1
  • ExecutiveBrief.Input (cyclomatic 36) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:986 — ExecutiveBrief.Input 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 · SliceModuleSites.DeclarationAt (cyclomatic 36) · ×1
  • SliceModuleSites.DeclarationAt (cyclomatic 36) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:342 — SliceModuleSites.DeclarationAt has cyclomatic complexity 36 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ModuleReferenceScanner.Mask (cyclomatic 36) · ×1
  • ModuleReferenceScanner.Mask (cyclomatic 36) engine/src/Core/ArchitectureContracts/ModuleReferences.cs:220 — ModuleReferenceScanner.Mask 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 · ExecutiveBrief.Paragraph2 (cyclomatic 35) · ×1
  • ExecutiveBrief.Paragraph2 (cyclomatic 35) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:173 — ExecutiveBrief.Paragraph2 has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DocumentReader.CheckCommand (cyclomatic 35) · ×1
  • DocumentReader.CheckCommand (cyclomatic 35) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:888 — DocumentReader.CheckCommand has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DocumentReader.PathCandidate (cyclomatic 35) · ×1
  • DocumentReader.PathCandidate (cyclomatic 35) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1656 — DocumentReader.PathCandidate has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CiTestCommands.ResolveSegment (cyclomatic 35) · ×1
  • CiTestCommands.ResolveSegment (cyclomatic 35) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:89 — CiTestCommands.ResolveSegment has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · JsSinkReader.Read (cyclomatic 35) · ×1
  • JsSinkReader.Read (cyclomatic 35) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:561 — JsSinkReader.Read 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 · ScriptBlockingScan.Scan (cyclomatic 35) · ×1
  • ScriptBlockingScan.Scan (cyclomatic 35) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:107 — ScriptBlockingScan.Scan has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignComplianceScan.ReadPythonAccessControl (cyclomatic 34) · ×1
  • ForeignComplianceScan.ReadPythonAccessControl (cyclomatic 34) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.PythonAccessControl.cs:39 — ForeignComplianceScan.ReadPythonAccessControl has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.ReadKotlinBrace (cyclomatic 34) · ×1
  • ForeignDocumentWalkScan.ReadKotlinBrace (cyclomatic 34) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:735 — ForeignDocumentWalkScan.ReadKotlinBrace has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RouteAuthorizationScan.Next (cyclomatic 34) · ×1
  • RouteAuthorizationScan.Next (cyclomatic 34) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:338 — RouteAuthorizationScan.Next has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NamingPopulation.AddType (cyclomatic 34) · ×1
  • NamingPopulation.AddType (cyclomatic 34) engine/src/Core/Naming/NamingPopulation.cs:179 — NamingPopulation.AddType has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MarkupCodeSpans.Spans (cyclomatic 34) · ×1
  • MarkupCodeSpans.Spans (cyclomatic 34) engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupCodeSpans.cs:111 — MarkupCodeSpans.Spans has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SyscallConfinementAnalyzer.Judge (cyclomatic 33) · ×1
  • SyscallConfinementAnalyzer.Judge (cyclomatic 33) engine/src/Scanner/SecurityPosture/D41/SyscallConfinementAnalyzer.cs:152 — SyscallConfinementAnalyzer.Judge has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DocumentReader.Read (cyclomatic 33) · ×1
  • DocumentReader.Read (cyclomatic 33) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:461 — DocumentReader.Read 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 · ForeignWebSecurityScan.ReadNodeKdfCost (cyclomatic 33) · ×1
  • ForeignWebSecurityScan.ReadNodeKdfCost (cyclomatic 33) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.PasswordStorage.cs:280 — ForeignWebSecurityScan.ReadNodeKdfCost 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 · ForeignWebSecurityScan.ReadPlaintextPasswordComparison (cyclomatic 33) · ×1
  • ForeignWebSecurityScan.ReadPlaintextPasswordComparison (cyclomatic 33) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.PasswordStorage.cs:413 — ForeignWebSecurityScan.ReadPlaintextPasswordComparison has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Model.Index (cyclomatic 33) · ×1
  • Model.Index (cyclomatic 33) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:822 — Model.Index has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TrainingCensusBackfill.SurveyAsync (cyclomatic 33) · ×1
  • TrainingCensusBackfill.SurveyAsync (cyclomatic 33) src/Kennel.Core/LanguageTraining/Application/TrainingCensusBackfill.cs:34 — TrainingCensusBackfill.SurveyAsync has cyclomatic complexity 33 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExecutiveBrief.Paragraph1 (cyclomatic 32) · ×1
  • ExecutiveBrief.Paragraph1 (cyclomatic 32) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:45 — ExecutiveBrief.Paragraph1 has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExecutiveBrief.Paragraph3 (cyclomatic 32) · ×1
  • ExecutiveBrief.Paragraph3 (cyclomatic 32) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:274 — ExecutiveBrief.Paragraph3 has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CiTestGateSites.DotNet (cyclomatic 32) · ×1
  • CiTestGateSites.DotNet (cyclomatic 32) engine/src/Scanner/Readiness/P12/CiTestGateSites.cs:137 — CiTestGateSites.DotNet has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScriptBlockingScan.Scopes (cyclomatic 32) · ×1
  • ScriptBlockingScan.Scopes (cyclomatic 32) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:382 — ScriptBlockingScan.Scopes has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PagesDeployWorkflow.PublishedBy (cyclomatic 32) · ×1
  • PagesDeployWorkflow.PublishedBy (cyclomatic 32) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PagesDeployWorkflow.cs:192 — PagesDeployWorkflow.PublishedBy has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 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 · JsUnusedDeclarations.InitializerIsAValue (cyclomatic 32) · ×1
  • JsUnusedDeclarations.InitializerIsAValue (cyclomatic 32) engine/src/Core/Frontend/JsUnusedDeclarations.cs:612 — JsUnusedDeclarations.InitializerIsAValue has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ReportViewModelFactory.BuildBriefFacts (cyclomatic 31) · ×1
  • ReportViewModelFactory.BuildBriefFacts (cyclomatic 31) engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:457 — ReportViewModelFactory.BuildBriefFacts has cyclomatic complexity 31 (threshold 15). Of this number, 24 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ForeignDeadBranchScan.CopyKotlinLiteral (cyclomatic 31) · ×1
  • ForeignDeadBranchScan.CopyKotlinLiteral (cyclomatic 31) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:627 — ForeignDeadBranchScan.CopyKotlinLiteral 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 · Model.IsConstantSpan (cyclomatic 31) · ×1
  • Model.IsConstantSpan (cyclomatic 31) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1423 — Model.IsConstantSpan has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RoslynDuplicationDetector.TrimToSharedLines (cyclomatic 31) · ×1
  • RoslynDuplicationDetector.TrimToSharedLines (cyclomatic 31) engine/src/Core/CodeShape/RoslynDuplicationDetector.ExactSpan.cs:51 — RoslynDuplicationDetector.TrimToSharedLines 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 · NativeSecretScanner.CryptoKeyBindingType (cyclomatic 31) · ×1
  • NativeSecretScanner.CryptoKeyBindingType (cyclomatic 31) engine/src/Core/Security/NativeSecretScanner.CryptographicKey.cs:86 — NativeSecretScanner.CryptoKeyBindingType 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 · CommentRedundancy.JudgeAsync (cyclomatic 30) · ×1
  • CommentRedundancy.JudgeAsync (cyclomatic 30) engine/src/Scanner/Docs/D24/CommentRedundancy.cs:156 — CommentRedundancy.JudgeAsync has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CiTestCommands.PackageScript (cyclomatic 30) · ×1
  • CiTestCommands.PackageScript (cyclomatic 30) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:230 — CiTestCommands.PackageScript 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 · Builder.ParseAsciiDoc (cyclomatic 29) · ×1
  • Builder.ParseAsciiDoc (cyclomatic 29) engine/src/Scanner/Docs/D19/MarkupDocument.cs:691 — Builder.ParseAsciiDoc 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 · CommentRedundancy.Judge (cyclomatic 29) · ×1
  • CommentRedundancy.Judge (cyclomatic 29) engine/src/Scanner/Docs/D24/CommentRedundancy.cs:324 — CommentRedundancy.Judge has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DocumentReader.CheckDotnet (cyclomatic 29) · ×1
  • DocumentReader.CheckDotnet (cyclomatic 29) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:973 — DocumentReader.CheckDotnet has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DocMeasuredClaims.Satisfies (cyclomatic 29) · ×1
  • DocMeasuredClaims.Satisfies (cyclomatic 29) engine/src/Scanner/Maturity/M4/DocMeasuredClaims.cs:152 — DocMeasuredClaims.Satisfies 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 · DisposalDutyAnalyzer.InspectOverwrittenOwnedField (cyclomatic 29) · ×1
  • DisposalDutyAnalyzer.InspectOverwrittenOwnedField (cyclomatic 29) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:1101 — DisposalDutyAnalyzer.InspectOverwrittenOwnedField has cyclomatic complexity 29 (threshold 15). Of this number, 24 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDisposalDutyScan.InspectKotlin (cyclomatic 29) · ×1
  • ForeignDisposalDutyScan.InspectKotlin (cyclomatic 29) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:98 — ForeignDisposalDutyScan.InspectKotlin has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · TypeClasses.Classify (cyclomatic 29) · ×1
  • TypeClasses.Classify (cyclomatic 29) engine/src/Core/Naming/TypeClasses.cs:77 — TypeClasses.Classify has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · Builder.Walk (cyclomatic 29) · ×1
  • Builder.Walk (cyclomatic 29) engine/src/Core/Roslyn/CodeModel/ReferenceIndex.cs:303 — Builder.Walk has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · PersonalNotificationsBackfill.SurveyAsync (cyclomatic 29) · ×1
  • PersonalNotificationsBackfill.SurveyAsync (cyclomatic 29) src/Kennel.Core/Accounts/Application/PersonalNotificationsBackfill.cs:48 — PersonalNotificationsBackfill.SurveyAsync has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DependencyCheck.Evaluate (cyclomatic 29) · ×1
  • DependencyCheck.Evaluate (cyclomatic 29) src/Kennel.Watchdog.Core/Agents/ModuleGraph/DependencyCheck.cs:120 — DependencyCheck.Evaluate has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EnvironmentCrossing.Read (cyclomatic 28) · ×1
  • EnvironmentCrossing.Read (cyclomatic 28) engine/src/Scanner/LlmJudgedLanguage/LA4/EnvironmentCrossing.cs:47 — EnvironmentCrossing.Read has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProjectSeams.Of (cyclomatic 28) · ×1
  • ProjectSeams.Of (cyclomatic 28) engine/src/Scanner/Architecture/D26/ProjectSeams.cs:94 — ProjectSeams.Of has cyclomatic complexity 28 (threshold 15). Of this number, 22 points are the body's own statements and 6 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DocumentReader.CheckPackageVersions (cyclomatic 28) · ×1
  • DocumentReader.CheckPackageVersions (cyclomatic 28) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:2047 — DocumentReader.CheckPackageVersions has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KotlinShape.ReadFun (cyclomatic 28) · ×1
  • KotlinShape.ReadFun (cyclomatic 28) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:321 — KotlinShape.ReadFun 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 · ForeignReleaseGuardScan.KotlinFunHead (cyclomatic 28) · ×1
  • ForeignReleaseGuardScan.KotlinFunHead (cyclomatic 28) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:206 — ForeignReleaseGuardScan.KotlinFunHead has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DomainInfraEdgesTs.StatementSpecifier (cyclomatic 28) · ×1
  • DomainInfraEdgesTs.StatementSpecifier (cyclomatic 28) engine/src/Scanner/ModelAware/DM6/DomainInfraEdgesTs.cs:480 — DomainInfraEdgesTs.StatementSpecifier has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NativeSecretScanner.HardcodedCredentialType (cyclomatic 28) · ×1
  • NativeSecretScanner.HardcodedCredentialType (cyclomatic 28) engine/src/Core/Security/NativeSecretScanner.HardcodedCredential.cs:553 — NativeSecretScanner.HardcodedCredentialType has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SecurityDisclosuresBackfill.SurveyAsync (cyclomatic 28) · ×1
  • SecurityDisclosuresBackfill.SurveyAsync (cyclomatic 28) src/Kennel.Watchdog.Core/Agents/Application/SecurityDisclosuresBackfill.cs:38 — SecurityDisclosuresBackfill.SurveyAsync 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 · AdrProhibitionConformance.FromSentence (cyclomatic 27) · ×1
  • AdrProhibitionConformance.FromSentence (cyclomatic 27) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:319 — AdrProhibitionConformance.FromSentence has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AdrProhibitionConformance.Blank (cyclomatic 27) · ×1
  • AdrProhibitionConformance.Blank (cyclomatic 27) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:988 — AdrProhibitionConformance.Blank 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 · DocumentReader.ReadSpan (cyclomatic 27) · ×1
  • DocumentReader.ReadSpan (cyclomatic 27) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:668 — DocumentReader.ReadSpan 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 · ForeignExceptionHandlingScan.DiscardingFunction (cyclomatic 27) · ×1
  • ForeignExceptionHandlingScan.DiscardingFunction (cyclomatic 27) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Js.cs:258 — ForeignExceptionHandlingScan.DiscardingFunction has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ScriptBlockingScan.SpinsOnACallbackFlag (cyclomatic 27) · ×1
  • ScriptBlockingScan.SpinsOnACallbackFlag (cyclomatic 27) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:230 — ScriptBlockingScan.SpinsOnACallbackFlag has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PlaywrightNodeRenderer.RenderAsync (cyclomatic 27) · ×1
  • PlaywrightNodeRenderer.RenderAsync (cyclomatic 27) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PlaywrightNodeRenderer.cs:58 — PlaywrightNodeRenderer.RenderAsync has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProductComplianceBackfill.SurveyAsync (cyclomatic 27) · ×1
  • ProductComplianceBackfill.SurveyAsync (cyclomatic 27) src/Kennel.Core/Compliance/Application/ProductComplianceBackfill.cs:31 — ProductComplianceBackfill.SurveyAsync has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AdrRecordIntegrity.Body (cyclomatic 26) · ×1
  • AdrRecordIntegrity.Body (cyclomatic 26) engine/src/Scanner/Docs/D20/AdrRecordIntegrity.cs:725 — AdrRecordIntegrity.Body has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DocumentReader.CheckNodeVersion (cyclomatic 26) · ×1
  • DocumentReader.CheckNodeVersion (cyclomatic 26) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1962 — DocumentReader.CheckNodeVersion has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ForeignReleaseGuardScan.PhpFunctionHead (cyclomatic 26) · ×1
  • ForeignReleaseGuardScan.PhpFunctionHead (cyclomatic 26) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Php.cs:126 — ForeignReleaseGuardScan.PhpFunctionHead has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JsSinkReader.MarkupBuilders (cyclomatic 26) · ×1
  • JsSinkReader.MarkupBuilders (cyclomatic 26) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:258 — JsSinkReader.MarkupBuilders has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · BoundaryCouplingDetector.PublicSurfaceTypes (cyclomatic 26) · ×1
  • BoundaryCouplingDetector.PublicSurfaceTypes (cyclomatic 26) engine/src/Core/Architecture/BoundaryCouplingDetector.cs:577 — BoundaryCouplingDetector.PublicSurfaceTypes has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · EslintBoundariesRules.Parse (cyclomatic 26) · ×1
  • EslintBoundariesRules.Parse (cyclomatic 26) engine/src/Core/Frontend/EslintBoundariesRules.cs:202 — EslintBoundariesRules.Parse has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · follow_slot.main (cyclomatic 26) · ×1
  • follow_slot.main (cyclomatic 26) tools/improve/follow_slot.py:100 — follow_slot.main 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 · kennel-onboarding.initReportSetup (cyclomatic 26) · ×1
  • kennel-onboarding.initReportSetup (cyclomatic 26) src/Kennel.Ui/wwwroot/kennel-onboarding.js:47 — kennel-onboarding.initReportSetup has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 76, 50, 71, …). 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 · IncompletenessAnalyzer.ForeignLogStatementEnd (cyclomatic 25) · ×1
  • IncompletenessAnalyzer.ForeignLogStatementEnd (cyclomatic 25) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScriptInert.cs:75 — IncompletenessAnalyzer.ForeignLogStatementEnd has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · IncompletenessAnalyzer.ReturnsAPlainValue (cyclomatic 25) · ×1
  • IncompletenessAnalyzer.ReturnsAPlainValue (cyclomatic 25) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScriptInert.cs:128 — IncompletenessAnalyzer.ReturnsAPlainValue has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SliceModuleSites.StatementEnd (cyclomatic 25) · ×1
  • SliceModuleSites.StatementEnd (cyclomatic 25) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:144 — SliceModuleSites.StatementEnd has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SliceModuleSites.Uses (cyclomatic 25) · ×1
  • SliceModuleSites.Uses (cyclomatic 25) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:273 — SliceModuleSites.Uses 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 · ForeignWebSecurityScan.ServerMadeAt (cyclomatic 25) · ×1
  • ForeignWebSecurityScan.ServerMadeAt (cyclomatic 25) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.NodeTransport.cs:169 — ForeignWebSecurityScan.ServerMadeAt 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 · ForeignComplianceScan.ReadSwiftRetention (cyclomatic 25) · ×1
  • ForeignComplianceScan.ReadSwiftRetention (cyclomatic 25) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.SwiftRetention.cs:28 — ForeignComplianceScan.ReadSwiftRetention has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · BlockingOnAsyncSites.Invocation (cyclomatic 25) · ×1
  • BlockingOnAsyncSites.Invocation (cyclomatic 25) engine/src/Scanner/Defects/X1/BlockingOnAsyncSites.cs:72 — BlockingOnAsyncSites.Invocation has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ShredderWritePath.Build (cyclomatic 25) · ×1
  • ShredderWritePath.Build (cyclomatic 25) engine/src/Scanner/ModelAware/ES3/ShredderWritePath.cs:41 — ShredderWritePath.Build has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Lexed.FunctionNameOfBody (cyclomatic 25) · ×1
  • Lexed.FunctionNameOfBody (cyclomatic 25) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:706 — Lexed.FunctionNameOfBody 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 · PostPromoteView.For (cyclomatic 25) · ×1
  • PostPromoteView.For (cyclomatic 25) src/Kennel.Admin.Core/Admin/Services/PostPromoteView.cs:135 — PostPromoteView.For has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IncompletenessAnalyzer.ForeignTrivialValueEnd (cyclomatic 24) · ×1
  • IncompletenessAnalyzer.ForeignTrivialValueEnd (cyclomatic 24) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScript.cs:450 — IncompletenessAnalyzer.ForeignTrivialValueEnd has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignComplianceScan.ReadCSharpEntity (cyclomatic 24) · ×1
  • ForeignComplianceScan.ReadCSharpEntity (cyclomatic 24) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:171 — ForeignComplianceScan.ReadCSharpEntity 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 · ChangelogNarrationBackfill.SurveyPageAsync (cyclomatic 24) · ×1
  • ChangelogNarrationBackfill.SurveyPageAsync (cyclomatic 24) src/Kennel.Watchdog.Core/Reporting/Application/ChangelogNarrationBackfill.cs:118 — ChangelogNarrationBackfill.SurveyPageAsync 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 · TurnGate.CheckAsync (cyclomatic 24) · ×1
  • TurnGate.CheckAsync (cyclomatic 24) src/Kennel.Improve.Orchestrator/Gates/TurnGate.cs:342 — TurnGate.CheckAsync has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · backlog-drop-unreachable.verified_cohort (cyclomatic 24) · ×1
  • backlog-drop-unreachable.verified_cohort (cyclomatic 24) tools/ops/backlog-drop-unreachable.py:254 — backlog-drop-unreachable.verified_cohort 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 · catalog-digest.main (cyclomatic 24) · ×1
  • catalog-digest.main (cyclomatic 24) tools/rubric/catalog-digest.py:87 — catalog-digest.main 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 · ExecutiveBrief.Problems (cyclomatic 23) · ×1
  • ExecutiveBrief.Problems (cyclomatic 23) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:1185 — ExecutiveBrief.Problems 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. This is NOT this file's highest cyclomatic complexity: ExecutiveBrief.CriticalPlan (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · LicenceEvidence.ManifestDeclaration (cyclomatic 23) · ×1
  • LicenceEvidence.ManifestDeclaration (cyclomatic 23) engine/src/Scanner/Docs/D19/LicenceEvidence.cs:121 — LicenceEvidence.ManifestDeclaration has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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 · CommentValueAnalyzer.Card (cyclomatic 23) · ×1
  • CommentValueAnalyzer.Card (cyclomatic 23) engine/src/Scanner/Docs/D24/CommentValueAnalyzer.cs:59 — CommentValueAnalyzer.Card 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 · SliceModuleSites.ForeignImports (cyclomatic 23) · ×1
  • SliceModuleSites.ForeignImports (cyclomatic 23) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:81 — SliceModuleSites.ForeignImports 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 · ForeignUntrustedLengthScan.IsForCounterTest (cyclomatic 23) · ×1
  • ForeignUntrustedLengthScan.IsForCounterTest (cyclomatic 23) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.cs:648 — ForeignUntrustedLengthScan.IsForCounterTest has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.KotlinParameterIn (cyclomatic 23) · ×1
  • ForeignDocumentWalkScan.KotlinParameterIn (cyclomatic 23) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:869 — ForeignDocumentWalkScan.KotlinParameterIn 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 · JsSinkReader.Handler (cyclomatic 23) · ×1
  • JsSinkReader.Handler (cyclomatic 23) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:674 — JsSinkReader.Handler has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MutationIdempotencyAnalyzer.AccumulationOrGrowth (cyclomatic 23) · ×1
  • MutationIdempotencyAnalyzer.AccumulationOrGrowth (cyclomatic 23) engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.Evidence.cs:618 — MutationIdempotencyAnalyzer.AccumulationOrGrowth has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RouteAuthorizationScan.ExpressAndFastify (cyclomatic 23) · ×1
  • RouteAuthorizationScan.ExpressAndFastify (cyclomatic 23) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:176 — RouteAuthorizationScan.ExpressAndFastify has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Model.ScopeGuardsBefore (cyclomatic 23) · ×1
  • Model.ScopeGuardsBefore (cyclomatic 23) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:984 — Model.ScopeGuardsBefore has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Model.SessionGate (cyclomatic 23) · ×1
  • Model.SessionGate (cyclomatic 23) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1270 — Model.SessionGate has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ApplePackageManagerPresence.LockResolvesOnlyOwnLibrary (cyclomatic 23) · ×1
  • ApplePackageManagerPresence.LockResolvesOnlyOwnLibrary (cyclomatic 23) engine/src/Core/Dependencies/ApplePackageManagerPresence.cs:162 — ApplePackageManagerPresence.LockResolvesOnlyOwnLibrary 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 · AdrRulesBlock.Parse (cyclomatic 23) · ×1
  • AdrRulesBlock.Parse (cyclomatic 23) engine/src/Core/Adr/AdrRulesBlock.cs:95 — AdrRulesBlock.Parse 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 · CoverletCoverageCollector.CollectUncachedAsync (cyclomatic 23) · ×1
  • CoverletCoverageCollector.CollectUncachedAsync (cyclomatic 23) engine/src/Core/Testing/CoverletCoverageCollector.cs:83 — CoverletCoverageCollector.CollectUncachedAsync 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 · JsUnusedDeclarations.TopLevelDeclarationName (cyclomatic 23) · ×1
  • JsUnusedDeclarations.TopLevelDeclarationName (cyclomatic 23) engine/src/Core/Frontend/JsUnusedDeclarations.cs:563 — JsUnusedDeclarations.TopLevelDeclarationName has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CorpusKeyService.VerdictRefusal (cyclomatic 23) · ×1
  • CorpusKeyService.VerdictRefusal (cyclomatic 23) src/Kennel.Core/LanguageTraining/Services/CorpusKeyService.cs:272 — CorpusKeyService.VerdictRefusal 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 · UnifiedDiff.Parse (cyclomatic 23) · ×1
  • UnifiedDiff.Parse (cyclomatic 23) src/Kennel.Watchdog.Core/Agents/ModuleGraph/UnifiedDiff.cs:25 — UnifiedDiff.Parse 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 · Closer.Plan (cyclomatic 23) · ×1
  • Closer.Plan (cyclomatic 23) src/Kennel.Improve.Orchestrator/Turns/Closer.cs:51 — Closer.Plan has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SecurityTxtReading.Judge (cyclomatic 22) · ×1
  • SecurityTxtReading.Judge (cyclomatic 22) engine/src/Scanner/LlmJudgedLanguage/LA3/SecurityTxtReading.cs:19 — SecurityTxtReading.Judge 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 · AdrProhibitionConformance.ReadManifests (cyclomatic 22) · ×1
  • AdrProhibitionConformance.ReadManifests (cyclomatic 22) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:1138 — AdrProhibitionConformance.ReadManifests 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 · IncompletenessAnalyzer.DisabledCodeAndPlaceholderRows (cyclomatic 22) · ×1
  • IncompletenessAnalyzer.DisabledCodeAndPlaceholderRows (cyclomatic 22) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Phases.cs:490 — IncompletenessAnalyzer.DisabledCodeAndPlaceholderRows has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DocInventory.ReadRouteStrings (cyclomatic 22) · ×1
  • DocInventory.ReadRouteStrings (cyclomatic 22) engine/src/Scanner/Maturity/M4/DocInventory.cs:451 — DocInventory.ReadRouteStrings 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 · ForeignWebSecurityScan.MaskElixirBody (cyclomatic 22) · ×1
  • ForeignWebSecurityScan.MaskElixirBody (cyclomatic 22) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:198 — ForeignWebSecurityScan.MaskElixirBody has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JsInventory.Collects (cyclomatic 22) · ×1
  • JsInventory.Collects (cyclomatic 22) engine/src/Scanner/Readiness/P12/JsInventory.cs:251 — JsInventory.Collects has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · KotlinShape.DeclaresAType (cyclomatic 22) · ×1
  • KotlinShape.DeclaresAType (cyclomatic 22) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:502 — KotlinShape.DeclaresAType has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PhpShape.Classify (cyclomatic 22) · ×1
  • PhpShape.Classify (cyclomatic 22) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:880 — PhpShape.Classify has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignScopedGlobalMutationScan.PhpReads (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignUntrustedLengthScan.FindDartSpendSite (cyclomatic 22) · ×1
  • ForeignUntrustedLengthScan.FindDartSpendSite (cyclomatic 22) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:280 — ForeignUntrustedLengthScan.FindDartSpendSite has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CSharpSinkReader.Invocation (cyclomatic 22) · ×1
  • CSharpSinkReader.Invocation (cyclomatic 22) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:398 — CSharpSinkReader.Invocation has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RouteAuthorizationScan.Nest (cyclomatic 22) · ×1
  • RouteAuthorizationScan.Nest (cyclomatic 22) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:280 — RouteAuthorizationScan.Nest has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModalDialogFocus.Check (cyclomatic 22) · ×1
  • ModalDialogFocus.Check (cyclomatic 22) engine/src/Scanner/Accessibility/AC4/ModalDialogFocus.cs:73 — ModalDialogFocus.Check has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CssRules.Blank (cyclomatic 22) · ×1
  • CssRules.Blank (cyclomatic 22) engine/src/Scanner/Accessibility/AC6/CssRules.cs:34 — CssRules.Blank 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 · MarkupContexts.TagState (cyclomatic 22) · ×1
  • MarkupContexts.TagState (cyclomatic 22) engine/src/Core/MarkupOutput/MarkupContexts.cs:159 — MarkupContexts.TagState 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 · UiReadsViewModelsOnlyAnalyzer.Banned (cyclomatic 22) · ×1
  • UiReadsViewModelsOnlyAnalyzer.Banned (cyclomatic 22) src/Kennel.Analyzers/UiReadsViewModelsOnlyAnalyzer.cs:209 — UiReadsViewModelsOnlyAnalyzer.Banned has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Options.Parse (cyclomatic 22) · ×1
  • Options.Parse (cyclomatic 22) src/Kennel.Improve.Orchestrator/Program.cs:483 — Options.Parse has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · kennel-verb.main (cyclomatic 22) · ×1
  • kennel-verb.main (cyclomatic 22) tools/ops/kennel-verb.py:42 — kennel-verb.main 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 · DockerImages.Read (cyclomatic 21) · ×1
  • DockerImages.Read (cyclomatic 21) engine/src/Scanner/LlmJudgedLanguage/LA4/DockerImages.cs:140 — DockerImages.Read has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeadingLabelQualityAnalyzer.Judge (cyclomatic 21) · ×1
  • HeadingLabelQualityAnalyzer.Judge (cyclomatic 21) engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:141 — HeadingLabelQualityAnalyzer.Judge has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PnpmLock.Read (cyclomatic 21) · ×1
  • PnpmLock.Read (cyclomatic 21) engine/src/Scanner/Dependencies/D12/NpmDeprecatedDependencies.cs:427 — PnpmLock.Read 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 · DocumentationShape.AddEmptySections (cyclomatic 21) · ×1
  • DocumentationShape.AddEmptySections (cyclomatic 21) engine/src/Scanner/Docs/D19/DocumentationShape.cs:687 — DocumentationShape.AddEmptySections has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IncompletenessAnalyzer.ForeignJsxEmptyHandlerRows (cyclomatic 21) · ×1
  • IncompletenessAnalyzer.ForeignJsxEmptyHandlerRows (cyclomatic 21) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScriptInert.cs:475 — IncompletenessAnalyzer.ForeignJsxEmptyHandlerRows has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignWebSecurityScan.IsLiteralFilledBuffer (cyclomatic 21) · ×1
  • ForeignWebSecurityScan.IsLiteralFilledBuffer (cyclomatic 21) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:1011 — ForeignWebSecurityScan.IsLiteralFilledBuffer has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JsInventory.ReadPackage (cyclomatic 21) · ×1
  • JsInventory.ReadPackage (cyclomatic 21) engine/src/Scanner/Readiness/P12/JsInventory.cs:94 — JsInventory.ReadPackage 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 · DisposalDutyAnalyzer.CallerReachingItLive (cyclomatic 21) · ×1
  • DisposalDutyAnalyzer.CallerReachingItLive (cyclomatic 21) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:1175 — DisposalDutyAnalyzer.CallerReachingItLive has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignCancellationScan.DartRequest (cyclomatic 21) · ×1
  • ForeignCancellationScan.DartRequest (cyclomatic 21) engine/src/Scanner/Defects/X2/ForeignCancellationScan.Dart.cs:165 — ForeignCancellationScan.DartRequest has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.DartShadowed (cyclomatic 21) · ×1
  • ForeignDocumentWalkScan.DartShadowed (cyclomatic 21) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:682 — ForeignDocumentWalkScan.DartShadowed has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MutationIdempotencyAnalyzer.IsConditionalOnState (cyclomatic 21) · ×1
  • MutationIdempotencyAnalyzer.IsConditionalOnState (cyclomatic 21) engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.Evidence.cs:990 — MutationIdempotencyAnalyzer.IsConditionalOnState has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ScriptBlockingScan.BlockAfterParameters (cyclomatic 21) · ×1
  • ScriptBlockingScan.BlockAfterParameters (cyclomatic 21) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:497 — ScriptBlockingScan.BlockAfterParameters 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 · PerformanceScan.CollectAsyncSitesAsync (cyclomatic 21) · ×1
  • PerformanceScan.CollectAsyncSitesAsync (cyclomatic 21) engine/src/Scanner/ModelAware/ModelAware.Prework/PerformanceScan.cs:373 — PerformanceScan.CollectAsyncSitesAsync has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · DomainInfraEdgesTs.IsMethodDeclaration (cyclomatic 21) · ×1
  • DomainInfraEdgesTs.IsMethodDeclaration (cyclomatic 21) engine/src/Scanner/ModelAware/DM6/DomainInfraEdgesTs.cs:447 — DomainInfraEdgesTs.IsMethodDeclaration has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Model.NextMiddlewareCovers (cyclomatic 21) · ×1
  • Model.NextMiddlewareCovers (cyclomatic 21) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1099 — Model.NextMiddlewareCovers has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MarkupText.Append (cyclomatic 21) · ×1
  • MarkupText.Append (cyclomatic 21) engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupText.cs:144 — MarkupText.Append 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 · JsUnusedDeclarations.DeclaredPrivateMembers (cyclomatic 21) · ×1
  • JsUnusedDeclarations.DeclaredPrivateMembers (cyclomatic 21) engine/src/Core/Frontend/JsUnusedDeclarations.cs:192 — JsUnusedDeclarations.DeclaredPrivateMembers 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 · BacklogBackfill.SurveyAsync (cyclomatic 21) · ×1
  • BacklogBackfill.SurveyAsync (cyclomatic 21) src/Kennel.Core/LanguageTraining/Application/BacklogBackfill.cs:27 — BacklogBackfill.SurveyAsync has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MyQueueDocument.Cut (cyclomatic 21) · ×1
  • MyQueueDocument.Cut (cyclomatic 21) src/Kennel.Watchdog.Core/Scheduling/Pages/MyQueue/MyQueueDocument.cs:101 — MyQueueDocument.Cut has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 111, 131, 109, …). 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 · PackageSelector.Select (cyclomatic 21) · ×1
  • PackageSelector.Select (cyclomatic 21) src/Kennel.Improve.Orchestrator/Queue/PackageSelector.cs:25 — PackageSelector.Select has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 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 · KnowledgeInertShapes.IsOneIdentifierSubstitution (cyclomatic 20) · ×1
  • KnowledgeInertShapes.IsOneIdentifierSubstitution (cyclomatic 20) engine/src/CodeHealth.Toolchain/Git/KnowledgeInertShapes.cs:199 — KnowledgeInertShapes.IsOneIdentifierSubstitution 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 · AdrProhibitionConformance.DecisionSentences (cyclomatic 20) · ×1
  • AdrProhibitionConformance.DecisionSentences (cyclomatic 20) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:228 — AdrProhibitionConformance.DecisionSentences 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 · CodeIndex.Resolve (cyclomatic 20) · ×1
  • CodeIndex.Resolve (cyclomatic 20) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:631 — CodeIndex.Resolve has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SliceModuleSites.CollectBindings (cyclomatic 20) · ×1
  • SliceModuleSites.CollectBindings (cyclomatic 20) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:189 — SliceModuleSites.CollectBindings 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 · DocumentReader.CheckRoute (cyclomatic 20) · ×1
  • DocumentReader.CheckRoute (cyclomatic 20) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1380 — DocumentReader.CheckRoute has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DocumentReader.CheckLink (cyclomatic 20) · ×1
  • DocumentReader.CheckLink (cyclomatic 20) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1797 — DocumentReader.CheckLink has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignAsyncCorrectnessScan.KotlinFunBody (cyclomatic 20) · ×1
  • ForeignAsyncCorrectnessScan.KotlinFunBody (cyclomatic 20) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Kotlin.cs:133 — ForeignAsyncCorrectnessScan.KotlinFunBody 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. This is NOT this file's highest cyclomatic complexity: ForeignAsyncCorrectnessScan.KotlinBlockingCall (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · CancellationPropagationAnalyzer.JudgeMethod (cyclomatic 20) · ×1
  • CancellationPropagationAnalyzer.JudgeMethod (cyclomatic 20) engine/src/Scanner/Defects/X2/CancellationPropagationAnalyzer.cs:106 — CancellationPropagationAnalyzer.JudgeMethod 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 · MutationIdempotencyAnalyzer.IdentitySlots (cyclomatic 20) · ×1
  • MutationIdempotencyAnalyzer.IdentitySlots (cyclomatic 20) engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.Evidence.cs:417 — MutationIdempotencyAnalyzer.IdentitySlots 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 · EncapsulatedStateAnalyzer.AggregateOwnedChildEntities (cyclomatic 20) · ×1
  • EncapsulatedStateAnalyzer.AggregateOwnedChildEntities (cyclomatic 20) engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:483 — EncapsulatedStateAnalyzer.AggregateOwnedChildEntities has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Model.HandlesCredential (cyclomatic 20) · ×1
  • Model.HandlesCredential (cyclomatic 20) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1236 — Model.HandlesCredential has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SocketAndUpgradeRecheck.ClientSocketOnlyProbesAPort (cyclomatic 20) · ×1
  • SocketAndUpgradeRecheck.ClientSocketOnlyProbesAPort (cyclomatic 20) engine/src/Scanner/Security/Shared/Scanners/SocketAndUpgradeRecheck.cs:139 — SocketAndUpgradeRecheck.ClientSocketOnlyProbesAPort has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · NuGetPackageSites.Normalise (cyclomatic 20) · ×1
  • NuGetPackageSites.Normalise (cyclomatic 20) engine/src/Core/Dependencies/NuGetPackageSites.cs:406 — NuGetPackageSites.Normalise has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NuGetPackageSites.LockEntries (cyclomatic 20) · ×1
  • NuGetPackageSites.LockEntries (cyclomatic 20) engine/src/Core/Dependencies/NuGetPackageSites.cs:455 — NuGetPackageSites.LockEntries 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 · BoundaryCouplingDetector.ScanType (cyclomatic 20) · ×1
  • BoundaryCouplingDetector.ScanType (cyclomatic 20) engine/src/Core/Architecture/BoundaryCouplingDetector.cs:499 — BoundaryCouplingDetector.ScanType 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 · NativeSecretScanner.IsOpaqueCredentialValue (cyclomatic 20) · ×1
  • NativeSecretScanner.IsOpaqueCredentialValue (cyclomatic 20) engine/src/Core/Security/NativeSecretScanner.HardcodedCredential.cs:40 — NativeSecretScanner.IsOpaqueCredentialValue has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JsUnusedDeclarations.ParameterProperties (cyclomatic 20) · ×1
  • JsUnusedDeclarations.ParameterProperties (cyclomatic 20) engine/src/Core/Frontend/JsUnusedDeclarations.cs:333 — JsUnusedDeclarations.ParameterProperties 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 · EndpointAuthorizationScan.Check (cyclomatic 20) · ×1
  • EndpointAuthorizationScan.Check (cyclomatic 20) engine/src/Scanner/Security/Shared.CSharp/EndpointAuthorizationScan.cs:771 — EndpointAuthorizationScan.Check 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 · EventsBackfillRunner.RunAsync (cyclomatic 20) · ×1
  • EventsBackfillRunner.RunAsync (cyclomatic 20) src/Kennel.Hosting/Operations/EventsBackfillRunner.cs:22 — EventsBackfillRunner.RunAsync 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 · AccountPreferencesBackfill.SurveyAsync (cyclomatic 20) · ×1
  • AccountPreferencesBackfill.SurveyAsync (cyclomatic 20) src/Kennel.Core/Accounts/Application/AccountPreferencesBackfill.cs:44 — AccountPreferencesBackfill.SurveyAsync 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 · ProgrammeCyclesBackfill.SurveyAsync (cyclomatic 20) · ×1
  • ProgrammeCyclesBackfill.SurveyAsync (cyclomatic 20) src/Kennel.Core/LanguageTraining/Application/ProgrammeCyclesBackfill.cs:35 — ProgrammeCyclesBackfill.SurveyAsync has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · RepositoryStatesBackfill.SurveyAsync (cyclomatic 20) · ×1
  • RepositoryStatesBackfill.SurveyAsync (cyclomatic 20) src/Kennel.Core/Repositories/Application/RepositoryStatesBackfill.cs:38 — RepositoryStatesBackfill.SurveyAsync 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 · AssayCodebaseReader.CodebaseAsync (cyclomatic 20) · ×1
  • AssayCodebaseReader.CodebaseAsync (cyclomatic 20) src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/AssayCodebaseReader.cs:56 — AssayCodebaseReader.CodebaseAsync 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 · KennelOperatorCommands.ProjectionsAsync (cyclomatic 20) · ×1
  • KennelOperatorCommands.ProjectionsAsync (cyclomatic 20) src/Kennel.Infrastructure/Operations/KennelOperatorCommands.cs:87 — KennelOperatorCommands.ProjectionsAsync has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · backlog-drop-unreachable.main (cyclomatic 20) · ×1
  • backlog-drop-unreachable.main (cyclomatic 20) tools/ops/backlog-drop-unreachable.py:364 — backlog-drop-unreachable.main 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 · CheckoutFiles.Walk (cyclomatic 19) · ×1
  • CheckoutFiles.Walk (cyclomatic 19) engine/src/CodeHealth.Toolchain/Git/CheckoutFiles.cs:185 — CheckoutFiles.Walk 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 · DocumentReader.CheckProjectArgument (cyclomatic 19) · ×1
  • DocumentReader.CheckProjectArgument (cyclomatic 19) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1024 — DocumentReader.CheckProjectArgument 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 · DocumentReader.StatedRunFolder (cyclomatic 19) · ×1
  • DocumentReader.StatedRunFolder (cyclomatic 19) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1081 — DocumentReader.StatedRunFolder has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ElixirSource.LiteralValue (cyclomatic 19) · ×1
  • ElixirSource.LiteralValue (cyclomatic 19) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:867 — ElixirSource.LiteralValue has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignWebSecurityScan.RedirectsToComputedHttpsHost (cyclomatic 19) · ×1
  • ForeignWebSecurityScan.RedirectsToComputedHttpsHost (cyclomatic 19) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.NodeTransport.cs:426 — ForeignWebSecurityScan.RedirectsToComputedHttpsHost has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DotNetTestInventory.TestsIn (cyclomatic 19) · ×1
  • DotNetTestInventory.TestsIn (cyclomatic 19) engine/src/Scanner/Readiness/P12/DotNetTestInventory.cs:249 — DotNetTestInventory.TestsIn has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · DisposalDutyAnalyzer.InspectUnreleasedFactoryFields (cyclomatic 19) · ×1
  • DisposalDutyAnalyzer.InspectUnreleasedFactoryFields (cyclomatic 19) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:1429 — DisposalDutyAnalyzer.InspectUnreleasedFactoryFields has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PhpShape.PhpShape.ctor (cyclomatic 19) · ×1
  • PhpShape.PhpShape.ctor (cyclomatic 19) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:552 — PhpShape.PhpShape.ctor 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. This is NOT this file's highest cyclomatic complexity: ForeignScopedGlobalMutationScan.PhpReads (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignDiagnosticMaterialisationScan.LexPhp (cyclomatic 19) · ×1
  • ForeignDiagnosticMaterialisationScan.LexPhp (cyclomatic 19) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Php.cs:141 — ForeignDiagnosticMaterialisationScan.LexPhp 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 · Shape.RubyCountedLoopAt (cyclomatic 19) · ×1
  • Shape.RubyCountedLoopAt (cyclomatic 19) engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Ruby.cs:187 — Shape.RubyCountedLoopAt has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · InlineScriptShadow.RazorExpressionEnd (cyclomatic 19) · ×1
  • InlineScriptShadow.RazorExpressionEnd (cyclomatic 19) engine/src/Scanner/Security/D29/Scanners/InlineScriptShadow.cs:269 — InlineScriptShadow.RazorExpressionEnd 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 · Model.HandlerExempt (cyclomatic 19) · ×1
  • Model.HandlerExempt (cyclomatic 19) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1149 — Model.HandlerExempt 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 · NuGetVulnerabilityArm.NuGetArmAsync (cyclomatic 19) · ×1
  • NuGetVulnerabilityArm.NuGetArmAsync (cyclomatic 19) engine/src/Scanner/Security/Shared/NuGetVulnerabilityArm.cs:24 — NuGetVulnerabilityArm.NuGetArmAsync has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · PagesDeployWorkflow.StandIn (cyclomatic 19) · ×1
  • PagesDeployWorkflow.StandIn (cyclomatic 19) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PagesDeployWorkflow.cs:348 — PagesDeployWorkflow.StandIn has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · IdentifierTokens.Classify (cyclomatic 19) · ×1
  • IdentifierTokens.Classify (cyclomatic 19) engine/src/Core/Naming/IdentifierTokens.cs:214 — IdentifierTokens.Classify 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 · DotnetProjectLicensesCollector.CloseOverDependencyGraphAsync (cyclomatic 19) · ×1
  • DotnetProjectLicensesCollector.CloseOverDependencyGraphAsync (cyclomatic 19) engine/src/Core/Security/DotnetProjectLicensesCollector.cs:538 — DotnetProjectLicensesCollector.CloseOverDependencyGraphAsync 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 · JsUnusedDeclarations.HasTemplateBindingDecorator (cyclomatic 19) · ×1
  • JsUnusedDeclarations.HasTemplateBindingDecorator (cyclomatic 19) engine/src/Core/Frontend/JsUnusedDeclarations.cs:460 — JsUnusedDeclarations.HasTemplateBindingDecorator has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CallResultGate.Gates (cyclomatic 19) · ×1
  • CallResultGate.Gates (cyclomatic 19) engine/src/Core/Roslyn/CodeModel/CallResultGate.cs:51 — CallResultGate.Gates 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 · DestructuredPersonalDataLogScan.DeclaredTypeNames (cyclomatic 19) · ×1
  • DestructuredPersonalDataLogScan.DeclaredTypeNames (cyclomatic 19) engine/src/Scanner/Security/Shared.CSharp/DestructuredPersonalDataLogScan.cs:383 — DestructuredPersonalDataLogScan.DeclaredTypeNames has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · RepoModel.Observe (cyclomatic 19) · ×1
  • RepoModel.Observe (cyclomatic 19) engine/src/Scanner/Security/Shared.CSharp/EndpointAuthorizationScan.cs:1035 — RepoModel.Observe has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RepoModel.IdentifierAccess (cyclomatic 19) · ×1
  • RepoModel.IdentifierAccess (cyclomatic 19) engine/src/Scanner/Security/Shared.CSharp/EndpointAuthorizationScan.cs:1350 — RepoModel.IdentifierAccess has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BacklogService.UpdateAsync (cyclomatic 19) · ×1
  • BacklogService.UpdateAsync (cyclomatic 19) src/Kennel.Core/LanguageTraining/Services/BacklogService.cs:540 — BacklogService.UpdateAsync 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 · ModuleStructureService.LoadAsync (cyclomatic 19) · ×1
  • ModuleStructureService.LoadAsync (cyclomatic 19) src/Kennel.Watchdog.Core/Architecture/Application/ModuleStructureService.cs:145 — ModuleStructureService.LoadAsync has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 169, 176, 191). 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 · census.census (cyclomatic 19) · ×1
  • census.census (cyclomatic 19) docs/plans/deterministic-engine/tools/census.py:90 — census.census 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 · idempotency-facts.presenceTested (cyclomatic 19) · ×1
  • idempotency-facts.presenceTested (cyclomatic 19) engine/sidecars/tsjs-frontend/idempotency-facts.mjs:189 — idempotency-facts.presenceTested has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · moduleOfExpression (cyclomatic 19) · ×1
  • moduleOfExpression (cyclomatic 19) engine/sidecars/tsjs-frontend/idempotency-facts.mjs:52 — moduleOfExpression 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 · DisclosurePolicyReading.Classify (cyclomatic 18) · ×1
  • DisclosurePolicyReading.Classify (cyclomatic 18) engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyReading.cs:369 — DisclosurePolicyReading.Classify 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 · VbAnnotatedUnit.Trailing (cyclomatic 18) · ×1
  • VbAnnotatedUnit.Trailing (cyclomatic 18) engine/src/Scanner/Docs/D24/VbAnnotatedUnit.cs:143 — VbAnnotatedUnit.Trailing has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: VbAnnotatedUnit.Closed (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · IncompletenessAnalyzer.RunsSynchronously (cyclomatic 18) · ×1
  • IncompletenessAnalyzer.RunsSynchronously (cyclomatic 18) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScript.cs:484 — IncompletenessAnalyzer.RunsSynchronously has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · IncompletenessAnalyzer.ForeignStableValue (cyclomatic 18) · ×1
  • IncompletenessAnalyzer.ForeignStableValue (cyclomatic 18) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScriptInert.cs:198 — IncompletenessAnalyzer.ForeignStableValue has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignParser.ObjectLiteralMembers (cyclomatic 18) · ×1
  • ForeignParser.ObjectLiteralMembers (cyclomatic 18) engine/src/Scanner/Incompleteness/Incompleteness.Shared/ScriptFunctions.cs:488 — ForeignParser.ObjectLiteralMembers has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ArchitectureModelPrework.TryReadRegistration (cyclomatic 18) · ×1
  • ArchitectureModelPrework.TryReadRegistration (cyclomatic 18) engine/src/Scanner/ArchitectureModel/ArchitectureModel.Prework/ArchitectureModelPrework.cs:203 — ArchitectureModelPrework.TryReadRegistration 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 · DocAccuracyAnalyzer.DocAccuracy (cyclomatic 18) · ×1
  • DocAccuracyAnalyzer.DocAccuracy (cyclomatic 18) engine/src/Scanner/Maturity/M4/DocAccuracyAnalyzer.cs:23 — DocAccuracyAnalyzer.DocAccuracy 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 · DocInventory.Read (cyclomatic 18) · ×1
  • DocInventory.Read (cyclomatic 18) engine/src/Scanner/Maturity/M4/DocInventory.cs:362 — DocInventory.Read 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 · DocInventory.ReadPackageJson (cyclomatic 18) · ×1
  • DocInventory.ReadPackageJson (cyclomatic 18) engine/src/Scanner/Maturity/M4/DocInventory.cs:617 — DocInventory.ReadPackageJson has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ElixirServerControls.ReadHeaderLiterals (cyclomatic 18) · ×1
  • ElixirServerControls.ReadHeaderLiterals (cyclomatic 18) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ElixirServerControls.cs:148 — ElixirServerControls.ReadHeaderLiterals 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 · ForeignComplianceScan.IsSwiftNonStored (cyclomatic 18) · ×1
  • ForeignComplianceScan.IsSwiftNonStored (cyclomatic 18) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Swift.cs:215 — ForeignComplianceScan.IsSwiftNonStored has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CiTestCommands.WorkspaceTask (cyclomatic 18) · ×1
  • CiTestCommands.WorkspaceTask (cyclomatic 18) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:331 — CiTestCommands.WorkspaceTask 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 · DisposalDutyAnalyzer.RequiresNull (cyclomatic 18) · ×1
  • DisposalDutyAnalyzer.RequiresNull (cyclomatic 18) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:1303 — DisposalDutyAnalyzer.RequiresNull has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ScalaDisposalShape.LocalDeclaredAt (cyclomatic 18) · ×1
  • ScalaDisposalShape.LocalDeclaredAt (cyclomatic 18) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs:881 — ScalaDisposalShape.LocalDeclaredAt has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ScalaShape.SwallowingTryEnd (cyclomatic 18) · ×1
  • ScalaShape.SwallowingTryEnd (cyclomatic 18) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:827 — ScalaShape.SwallowingTryEnd has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignReleaseGuardScan.KotlinRunsInPlace (cyclomatic 18) · ×1
  • ForeignReleaseGuardScan.KotlinRunsInPlace (cyclomatic 18) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:259 — ForeignReleaseGuardScan.KotlinRunsInPlace has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDiagnosticMaterialisationScan.MentionsALevel (cyclomatic 18) · ×1
  • ForeignDiagnosticMaterialisationScan.MentionsALevel (cyclomatic 18) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:587 — ForeignDiagnosticMaterialisationScan.MentionsALevel has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDiagnosticMaterialisationScan.IsDartWork (cyclomatic 18) · ×1
  • ForeignDiagnosticMaterialisationScan.IsDartWork (cyclomatic 18) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs:94 — ForeignDiagnosticMaterialisationScan.IsDartWork has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SelfMutatingLoopAnalyzer.ReturnedStoreOf (cyclomatic 18) · ×1
  • SelfMutatingLoopAnalyzer.ReturnedStoreOf (cyclomatic 18) engine/src/Scanner/Defects/X27/SelfMutatingLoopAnalyzer.cs:824 — SelfMutatingLoopAnalyzer.ReturnedStoreOf has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · Shape.InIndexRange (cyclomatic 18) · ×1
  • Shape.InIndexRange (cyclomatic 18) engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Scala.cs:335 — Shape.InIndexRange has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BlockingOnAsyncSites.AsyncTwinOf (cyclomatic 18) · ×1
  • BlockingOnAsyncSites.AsyncTwinOf (cyclomatic 18) engine/src/Scanner/Defects/X1/BlockingOnAsyncSites.cs:309 — BlockingOnAsyncSites.AsyncTwinOf has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignAsyncCorrectnessScan.IsKotlinContained (cyclomatic 18) · ×1
  • ForeignAsyncCorrectnessScan.IsKotlinContained (cyclomatic 18) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Kotlin.cs:296 — ForeignAsyncCorrectnessScan.IsKotlinContained has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignAsyncCorrectnessScan.KotlinBlockingCall (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignExceptionHandlingScan.InspectJsTokens (cyclomatic 18) · ×1
  • ForeignExceptionHandlingScan.InspectJsTokens (cyclomatic 18) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Js.cs:68 — ForeignExceptionHandlingScan.InspectJsTokens 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 · ForeignUntrustedLengthScan.OtherSide (cyclomatic 18) · ×1
  • ForeignUntrustedLengthScan.OtherSide (cyclomatic 18) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.cs:586 — ForeignUntrustedLengthScan.OtherSide has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.KotlinSignature (cyclomatic 18) · ×1
  • ForeignDocumentWalkScan.KotlinSignature (cyclomatic 18) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:512 — ForeignDocumentWalkScan.KotlinSignature has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignDocumentWalkScan.KotlinDerivesThroughLambda (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · JsSinkReader.IsSourced (cyclomatic 18) · ×1
  • JsSinkReader.IsSourced (cyclomatic 18) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:421 — JsSinkReader.IsSourced has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SilentFallbackAnalyzer.InspectSilentDefault (cyclomatic 18) · ×1
  • SilentFallbackAnalyzer.InspectSilentDefault (cyclomatic 18) engine/src/Scanner/Defects/X7/SilentFallbackAnalyzer.cs:141 — SilentFallbackAnalyzer.InspectSilentDefault has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ScriptBlockingScan.ArrowAfterParameters (cyclomatic 18) · ×1
  • ScriptBlockingScan.ArrowAfterParameters (cyclomatic 18) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:450 — ScriptBlockingScan.ArrowAfterParameters 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 · DomainInfraBoundaryAnalyzer.TsDomainInfraBoundaryAsync (cyclomatic 18) · ×1
  • DomainInfraBoundaryAnalyzer.TsDomainInfraBoundaryAsync (cyclomatic 18) engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:408 — DomainInfraBoundaryAnalyzer.TsDomainInfraBoundaryAsync has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DomainInfraTokenWalk.Walk (cyclomatic 18) · ×1
  • DomainInfraTokenWalk.Walk (cyclomatic 18) engine/src/Scanner/ModelAware/DM6/DomainInfraTokenWalk.cs:60 — DomainInfraTokenWalk.Walk has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KubernetesFieldAnchor.FirstContainerWithout (cyclomatic 18) · ×1
  • KubernetesFieldAnchor.FirstContainerWithout (cyclomatic 18) engine/src/Scanner/Security/D31/Scanners/KubernetesFieldAnchor.cs:187 — KubernetesFieldAnchor.FirstContainerWithout 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 · NpmPackageSites.NpmLockEntries (cyclomatic 18) · ×1
  • NpmPackageSites.NpmLockEntries (cyclomatic 18) engine/src/Core/Dependencies/NpmPackageSites.cs:180 — NpmPackageSites.NpmLockEntries 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 · NuGetPackageSites.PulledIn (cyclomatic 18) · ×1
  • NuGetPackageSites.PulledIn (cyclomatic 18) engine/src/Core/Dependencies/NuGetPackageSites.cs:222 — NuGetPackageSites.PulledIn has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · MarkupRepositoryFacts.Read (cyclomatic 18) · ×1
  • MarkupRepositoryFacts.Read (cyclomatic 18) engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupRepositoryFacts.cs:97 — MarkupRepositoryFacts.Read 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 · NodeTestSuiteProbe.Read (cyclomatic 18) · ×1
  • NodeTestSuiteProbe.Read (cyclomatic 18) engine/src/Core/Testing/NodeTestSuiteProbe.cs:1485 — NodeTestSuiteProbe.Read has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RoslynTestQualityCollector.DetectMockDominance (cyclomatic 18) · ×1
  • RoslynTestQualityCollector.DetectMockDominance (cyclomatic 18) engine/src/Core/Testing/RoslynTestQualityCollector.MockDominance.cs:60 — RoslynTestQualityCollector.DetectMockDominance has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PackageCache.ServeMetadataAsync (cyclomatic 18) · ×1
  • PackageCache.ServeMetadataAsync (cyclomatic 18) engine/src/PkgCache/PackageCache.cs:281 — PackageCache.ServeMetadataAsync 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 · KennelLayout.razor › OnInitializedAsync (cyclomatic 18) · ×1
  • KennelLayout.razor › OnInitializedAsync (cyclomatic 18) src/Kennel.Ui/Layout/KennelLayout.razor:205 — KennelLayout.razor › OnInitializedAsync has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PartnerRedemption.RedeemAsync (cyclomatic 18) · ×1
  • PartnerRedemption.RedeemAsync (cyclomatic 18) src/Kennel.Core/Billing/Partners/PartnerRedemption.cs:75 — PartnerRedemption.RedeemAsync 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 · BacklogService.DeltaBar (cyclomatic 18) · ×1
  • BacklogService.DeltaBar (cyclomatic 18) src/Kennel.Core/LanguageTraining/Services/BacklogService.cs:2168 — BacklogService.DeltaBar 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 · TeamEditorReadModel.LoadEditorAsync (cyclomatic 18) · ×1
  • TeamEditorReadModel.LoadEditorAsync (cyclomatic 18) src/Kennel.Watchdog.Core/Teams/ReadModels/TeamEditorReadModel.cs:138 — TeamEditorReadModel.LoadEditorAsync has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ServiceLoop.RunAsync (cyclomatic 18) · ×1
  • ServiceLoop.RunAsync (cyclomatic 18) src/Kennel.Improve.Orchestrator/Turns/ServiceLoop.cs:95 — ServiceLoop.RunAsync 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 · ExecutiveBrief.SecurityPicture (cyclomatic 17) · ×1
  • ExecutiveBrief.SecurityPicture (cyclomatic 17) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:110 — ExecutiveBrief.SecurityPicture has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExecutiveBrief.CriticalPlan (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ChangelogNarrator.PlanEntries (cyclomatic 17) · ×1
  • ChangelogNarrator.PlanEntries (cyclomatic 17) engine/src/CodeHealth.Reporting/Changelog/ChangelogNarrator.cs:665 — ChangelogNarrator.PlanEntries 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 · SynthesisEngine.RootCauses (cyclomatic 17) · ×1
  • SynthesisEngine.RootCauses (cyclomatic 17) engine/src/CodeHealth.Reporting/Synthesis/SynthesisEngine.cs:223 — SynthesisEngine.RootCauses 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 · InternalApiConsistencyAnalyzer.NoExposedSurface (cyclomatic 17) · ×1
  • InternalApiConsistencyAnalyzer.NoExposedSurface (cyclomatic 17) engine/src/Scanner/ArchitectureJudged/D22/InternalApiConsistencyAnalyzer.cs:208 — InternalApiConsistencyAnalyzer.NoExposedSurface has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DependencyHygieneAnalyzer.NoReaderDisclosure (cyclomatic 17) · ×1
  • DependencyHygieneAnalyzer.NoReaderDisclosure (cyclomatic 17) engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.UnscoredDisclosure.cs:1001 — DependencyHygieneAnalyzer.NoReaderDisclosure 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. This is NOT this file's highest cyclomatic complexity: DependencyHygieneAnalyzer.Disclose (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ChangeCouplingAnalyzer.RunAsync (cyclomatic 17) · ×1
  • ChangeCouplingAnalyzer.RunAsync (cyclomatic 17) engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:67 — ChangeCouplingAnalyzer.RunAsync has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · NamingRules.Sigils (cyclomatic 17) · ×1
  • NamingRules.Sigils (cyclomatic 17) engine/src/Scanner/Docs/D21/NamingRules.cs:460 — NamingRules.Sigils has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IncompletenessAnalyzer.AnswersAnImplementedExplicitContract (cyclomatic 17) · ×1
  • IncompletenessAnalyzer.AnswersAnImplementedExplicitContract (cyclomatic 17) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:767 — IncompletenessAnalyzer.AnswersAnImplementedExplicitContract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: IncompletenessAnalyzer.IsTrivialValue (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · IncompletenessAnalyzer.ForeignVoidCompletion (cyclomatic 17) · ×1
  • IncompletenessAnalyzer.ForeignVoidCompletion (cyclomatic 17) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScript.cs:332 — IncompletenessAnalyzer.ForeignVoidCompletion has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · IncompletenessAnalyzer.GuardEndingBefore (cyclomatic 17) · ×1
  • IncompletenessAnalyzer.GuardEndingBefore (cyclomatic 17) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScriptInert.cs:239 — IncompletenessAnalyzer.GuardEndingBefore 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 · IncompletenessAnalyzer.ArmEnd (cyclomatic 17) · ×1
  • IncompletenessAnalyzer.ArmEnd (cyclomatic 17) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScriptInert.cs:420 — IncompletenessAnalyzer.ArmEnd 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 · ForeignWebSecurityScan.ReadNodeServerImports (cyclomatic 17) · ×1
  • ForeignWebSecurityScan.ReadNodeServerImports (cyclomatic 17) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.NodeTransport.cs:109 — ForeignWebSecurityScan.ReadNodeServerImports has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ForeignComplianceScan.MaskElixirSource (cyclomatic 17) · ×1
  • ForeignComplianceScan.MaskElixirSource (cyclomatic 17) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAccessControl.cs:315 — ForeignComplianceScan.MaskElixirSource 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 · ForeignComplianceScan.StatementBoundedByAge (cyclomatic 17) · ×1
  • ForeignComplianceScan.StatementBoundedByAge (cyclomatic 17) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.RubyRetention.cs:129 — ForeignComplianceScan.StatementBoundedByAge has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CiTestCommands.ReadPackage (cyclomatic 17) · ×1
  • CiTestCommands.ReadPackage (cyclomatic 17) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:463 — CiTestCommands.ReadPackage 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 · CiTestCommands.SplitShell (cyclomatic 17) · ×1
  • CiTestCommands.SplitShell (cyclomatic 17) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:588 — CiTestCommands.SplitShell 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 · CiTestGatePipeline.Actions (cyclomatic 17) · ×1
  • CiTestGatePipeline.Actions (cyclomatic 17) engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:316 — CiTestGatePipeline.Actions 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 · CiTestGateSites.ChangeFilters (cyclomatic 17) · ×1
  • CiTestGateSites.ChangeFilters (cyclomatic 17) engine/src/Scanner/Readiness/P12/CiTestGateSites.cs:533 — CiTestGateSites.ChangeFilters has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DotNetTestInventory.Targets (cyclomatic 17) · ×1
  • DotNetTestInventory.Targets (cyclomatic 17) engine/src/Scanner/Readiness/P12/DotNetTestInventory.cs:373 — DotNetTestInventory.Targets 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 · JavaShape.IsSwitchRule (cyclomatic 17) · ×1
  • JavaShape.IsSwitchRule (cyclomatic 17) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:934 — JavaShape.IsSwitchRule has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignScopedGlobalMutationScan.JoinKotlin (cyclomatic 17) · ×1
  • ForeignScopedGlobalMutationScan.JoinKotlin (cyclomatic 17) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:112 — ForeignScopedGlobalMutationScan.JoinKotlin has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KotlinShape.KotlinShape.ctor (cyclomatic 17) · ×1
  • KotlinShape.KotlinShape.ctor (cyclomatic 17) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:256 — KotlinShape.KotlinShape.ctor has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KotlinShape.SwallowingTryEnd (cyclomatic 17) · ×1
  • KotlinShape.SwallowingTryEnd (cyclomatic 17) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:711 — KotlinShape.SwallowingTryEnd has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PhpShape.AddArrowFunction (cyclomatic 17) · ×1
  • PhpShape.AddArrowFunction (cyclomatic 17) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:968 — PhpShape.AddArrowFunction has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignScopedGlobalMutationScan.PhpReads (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignScopedGlobalMutationScan.DrivingLocals (cyclomatic 17) · ×1
  • ForeignScopedGlobalMutationScan.DrivingLocals (cyclomatic 17) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Scala.cs:348 — ForeignScopedGlobalMutationScan.DrivingLocals has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDiagnosticMaterialisationScan.IsKotlinWork (cyclomatic 17) · ×1
  • ForeignDiagnosticMaterialisationScan.IsKotlinWork (cyclomatic 17) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:119 — ForeignDiagnosticMaterialisationScan.IsKotlinWork has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KotlinFile.BindingAt (cyclomatic 17) · ×1
  • KotlinFile.BindingAt (cyclomatic 17) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:429 — KotlinFile.BindingAt has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ScalaFile.NotThisLoops (cyclomatic 17) · ×1
  • ScalaFile.NotThisLoops (cyclomatic 17) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Scala.cs:680 — ScalaFile.NotThisLoops has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · Shape.ScalaRebindingRegion (cyclomatic 17) · ×1
  • Shape.ScalaRebindingRegion (cyclomatic 17) engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Scala.cs:397 — Shape.ScalaRebindingRegion 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 · NullableReferenceTypesAnalyzer.BuildNullable (cyclomatic 17) · ×1
  • NullableReferenceTypesAnalyzer.BuildNullable (cyclomatic 17) engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1954 — NullableReferenceTypesAnalyzer.BuildNullable has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.DartTearOffs (cyclomatic 17) · ×1
  • ForeignDocumentWalkScan.DartTearOffs (cyclomatic 17) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:656 — ForeignDocumentWalkScan.DartTearOffs has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.DartDerivesThroughClosure (cyclomatic 17) · ×1
  • ForeignDocumentWalkScan.DartDerivesThroughClosure (cyclomatic 17) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:782 — ForeignDocumentWalkScan.DartDerivesThroughClosure has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.KotlinEntryTo (cyclomatic 17) · ×1
  • ForeignDocumentWalkScan.KotlinEntryTo (cyclomatic 17) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:395 — ForeignDocumentWalkScan.KotlinEntryTo has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignDocumentWalkScan.KotlinDerivesThroughLambda (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.KotlinReferences (cyclomatic 17) · ×1
  • ForeignDocumentWalkScan.KotlinReferences (cyclomatic 17) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:1101 — ForeignDocumentWalkScan.KotlinReferences has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignDocumentWalkScan.KotlinDerivesThroughLambda (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.IsKotlinWholeValue (cyclomatic 17) · ×1
  • ForeignDocumentWalkScan.IsKotlinWholeValue (cyclomatic 17) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:1185 — ForeignDocumentWalkScan.IsKotlinWholeValue has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignDocumentWalkScan.KotlinDerivesThroughLambda (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · UntrustedMarkupScan.ScanCSharpAsync (cyclomatic 17) · ×1
  • UntrustedMarkupScan.ScanCSharpAsync (cyclomatic 17) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:62 — UntrustedMarkupScan.ScanCSharpAsync has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · CSharpSinkReader.IsSourcedWalk (cyclomatic 17) · ×1
  • CSharpSinkReader.IsSourcedWalk (cyclomatic 17) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:664 — CSharpSinkReader.IsSourcedWalk 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 · JsSinkReader.IsRequestText (cyclomatic 17) · ×1
  • JsSinkReader.IsRequestText (cyclomatic 17) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:793 — JsSinkReader.IsRequestText has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DomainInfraEdgesTs.NamesOnlyNestWiring (cyclomatic 17) · ×1
  • DomainInfraEdgesTs.NamesOnlyNestWiring (cyclomatic 17) engine/src/Scanner/ModelAware/DM6/DomainInfraEdgesTs.cs:301 — DomainInfraEdgesTs.NamesOnlyNestWiring has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DomainInfraEdgesTs.RelativeSpecifiers (cyclomatic 17) · ×1
  • DomainInfraEdgesTs.RelativeSpecifiers (cyclomatic 17) engine/src/Scanner/ModelAware/DM6/DomainInfraEdgesTs.cs:376 — DomainInfraEdgesTs.RelativeSpecifiers 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 · PrimitiveDataClumpsAnalyzer.RoslynShapes (cyclomatic 17) · ×1
  • PrimitiveDataClumpsAnalyzer.RoslynShapes (cyclomatic 17) engine/src/Scanner/ModelAware/DM8/PrimitiveDataClumpsAnalyzer.cs:101 — PrimitiveDataClumpsAnalyzer.RoslynShapes has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (PrimitiveDataClumpsAnalyzer.NeutralShapes) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · PrimitiveDataClumpsAnalyzer.NeutralShapes (cyclomatic 17) · ×1
  • PrimitiveDataClumpsAnalyzer.NeutralShapes (cyclomatic 17) engine/src/Scanner/ModelAware/DM8/PrimitiveDataClumpsAnalyzer.cs:234 — PrimitiveDataClumpsAnalyzer.NeutralShapes has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (PrimitiveDataClumpsAnalyzer.RoslynShapes) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · PatchParser.Read (cyclomatic 17) · ×1
  • PatchParser.Read (cyclomatic 17) engine/src/Scanner/Security/D28/Scanners/PasswordHistoryScan.cs:294 — PatchParser.Read 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 · JsRegexCaptureGroupRecheck.ReadStringLiteral (cyclomatic 17) · ×1
  • JsRegexCaptureGroupRecheck.ReadStringLiteral (cyclomatic 17) engine/src/Scanner/Security/D29/Scanners/JsRegexCaptureGroupRecheck.cs:856 — JsRegexCaptureGroupRecheck.ReadStringLiteral 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 · Model.Model.ctor (cyclomatic 17) · ×1
  • Model.Model.ctor (cyclomatic 17) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:763 — Model.Model.ctor has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Model.InsideExpression (cyclomatic 17) · ×1
  • Model.InsideExpression (cyclomatic 17) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1394 — Model.InsideExpression has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PersonalDataEvidence.MatchName (cyclomatic 17) · ×1
  • PersonalDataEvidence.MatchName (cyclomatic 17) engine/src/Core/Compliance/PersonalDataEvidence.cs:314 — PersonalDataEvidence.MatchName has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NativeSecretScanner.EnclosingSection (cyclomatic 17) · ×1
  • NativeSecretScanner.EnclosingSection (cyclomatic 17) engine/src/Core/Security/NativeSecretScanner.CryptographicKey.cs:272 — NativeSecretScanner.EnclosingSection 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 · NodeTestSuiteCoverageCollector.RunInvocation (cyclomatic 17) · ×1
  • NodeTestSuiteCoverageCollector.RunInvocation (cyclomatic 17) engine/src/Core/Testing/NodeTestSuiteCoverageCollector.cs:487 — NodeTestSuiteCoverageCollector.RunInvocation 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 · RoslynTestQualityCollector.DoubleFields (cyclomatic 17) · ×1
  • RoslynTestQualityCollector.DoubleFields (cyclomatic 17) engine/src/Core/Testing/RoslynTestQualityCollector.MockDominance.cs:112 — RoslynTestQualityCollector.DoubleFields has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · RedirectDestinationAuthority.AuthorityIsFixed (cyclomatic 17) · ×1
  • RedirectDestinationAuthority.AuthorityIsFixed (cyclomatic 17) engine/src/Scanner/Security/Shared.CSharp/RedirectDestinationAuthority.cs:60 — RedirectDestinationAuthority.AuthorityIsFixed has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · DeclarationsReader.ForViewerAsync (cyclomatic 17) · ×1
  • DeclarationsReader.ForViewerAsync (cyclomatic 17) src/Kennel.Core/Compliance/Pages/Declarations/DeclarationsReader.cs:38 — DeclarationsReader.ForViewerAsync has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ComplianceDeliveryService.MintAndSignAsync (cyclomatic 17) · ×1
  • ComplianceDeliveryService.MintAndSignAsync (cyclomatic 17) src/Kennel.Core/Compliance/Report/ComplianceDeliveryService.cs:52 — ComplianceDeliveryService.MintAndSignAsync has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BacklogService.ResolveAsync (cyclomatic 17) · ×1
  • BacklogService.ResolveAsync (cyclomatic 17) src/Kennel.Core/LanguageTraining/Services/BacklogService.cs:1153 — BacklogService.ResolveAsync has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PartnerConsoleService.MintCodeAsync (cyclomatic 17) · ×1
  • PartnerConsoleService.MintCodeAsync (cyclomatic 17) src/Kennel.Admin.Core/Admin/Services/PartnerConsoleService.cs:233 — PartnerConsoleService.MintCodeAsync has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: PartnerConsoleService.Explain (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ShellGate.Items (cyclomatic 17) · ×1
  • ShellGate.Items (cyclomatic 17) src/Kennel.Improve.Orchestrator/Gates/ShellGate.cs:393 — ShellGate.Items has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · art.house (cyclomatic 17) · ×1
  • art.house (cyclomatic 17) docs/marketing/infomercial/explainer/art.js:179 — art.house has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, 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 · KnowledgeInertShapes.Tokens (cyclomatic 16) · ×1
  • KnowledgeInertShapes.Tokens (cyclomatic 16) engine/src/CodeHealth.Toolchain/Git/KnowledgeInertShapes.cs:276 — KnowledgeInertShapes.Tokens has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExecutiveBrief.VerdictDims (cyclomatic 16) · ×1
  • ExecutiveBrief.VerdictDims (cyclomatic 16) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:632 — ExecutiveBrief.VerdictDims has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExecutiveBrief.CriticalPlan (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · HotspotAnalyzer.RunAsync (cyclomatic 16) · ×1
  • HotspotAnalyzer.RunAsync (cyclomatic 16) engine/src/Scanner/GitMining/D15/HotspotAnalyzer.cs:37 — HotspotAnalyzer.RunAsync has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · ConfigEntries.ReadJson (cyclomatic 16) · ×1
  • ConfigEntries.ReadJson (cyclomatic 16) engine/src/Scanner/LlmJudgedLanguage/LA4/ConfigEntries.cs:20 — ConfigEntries.ReadJson has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · EnvironmentCrossing.OtherMember (cyclomatic 16) · ×1
  • EnvironmentCrossing.OtherMember (cyclomatic 16) engine/src/Scanner/LlmJudgedLanguage/LA4/EnvironmentCrossing.cs:306 — EnvironmentCrossing.OtherMember has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JsonKeys.Enumerate (cyclomatic 16) · ×1
  • JsonKeys.Enumerate (cyclomatic 16) engine/src/Scanner/Dependencies/D12/NpmDeprecatedDependencies.cs:706 — JsonKeys.Enumerate 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 · VulnerabilityDisclosurePolicyAnalyzer.RunAsync (cyclomatic 16) · ×1
  • VulnerabilityDisclosurePolicyAnalyzer.RunAsync (cyclomatic 16) engine/src/Scanner/SecurityPosture/D37/VulnerabilityDisclosurePolicyAnalyzer.cs:223 — VulnerabilityDisclosurePolicyAnalyzer.RunAsync has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IncompletenessAnalyzer.ComparisonsDecidedByNaN (cyclomatic 16) · ×1
  • IncompletenessAnalyzer.ComparisonsDecidedByNaN (cyclomatic 16) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:3865 — IncompletenessAnalyzer.ComparisonsDecidedByNaN 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. This is NOT this file's highest cyclomatic complexity: IncompletenessAnalyzer.IsTrivialValue (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ScriptReadingBuilder.Add (cyclomatic 16) · ×1
  • ScriptReadingBuilder.Add (cyclomatic 16) engine/src/Scanner/Incompleteness/Incompleteness.Shared/ScriptFunctions.cs:1275 — ScriptReadingBuilder.Add has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CaptiveDependenciesAnalyzer.DotNetCaptives (cyclomatic 16) · ×1
  • CaptiveDependenciesAnalyzer.DotNetCaptives (cyclomatic 16) engine/src/Scanner/ArchitectureModel/AX1/CaptiveDependenciesAnalyzer.cs:146 — CaptiveDependenciesAnalyzer.DotNetCaptives 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 · ForeignWebSecurityScan.JoseBuilderAt (cyclomatic 16) · ×1
  • ForeignWebSecurityScan.JoseBuilderAt (cyclomatic 16) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:229 — ForeignWebSecurityScan.JoseBuilderAt 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 · ForeignWebSecurityScan.ReadNodeCryptoCall (cyclomatic 16) · ×1
  • ForeignWebSecurityScan.ReadNodeCryptoCall (cyclomatic 16) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:306 — ForeignWebSecurityScan.ReadNodeCryptoCall has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ForeignWebSecurityScan.FixedValueAt (cyclomatic 16) · ×1
  • ForeignWebSecurityScan.FixedValueAt (cyclomatic 16) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:942 — ForeignWebSecurityScan.FixedValueAt has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignWebSecurityScan.ReadBoundValue (cyclomatic 16) · ×1
  • ForeignWebSecurityScan.ReadBoundValue (cyclomatic 16) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:1191 — ForeignWebSecurityScan.ReadBoundValue has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignWebSecurityScan.BindImport (cyclomatic 16) · ×1
  • ForeignWebSecurityScan.BindImport (cyclomatic 16) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:1276 — ForeignWebSecurityScan.BindImport has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ForeignWebSecurityScan.MaskElixir (cyclomatic 16) · ×1
  • ForeignWebSecurityScan.MaskElixir (cyclomatic 16) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:148 — ForeignWebSecurityScan.MaskElixir has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ForeignWebSecurityScan.ReadPackageKdfCost (cyclomatic 16) · ×1
  • ForeignWebSecurityScan.ReadPackageKdfCost (cyclomatic 16) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.PasswordStorage.cs:365 — ForeignWebSecurityScan.ReadPackageKdfCost 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 · RustServerControls.ReadCookies (cyclomatic 16) · ×1
  • RustServerControls.ReadCookies (cyclomatic 16) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.RustServerControls.cs:281 — RustServerControls.ReadCookies 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 · S1Analyzer.AddWebControlAbsenceRows (cyclomatic 16) · ×1
  • S1Analyzer.AddWebControlAbsenceRows (cyclomatic 16) engine/src/Scanner/Compliance/S1/S1Analyzer.cs:926 — S1Analyzer.AddWebControlAbsenceRows has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: S1Analyzer.HasCryptoConcern (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignComplianceScan.ReadElixirAccessControl (cyclomatic 16) · ×1
  • ForeignComplianceScan.ReadElixirAccessControl (cyclomatic 16) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAccessControl.cs:105 — ForeignComplianceScan.ReadElixirAccessControl 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 · ForeignComplianceScan.ReadPhp (cyclomatic 16) · ×1
  • ForeignComplianceScan.ReadPhp (cyclomatic 16) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Php.cs:121 — ForeignComplianceScan.ReadPhp has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignComplianceScan.ReadPhpDataStoreClient (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignComplianceScan.ReadRubyTransportSetting (cyclomatic 16) · ×1
  • ForeignComplianceScan.ReadRubyTransportSetting (cyclomatic 16) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.RubyDataProtection.cs:182 — ForeignComplianceScan.ReadRubyTransportSetting has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignComplianceScan.RustEncryptCall (cyclomatic 16) · ×1
  • ForeignComplianceScan.RustEncryptCall (cyclomatic 16) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.RustDataProtection.cs:126 — ForeignComplianceScan.RustEncryptCall has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignComplianceScan.ReadSwiftType (cyclomatic 16) · ×1
  • ForeignComplianceScan.ReadSwiftType (cyclomatic 16) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Swift.cs:132 — ForeignComplianceScan.ReadSwiftType has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignObservability.ReadModule (cyclomatic 16) · ×1
  • ForeignObservability.ReadModule (cyclomatic 16) engine/src/Scanner/Readiness/P2/ForeignObservability.cs:266 — ForeignObservability.ReadModule has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CiTestGatePipeline.Circle (cyclomatic 16) · ×1
  • CiTestGatePipeline.Circle (cyclomatic 16) engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:813 — CiTestGatePipeline.Circle 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 · ForeignDeadBranchScan.CaseLabel (cyclomatic 16) · ×1
  • ForeignDeadBranchScan.CaseLabel (cyclomatic 16) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.cs:240 — ForeignDeadBranchScan.CaseLabel has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignDeadBranchScan.StringTest (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignDeadBranchScan.IsKotlinPureSubject (cyclomatic 16) · ×1
  • ForeignDeadBranchScan.IsKotlinPureSubject (cyclomatic 16) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:441 — ForeignDeadBranchScan.IsKotlinPureSubject 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 · ForeignDeadBranchScan.KotlinTypedNames (cyclomatic 16) · ×1
  • ForeignDeadBranchScan.KotlinTypedNames (cyclomatic 16) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:485 — ForeignDeadBranchScan.KotlinTypedNames 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 · ForeignDeadBranchScan.ScalaStableNames (cyclomatic 16) · ×1
  • ForeignDeadBranchScan.ScalaStableNames (cyclomatic 16) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Scala.cs:604 — ForeignDeadBranchScan.ScalaStableNames has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DisposalDutyAnalyzer.InspectUndisposedScope (cyclomatic 16) · ×1
  • DisposalDutyAnalyzer.InspectUndisposedScope (cyclomatic 16) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:310 — DisposalDutyAnalyzer.InspectUndisposedScope has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · Shape.FieldInitializer (cyclomatic 16) · ×1
  • Shape.FieldInitializer (cyclomatic 16) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.cs:1267 — Shape.FieldInitializer has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KotlinDisposalShape.HasBody (cyclomatic 16) · ×1
  • KotlinDisposalShape.HasBody (cyclomatic 16) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:807 — KotlinDisposalShape.HasBody has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: KotlinDisposalShape.LocalDeclaredAt (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · JavaShape.JavaShape.ctor (cyclomatic 16) · ×1
  • JavaShape.JavaShape.ctor (cyclomatic 16) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:553 — JavaShape.JavaShape.ctor has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignScopedGlobalMutationScan.InspectPhp (cyclomatic 16) · ×1
  • ForeignScopedGlobalMutationScan.InspectPhp (cyclomatic 16) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:119 — ForeignScopedGlobalMutationScan.InspectPhp 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. This is NOT this file's highest cyclomatic complexity: ForeignScopedGlobalMutationScan.PhpReads (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PhpShape.InExclusiveBranches (cyclomatic 16) · ×1
  • PhpShape.InExclusiveBranches (cyclomatic 16) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:686 — PhpShape.InExclusiveBranches has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignScopedGlobalMutationScan.PhpReads (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignDiagnosticMaterialisationScan.DeferredBodyLast (cyclomatic 16) · ×1
  • ForeignDiagnosticMaterialisationScan.DeferredBodyLast (cyclomatic 16) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:373 — ForeignDiagnosticMaterialisationScan.DeferredBodyLast has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDiagnosticMaterialisationScan.LexKotlin (cyclomatic 16) · ×1
  • ForeignDiagnosticMaterialisationScan.LexKotlin (cyclomatic 16) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:154 — ForeignDiagnosticMaterialisationScan.LexKotlin has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KotlinFile.MarkBinders (cyclomatic 16) · ×1
  • KotlinFile.MarkBinders (cyclomatic 16) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:638 — KotlinFile.MarkBinders has cyclomatic complexity 16 (threshold 15). 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.
D1 · Cyclomatic Complexity · Shape.RubyStatementStart (cyclomatic 16) · ×1
  • Shape.RubyStatementStart (cyclomatic 16) engine/src/Scanner/Defects/X29/ForeignFixedElementGuardScan.Ruby.cs:298 — Shape.RubyStatementStart has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BlockingOnAsyncSites.BlockingHelper (cyclomatic 16) · ×1
  • BlockingOnAsyncSites.BlockingHelper (cyclomatic 16) engine/src/Scanner/Defects/X1/BlockingOnAsyncSites.cs:171 — BlockingOnAsyncSites.BlockingHelper has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · BlockingOnAsyncSites.AddRazorSites (cyclomatic 16) · ×1
  • BlockingOnAsyncSites.AddRazorSites (cyclomatic 16) engine/src/Scanner/Defects/X1/BlockingOnAsyncSites.cs:453 — BlockingOnAsyncSites.AddRazorSites has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ForeignAsyncCorrectnessScan.DartCatchClause (cyclomatic 16) · ×1
  • ForeignAsyncCorrectnessScan.DartCatchClause (cyclomatic 16) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Dart.cs:152 — ForeignAsyncCorrectnessScan.DartCatchClause has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignAsyncCorrectnessScan.KotlinBraceOnLoop (cyclomatic 16) · ×1
  • ForeignAsyncCorrectnessScan.KotlinBraceOnLoop (cyclomatic 16) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Kotlin.cs:196 — ForeignAsyncCorrectnessScan.KotlinBraceOnLoop has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignAsyncCorrectnessScan.KotlinBlockingCall (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignUntrustedLengthScan.IsDartShadowedOrReassigned (cyclomatic 16) · ×1
  • ForeignUntrustedLengthScan.IsDartShadowedOrReassigned (cyclomatic 16) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:192 — ForeignUntrustedLengthScan.IsDartShadowedOrReassigned has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.KotlinCalls (cyclomatic 16) · ×1
  • ForeignDocumentWalkScan.KotlinCalls (cyclomatic 16) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:996 — ForeignDocumentWalkScan.KotlinCalls 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. This is NOT this file's highest cyclomatic complexity: ForeignDocumentWalkScan.KotlinDerivesThroughLambda (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ForeignDocumentWalkScan.KotlinLambdaArrow (cyclomatic 16) · ×1
  • ForeignDocumentWalkScan.KotlinLambdaArrow (cyclomatic 16) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:1499 — ForeignDocumentWalkScan.KotlinLambdaArrow has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: ForeignDocumentWalkScan.KotlinDerivesThroughLambda (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MutationIdempotencyAnalyzer.ExternalEffectCall (cyclomatic 16) · ×1
  • MutationIdempotencyAnalyzer.ExternalEffectCall (cyclomatic 16) engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.Evidence.cs:941 — MutationIdempotencyAnalyzer.ExternalEffectCall has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DomainInfraBoundaryAnalyzer.DomainReferencesInfrastructureAsync (cyclomatic 16) · ×1
  • DomainInfraBoundaryAnalyzer.DomainReferencesInfrastructureAsync (cyclomatic 16) engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:152 — DomainInfraBoundaryAnalyzer.DomainReferencesInfrastructureAsync 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 · ScatteredDomainDecisionsAnalyzer.ScatteredDomainDecisions (cyclomatic 16) · ×1
  • ScatteredDomainDecisionsAnalyzer.ScatteredDomainDecisions (cyclomatic 16) engine/src/Scanner/ModelAware/DM9/ScatteredDomainDecisionsAnalyzer.cs:217 — ScatteredDomainDecisionsAnalyzer.ScatteredDomainDecisions has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ConstructibleInvalidStateAnalyzer.UnguardedConstructorFinding (cyclomatic 16) · ×1
  • ConstructibleInvalidStateAnalyzer.UnguardedConstructorFinding (cyclomatic 16) engine/src/Scanner/ModelAware/DM11/ConstructibleInvalidStateAnalyzer.cs:125 — ConstructibleInvalidStateAnalyzer.UnguardedConstructorFinding has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · XmlParserFeatureRecheck.HelperReachesApi (cyclomatic 16) · ×1
  • XmlParserFeatureRecheck.HelperReachesApi (cyclomatic 16) engine/src/Scanner/Security/Shared/Scanners/XmlParserFeatureRecheck.cs:111 — XmlParserFeatureRecheck.HelperReachesApi has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · CssRules.ParseBlock (cyclomatic 16) · ×1
  • CssRules.ParseBlock (cyclomatic 16) engine/src/Scanner/Accessibility/AC6/CssRules.cs:103 — CssRules.ParseBlock 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 · VisualAndMotionAnalyzer.RepoReducedMotion (cyclomatic 16) · ×1
  • VisualAndMotionAnalyzer.RepoReducedMotion (cyclomatic 16) engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:1268 — VisualAndMotionAnalyzer.RepoReducedMotion 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 · PlaywrightNodeRenderer.SetUpAsync (cyclomatic 16) · ×1
  • PlaywrightNodeRenderer.SetUpAsync (cyclomatic 16) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PlaywrightNodeRenderer.cs:468 — PlaywrightNodeRenderer.SetUpAsync 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 · SiblingRoles.Build (cyclomatic 16) · ×1
  • SiblingRoles.Build (cyclomatic 16) engine/src/Core/Naming/SiblingRoles.cs:37 — SiblingRoles.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 · JsUnusedDeclarations.TsPrivateMemberName (cyclomatic 16) · ×1
  • JsUnusedDeclarations.TsPrivateMemberName (cyclomatic 16) engine/src/Core/Frontend/JsUnusedDeclarations.cs:268 — JsUnusedDeclarations.TsPrivateMemberName 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 · JsUnusedDeclarations.ClassBody (cyclomatic 16) · ×1
  • JsUnusedDeclarations.ClassBody (cyclomatic 16) engine/src/Core/Frontend/JsUnusedDeclarations.cs:707 — JsUnusedDeclarations.ClassBody 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 · EndpointAuthorizationScan.TypeEndpoints (cyclomatic 16) · ×1
  • EndpointAuthorizationScan.TypeEndpoints (cyclomatic 16) engine/src/Scanner/Security/Shared.CSharp/EndpointAuthorizationScan.cs:194 — EndpointAuthorizationScan.TypeEndpoints 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. This is NOT this file's highest cyclomatic complexity: EndpointAuthorizationScan.IsConstant (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · RepoModel.Callees (cyclomatic 16) · ×1
  • RepoModel.Callees (cyclomatic 16) engine/src/Scanner/Security/Shared.CSharp/EndpointAuthorizationScan.cs:1269 — RepoModel.Callees has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: EndpointAuthorizationScan.IsConstant (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Walk.Field (cyclomatic 16) · ×1
  • Walk.Field (cyclomatic 16) engine/src/Scanner/Security/Shared.CSharp/RedirectDestinationAuthority.cs:547 — Walk.Field 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 · ModuleReferenceScanner.Scan (cyclomatic 16) · ×1
  • ModuleReferenceScanner.Scan (cyclomatic 16) engine/src/Core/ArchitectureContracts/ModuleReferences.cs:93 — ModuleReferenceScanner.Scan 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 · MarkupContexts.ContextAfter (cyclomatic 16) · ×1
  • MarkupContexts.ContextAfter (cyclomatic 16) engine/src/Core/MarkupOutput/MarkupContexts.cs:98 — MarkupContexts.ContextAfter 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 · ScanBudgetGate.CheckAsync (cyclomatic 16) · ×1
  • ScanBudgetGate.CheckAsync (cyclomatic 16) src/Kennel.Core/Billing/Services/ScanBudgetGate.cs:35 — ScanBudgetGate.CheckAsync has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CommercialCatalogueBackfill.SurveyAsync (cyclomatic 16) · ×1
  • CommercialCatalogueBackfill.SurveyAsync (cyclomatic 16) src/Kennel.Core/Commercial/Application/CommercialBackfills.cs:33 — CommercialCatalogueBackfill.SurveyAsync has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RunPlansBackfill.SurveyAsync (cyclomatic 16) · ×1
  • RunPlansBackfill.SurveyAsync (cyclomatic 16) src/Kennel.Core/LanguageTraining/Application/RunPlansBackfill.cs:25 — RunPlansBackfill.SurveyAsync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ProductRepositoriesReader.ForViewerAsync (cyclomatic 16) · ×1
  • ProductRepositoriesReader.ForViewerAsync (cyclomatic 16) src/Kennel.Core/Portfolios/Pages/ProductRepositories/ProductRepositoriesReader.cs:34 — ProductRepositoriesReader.ForViewerAsync has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RepositoryCardsBackfill.SurveyAsync (cyclomatic 16) · ×1
  • RepositoryCardsBackfill.SurveyAsync (cyclomatic 16) src/Kennel.Core/Repositories/Application/RepositoryCardsBackfill.cs:46 — RepositoryCardsBackfill.SurveyAsync has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackRepositoryHandlers.UploadAsync (cyclomatic 16) · ×1
  • TrackRepositoryHandlers.UploadAsync (cyclomatic 16) src/Kennel.Core/Repositories/Pages/TrackRepository/Handlers/TrackRepositoryHandlers.cs:185 — TrackRepositoryHandlers.UploadAsync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · RepoTrackingService.TrackAsync (cyclomatic 16) · ×1
  • RepoTrackingService.TrackAsync (cyclomatic 16) src/Kennel.Core/Repositories/Services/RepoTrackingService.cs:81 — RepoTrackingService.TrackAsync has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CapabilityGapBacklogFiler.FileAsync (cyclomatic 16) · ×1
  • CapabilityGapBacklogFiler.FileAsync (cyclomatic 16) src/Kennel.Watchdog.Core/Agents/Services/CapabilityGapBacklogFiler.cs:182 — CapabilityGapBacklogFiler.FileAsync has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · RepoHubDocument.Pipeline (cyclomatic 16) · ×1
  • RepoHubDocument.Pipeline (cyclomatic 16) src/Kennel.Watchdog.Core/Repositories/Pages/RepoHub/RepoHubDocument.cs:339 — RepoHubDocument.Pipeline has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ScanQueueOperatorLeversBackfill.SurveyAsync (cyclomatic 16) · ×1
  • ScanQueueOperatorLeversBackfill.SurveyAsync (cyclomatic 16) src/Kennel.Watchdog.Core/Scheduling/Services/ScanQueueOperatorLeversBackfill.cs:30 — ScanQueueOperatorLeversBackfill.SurveyAsync has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AssayReportsReader.ManagedBy (cyclomatic 16) · ×1
  • AssayReportsReader.ManagedBy (cyclomatic 16) src/Kennel.Assay.Core/DecisionReports/Pages/AssayReports/AssayReportsReader.cs:230 — AssayReportsReader.ManagedBy has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 235, 249, 257, …). 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 · outro.capture (cyclomatic 16) · ×1
  • outro.capture (cyclomatic 16) docs/marketing/infomercial/screen/brand/outro.mjs:84 — outro.capture has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.main (cyclomatic 16) · ×1
  • main.main (cyclomatic 16) engine/sidecars/tsjs-frontend/main.mjs:141 — main.main has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 240, withProgramOnly, emitBodyFor, …). 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 · ComplianceContractsBackfill.SurveyAsync (cognitive 99) · ×1
  • ComplianceContractsBackfill.SurveyAsync (cognitive 99) src/Kennel.Core/Compliance/Application/ComplianceContractsBackfill.cs:75 — ComplianceContractsBackfill.SurveyAsync has cognitive complexity 99 (threshold 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 · CleartextTransmissionScan.Lex (cognitive 87) · ×1
  • CleartextTransmissionScan.Lex (cognitive 87) engine/src/Scanner/Security/D29/Scanners/CleartextTransmissionScan.cs:831 — CleartextTransmissionScan.Lex has cognitive complexity 87 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Builder.ParseMarkdown (cognitive 82) · ×1
  • Builder.ParseMarkdown (cognitive 82) engine/src/Scanner/Docs/D19/MarkupDocument.cs:206 — Builder.ParseMarkdown has cognitive complexity 82 (threshold 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 · CiTestGateSites.Js (cognitive 77) · ×1
  • CiTestGateSites.Js (cognitive 77) engine/src/Scanner/Readiness/P12/CiTestGateSites.cs:350 — CiTestGateSites.Js has cognitive complexity 77 (threshold 15). Of this number, 63 points are the body's own statements and 14 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentRedundancy.JudgeAsync (cognitive 75) · ×1
  • CommentRedundancy.JudgeAsync (cognitive 75) engine/src/Scanner/Docs/D24/CommentRedundancy.cs:156 — CommentRedundancy.JudgeAsync has cognitive complexity 75 (threshold 15). Of this number, 74 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ProgrammeTrackedFacts.Collect (cognitive 73) · ×1
  • ProgrammeTrackedFacts.Collect (cognitive 73) src/Kennel.Core/LanguageTraining/Services/ProgrammeTrackedFacts.cs:72 — ProgrammeTrackedFacts.Collect has cognitive complexity 73 (threshold 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 · TurnRunner.RunTurnAsync (cognitive 73) · ×1
  • TurnRunner.RunTurnAsync (cognitive 73) src/Kennel.Improve.Orchestrator/Turns/TurnRunner.cs:196 — TurnRunner.RunTurnAsync has cognitive complexity 73 (threshold 15). Of this number, 70 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisclosurePolicyReading.Judge (cognitive 72) · ×1
  • DisclosurePolicyReading.Judge (cognitive 72) engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyReading.cs:50 — DisclosurePolicyReading.Judge has cognitive complexity 72 (threshold 15). Of this number, 71 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ModuleReferenceScanner.Mask (cognitive 72) · ×1
  • ModuleReferenceScanner.Mask (cognitive 72) engine/src/Core/ArchitectureContracts/ModuleReferences.cs:220 — ModuleReferenceScanner.Mask has cognitive complexity 72 (threshold 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 · follow_slot.main (cognitive 62) · ×1
  • follow_slot.main (cognitive 62) tools/improve/follow_slot.py:100 — follow_slot.main has cognitive complexity 62 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 3 (8 pts), error handling 2 (6 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrainingCensusBackfill.SurveyAsync (cognitive 58) · ×1
  • TrainingCensusBackfill.SurveyAsync (cognitive 58) src/Kennel.Core/LanguageTraining/Application/TrainingCensusBackfill.cs:34 — TrainingCensusBackfill.SurveyAsync has cognitive complexity 58 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DocumentationShape.Judge (cognitive 57) · ×1
  • DocumentationShape.Judge (cognitive 57) engine/src/Scanner/Docs/D19/DocumentationShape.cs:109 — DocumentationShape.Judge has cognitive complexity 57 (threshold 15). Of this number, 51 points are the body's own statements and 6 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 · DocumentReader.Read (cognitive 56) · ×1
  • DocumentReader.Read (cognitive 56) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:461 — DocumentReader.Read has cognitive complexity 56 (threshold 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 · AdrRecordIntegrity.Parse (cognitive 54) · ×1
  • AdrRecordIntegrity.Parse (cognitive 54) engine/src/Scanner/Docs/D20/AdrRecordIntegrity.cs:558 — AdrRecordIntegrity.Parse has cognitive complexity 54 (threshold 15). Of this number, 52 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsInventory.Select (cognitive 53) · ×1
  • JsInventory.Select (cognitive 53) engine/src/Scanner/Readiness/P12/JsInventory.cs:346 — JsInventory.Select has cognitive complexity 53 (threshold 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 · JsSinkReader.Chain (cognitive 53) · ×1
  • JsSinkReader.Chain (cognitive 53) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1161 — JsSinkReader.Chain has cognitive complexity 53 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ExecutiveBrief.Input (cognitive 52) · ×1
  • ExecutiveBrief.Input (cognitive 52) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:986 — ExecutiveBrief.Input has cognitive complexity 52 (threshold 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 · AdrProhibitionConformance.ReadManifests (cognitive 52) · ×1
  • AdrProhibitionConformance.ReadManifests (cognitive 52) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:1138 — AdrProhibitionConformance.ReadManifests has cognitive complexity 52 (threshold 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 · JsSinkReader.Kind (cognitive 52) · ×1
  • JsSinkReader.Kind (cognitive 52) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1029 — JsSinkReader.Kind has cognitive complexity 52 (threshold 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 · SyscallConfinementAnalyzer.Judge (cognitive 51) · ×1
  • SyscallConfinementAnalyzer.Judge (cognitive 51) engine/src/Scanner/SecurityPosture/D41/SyscallConfinementAnalyzer.cs:152 — SyscallConfinementAnalyzer.Judge has cognitive complexity 51 (threshold 15). Of this number, 50 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 · PagesDeployWorkflow.PublishedBy (cognitive 51) · ×1
  • PagesDeployWorkflow.PublishedBy (cognitive 51) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PagesDeployWorkflow.cs:192 — PagesDeployWorkflow.PublishedBy has cognitive complexity 51 (threshold 15). Of this number, 40 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CiTestGateSites.DotNet (cognitive 50) · ×1
  • CiTestGateSites.DotNet (cognitive 50) engine/src/Scanner/Readiness/P12/CiTestGateSites.cs:137 — CiTestGateSites.DotNet has cognitive complexity 50 (threshold 15). Of this number, 44 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkupCodeSpans.Spans (cognitive 50) · ×1
  • MarkupCodeSpans.Spans (cognitive 50) engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupCodeSpans.cs:111 — MarkupCodeSpans.Spans has cognitive complexity 50 (threshold 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 · ChangelogNarrationBackfill.SurveyPageAsync (cognitive 50) · ×1
  • ChangelogNarrationBackfill.SurveyPageAsync (cognitive 50) src/Kennel.Watchdog.Core/Reporting/Application/ChangelogNarrationBackfill.cs:118 — ChangelogNarrationBackfill.SurveyPageAsync has cognitive complexity 50 (threshold 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 · RouteAuthorizationScan.Next (cognitive 49) · ×1
  • RouteAuthorizationScan.Next (cognitive 49) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:338 — RouteAuthorizationScan.Next has cognitive complexity 49 (threshold 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 · ShellGate.JudgeAsync (cognitive 49) · ×1
  • ShellGate.JudgeAsync (cognitive 49) src/Kennel.Improve.Orchestrator/Gates/ShellGate.cs:99 — ShellGate.JudgeAsync has cognitive complexity 49 (threshold 15). Of this number, 48 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 · AdrProhibitionConformance.FromSentence (cognitive 46) · ×1
  • AdrProhibitionConformance.FromSentence (cognitive 46) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:319 — AdrProhibitionConformance.FromSentence has cognitive complexity 46 (threshold 15). Of this number, 44 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CallResultGate.Gates (cognitive 46) · ×1
  • CallResultGate.Gates (cognitive 46) engine/src/Core/Roslyn/CodeModel/CallResultGate.cs:51 — CallResultGate.Gates has cognitive complexity 46 (threshold 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 · ExecutiveBrief.Paragraph1 (cognitive 45) · ×1
  • ExecutiveBrief.Paragraph1 (cognitive 45) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:45 — ExecutiveBrief.Paragraph1 has cognitive complexity 45 (threshold 15). Of this number, 44 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AdrProhibitionConformance.Blank (cognitive 45) · ×1
  • AdrProhibitionConformance.Blank (cognitive 45) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:988 — AdrProhibitionConformance.Blank has cognitive complexity 45 (threshold 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 · PersonalNotificationsBackfill.SurveyAsync (cognitive 45) · ×1
  • PersonalNotificationsBackfill.SurveyAsync (cognitive 45) src/Kennel.Core/Accounts/Application/PersonalNotificationsBackfill.cs:48 — PersonalNotificationsBackfill.SurveyAsync has cognitive complexity 45 (threshold 15). Of this number, 43 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnvironmentCrossing.Read (cognitive 43) · ×1
  • EnvironmentCrossing.Read (cognitive 43) engine/src/Scanner/LlmJudgedLanguage/LA4/EnvironmentCrossing.cs:47 — EnvironmentCrossing.Read has cognitive complexity 43 (threshold 15). Of this number, 42 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 · Builder.ParseRst (cognitive 43) · ×1
  • Builder.ParseRst (cognitive 43) engine/src/Scanner/Docs/D19/MarkupDocument.cs:469 — Builder.ParseRst has cognitive complexity 43 (threshold 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 · CiTestCommands.PackageScript (cognitive 43) · ×1
  • CiTestCommands.PackageScript (cognitive 43) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:230 — CiTestCommands.PackageScript has cognitive complexity 43 (threshold 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 · ShredderWritePath.Build (cognitive 43) · ×1
  • ShredderWritePath.Build (cognitive 43) engine/src/Scanner/ModelAware/ES3/ShredderWritePath.cs:41 — ShredderWritePath.Build has cognitive complexity 43 (threshold 15). Of this number, 38 points are the body's own statements and 5 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DomainInfraEdgesTs.SourceEdges (cognitive 43) · ×1
  • DomainInfraEdgesTs.SourceEdges (cognitive 43) engine/src/Scanner/ModelAware/DM6/DomainInfraEdgesTs.cs:231 — DomainInfraEdgesTs.SourceEdges has cognitive complexity 43 (threshold 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 · ProductComplianceBackfill.SurveyAsync (cognitive 43) · ×1
  • ProductComplianceBackfill.SurveyAsync (cognitive 43) src/Kennel.Core/Compliance/Application/ProductComplianceBackfill.cs:31 — ProductComplianceBackfill.SurveyAsync has cognitive complexity 43 (threshold 15). Of this number, 42 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 · RepositoryStatesBackfill.SurveyAsync (cognitive 43) · ×1
  • RepositoryStatesBackfill.SurveyAsync (cognitive 43) src/Kennel.Core/Repositories/Application/RepositoryStatesBackfill.cs:38 — RepositoryStatesBackfill.SurveyAsync has cognitive complexity 43 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ForeignWebSecurityScan.ReadNodeKdfCost (cognitive 42) · ×1
  • ForeignWebSecurityScan.ReadNodeKdfCost (cognitive 42) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.PasswordStorage.cs:280 — ForeignWebSecurityScan.ReadNodeKdfCost has cognitive complexity 42 (threshold 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 · ExecutiveBrief.Paragraph3 (cognitive 41) · ×1
  • ExecutiveBrief.Paragraph3 (cognitive 41) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:274 — ExecutiveBrief.Paragraph3 has cognitive complexity 41 (threshold 15). Of this number, 32 points are the body's own statements and 9 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DockerImages.Read (cognitive 41) · ×1
  • DockerImages.Read (cognitive 41) engine/src/Scanner/LlmJudgedLanguage/LA4/DockerImages.cs:140 — DockerImages.Read has cognitive complexity 41 (threshold 15). Of this number, 40 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 · ForeignComplianceScan.ReadPythonAccessControl (cognitive 41) · ×1
  • ForeignComplianceScan.ReadPythonAccessControl (cognitive 41) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.PythonAccessControl.cs:39 — ForeignComplianceScan.ReadPythonAccessControl has cognitive complexity 41 (threshold 15). Of this number, 40 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 · ForeignDisposalDutyScan.InspectKotlin (cognitive 40) · ×1
  • ForeignDisposalDutyScan.InspectKotlin (cognitive 40) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:98 — ForeignDisposalDutyScan.InspectKotlin has cognitive complexity 40 (threshold 15). 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 · Model.AnswersOnlyConstants (cognitive 40) · ×1
  • Model.AnswersOnlyConstants (cognitive 40) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1322 — Model.AnswersOnlyConstants has cognitive complexity 40 (threshold 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 · DependencyCheck.Evaluate (cognitive 40) · ×1
  • DependencyCheck.Evaluate (cognitive 40) src/Kennel.Watchdog.Core/Agents/ModuleGraph/DependencyCheck.cs:120 — DependencyCheck.Evaluate has cognitive complexity 40 (threshold 15). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Closer.Plan (cognitive 40) · ×1
  • Closer.Plan (cognitive 40) src/Kennel.Improve.Orchestrator/Turns/Closer.cs:51 — Closer.Plan has cognitive complexity 40 (threshold 15). Of this number, 38 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReportViewModelFactory.BuildBriefFacts (cognitive 39) · ×1
  • ReportViewModelFactory.BuildBriefFacts (cognitive 39) engine/src/CodeHealth.Reporting/Templates/ReportViewModelFactory.cs:457 — ReportViewModelFactory.BuildBriefFacts has cognitive complexity 39 (threshold 15). Of this number, 32 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ProgrammeCyclesBackfill.SurveyAsync (cognitive 39) · ×1
  • ProgrammeCyclesBackfill.SurveyAsync (cognitive 39) src/Kennel.Core/LanguageTraining/Application/ProgrammeCyclesBackfill.cs:35 — ProgrammeCyclesBackfill.SurveyAsync has cognitive complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · JsSinkReader.Read (cognitive 38) · ×1
  • JsSinkReader.Read (cognitive 38) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:561 — JsSinkReader.Read has cognitive complexity 38 (threshold 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 · RouteAuthorizationScan.Nest (cognitive 38) · ×1
  • RouteAuthorizationScan.Nest (cognitive 38) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:280 — RouteAuthorizationScan.Nest has cognitive complexity 38 (threshold 15). Of this number, 37 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 · UnifiedDiff.Parse (cognitive 38) · ×1
  • UnifiedDiff.Parse (cognitive 38) src/Kennel.Watchdog.Core/Agents/ModuleGraph/UnifiedDiff.cs:25 — UnifiedDiff.Parse has cognitive complexity 38 (threshold 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 · ForeignDocumentWalkScan.ReadKotlinBrace (cognitive 37) · ×1
  • ForeignDocumentWalkScan.ReadKotlinBrace (cognitive 37) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:735 — ForeignDocumentWalkScan.ReadKotlinBrace has cognitive complexity 37 (threshold 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 · JsSinkReader.IndexFunctions (cognitive 37) · ×1
  • JsSinkReader.IndexFunctions (cognitive 37) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:482 — JsSinkReader.IndexFunctions has cognitive complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Model.NextMiddlewareCovers (cognitive 37) · ×1
  • Model.NextMiddlewareCovers (cognitive 37) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1099 — Model.NextMiddlewareCovers has cognitive complexity 37 (threshold 15). Of this number, 34 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SecurityDisclosuresBackfill.SurveyAsync (cognitive 37) · ×1
  • SecurityDisclosuresBackfill.SurveyAsync (cognitive 37) src/Kennel.Watchdog.Core/Agents/Application/SecurityDisclosuresBackfill.cs:38 — SecurityDisclosuresBackfill.SurveyAsync has cognitive complexity 37 (threshold 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 · Builder.ParseAsciiDoc (cognitive 36) · ×1
  • Builder.ParseAsciiDoc (cognitive 36) engine/src/Scanner/Docs/D19/MarkupDocument.cs:691 — Builder.ParseAsciiDoc has cognitive complexity 36 (threshold 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 · ApplePackageManagerPresence.LockResolvesOnlyOwnLibrary (cognitive 36) · ×1
  • ApplePackageManagerPresence.LockResolvesOnlyOwnLibrary (cognitive 36) engine/src/Core/Dependencies/ApplePackageManagerPresence.cs:162 — ApplePackageManagerPresence.LockResolvesOnlyOwnLibrary has cognitive complexity 36 (threshold 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 · DestructuredPersonalDataLogScan.DeclaredTypeNames (cognitive 36) · ×1
  • DestructuredPersonalDataLogScan.DeclaredTypeNames (cognitive 36) engine/src/Scanner/Security/Shared.CSharp/DestructuredPersonalDataLogScan.cs:383 — DestructuredPersonalDataLogScan.DeclaredTypeNames has cognitive complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · KennelOperatorCommands.ProjectionsAsync (cognitive 36) · ×1
  • KennelOperatorCommands.ProjectionsAsync (cognitive 36) src/Kennel.Infrastructure/Operations/KennelOperatorCommands.cs:87 — KennelOperatorCommands.ProjectionsAsync has cognitive complexity 36 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · catalog-digest.main (cognitive 36) · ×1
  • catalog-digest.main (cognitive 36) tools/rubric/catalog-digest.py:87 — catalog-digest.main has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 7, loops 1 (2 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 · DocumentReader.CheckPackageVersions (cognitive 35) · ×1
  • DocumentReader.CheckPackageVersions (cognitive 35) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:2047 — DocumentReader.CheckPackageVersions has cognitive complexity 35 (threshold 15). Of this number, 34 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 · Model.Index (cognitive 35) · ×1
  • Model.Index (cognitive 35) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:822 — Model.Index has cognitive complexity 35 (threshold 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 · Model.SessionGate (cognitive 35) · ×1
  • Model.SessionGate (cognitive 35) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1270 — Model.SessionGate has cognitive complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DocMeasuredClaims.Satisfies (cognitive 34) · ×1
  • DocMeasuredClaims.Satisfies (cognitive 34) engine/src/Scanner/Maturity/M4/DocMeasuredClaims.cs:152 — DocMeasuredClaims.Satisfies has cognitive complexity 34 (threshold 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 · ForeignDeadBranchScan.CopyKotlinLiteral (cognitive 34) · ×1
  • ForeignDeadBranchScan.CopyKotlinLiteral (cognitive 34) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:627 — ForeignDeadBranchScan.CopyKotlinLiteral has cognitive complexity 34 (threshold 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 · NuGetPackageSites.Read (cognitive 34) · ×1
  • NuGetPackageSites.Read (cognitive 34) engine/src/Core/Dependencies/NuGetPackageSites.cs:129 — NuGetPackageSites.Read has cognitive complexity 34 (threshold 15). 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 · DestructuredPersonalDataLogScan.BuildFacts (cognitive 34) · ×1
  • DestructuredPersonalDataLogScan.BuildFacts (cognitive 34) engine/src/Scanner/Security/Shared.CSharp/DestructuredPersonalDataLogScan.cs:196 — DestructuredPersonalDataLogScan.BuildFacts has cognitive complexity 34 (threshold 15). Of this number, 29 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServiceLoop.RunAsync (cognitive 34) · ×1
  • ServiceLoop.RunAsync (cognitive 34) src/Kennel.Improve.Orchestrator/Turns/ServiceLoop.cs:95 — ServiceLoop.RunAsync has cognitive complexity 34 (threshold 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 · backlog-drop-unreachable.verified_cohort (cognitive 34) · ×1
  • backlog-drop-unreachable.verified_cohort (cognitive 34) tools/ops/backlog-drop-unreachable.py:254 — backlog-drop-unreachable.verified_cohort has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 4 (9 pts), boolean chains 6 (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 · CiTestGatePipeline.AzureStepLists (cognitive 33) · ×1
  • CiTestGatePipeline.AzureStepLists (cognitive 33) engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:748 — CiTestGatePipeline.AzureStepLists has cognitive complexity 33 (threshold 15). 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 · MutationIdempotencyAnalyzer.IdentitySlots (cognitive 33) · ×1
  • MutationIdempotencyAnalyzer.IdentitySlots (cognitive 33) engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.Evidence.cs:417 — MutationIdempotencyAnalyzer.IdentitySlots has cognitive complexity 33 (threshold 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 · ScriptBlockingScan.Scopes (cognitive 33) · ×1
  • ScriptBlockingScan.Scopes (cognitive 33) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:382 — ScriptBlockingScan.Scopes has cognitive complexity 33 (threshold 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 · QuestionnaireResponsesBackfill.SurveyAsync (cognitive 33) · ×1
  • QuestionnaireResponsesBackfill.SurveyAsync (cognitive 33) src/Kennel.Core/Questionnaires/Services/QuestionnaireResponsesBackfill.cs:31 — QuestionnaireResponsesBackfill.SurveyAsync has cognitive complexity 33 (threshold 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 · ExecutiveBrief.Paragraph2 (cognitive 32) · ×1
  • ExecutiveBrief.Paragraph2 (cognitive 32) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:173 — ExecutiveBrief.Paragraph2 has cognitive complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PnpmLock.Read (cognitive 32) · ×1
  • PnpmLock.Read (cognitive 32) engine/src/Scanner/Dependencies/D12/NpmDeprecatedDependencies.cs:427 — PnpmLock.Read has cognitive complexity 32 (threshold 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 · AdrRecordIntegrity.Body (cognitive 32) · ×1
  • AdrRecordIntegrity.Body (cognitive 32) engine/src/Scanner/Docs/D20/AdrRecordIntegrity.cs:725 — AdrRecordIntegrity.Body has cognitive complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DocumentReader.CheckNodeVersion (cognitive 32) · ×1
  • DocumentReader.CheckNodeVersion (cognitive 32) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1962 — DocumentReader.CheckNodeVersion has cognitive complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KotlinShape.ReadFun (cognitive 32) · ×1
  • KotlinShape.ReadFun (cognitive 32) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:321 — KotlinShape.ReadFun has cognitive complexity 32 (threshold 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 · JsSinkReader.MarkupBuilders (cognitive 32) · ×1
  • JsSinkReader.MarkupBuilders (cognitive 32) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:258 — JsSinkReader.MarkupBuilders has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · CssRules.Blank (cognitive 32) · ×1
  • CssRules.Blank (cognitive 32) engine/src/Scanner/Accessibility/AC6/CssRules.cs:34 — CssRules.Blank has cognitive complexity 32 (threshold 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 · RoslynDuplicationDetector.TrimToSharedLines (cognitive 32) · ×1
  • RoslynDuplicationDetector.TrimToSharedLines (cognitive 32) engine/src/Core/CodeShape/RoslynDuplicationDetector.ExactSpan.cs:51 — RoslynDuplicationDetector.TrimToSharedLines has cognitive complexity 32 (threshold 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 · NativeSecretScanner.EnclosingSection (cognitive 32) · ×1
  • NativeSecretScanner.EnclosingSection (cognitive 32) engine/src/Core/Security/NativeSecretScanner.CryptographicKey.cs:272 — NativeSecretScanner.EnclosingSection has cognitive complexity 32 (threshold 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 · MarkupContexts.TagState (cognitive 32) · ×1
  • MarkupContexts.TagState (cognitive 32) engine/src/Core/MarkupOutput/MarkupContexts.cs:159 — MarkupContexts.TagState has cognitive complexity 32 (threshold 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 · EventsBackfillRunner.RunAsync (cognitive 32) · ×1
  • EventsBackfillRunner.RunAsync (cognitive 32) src/Kennel.Hosting/Operations/EventsBackfillRunner.cs:22 — EventsBackfillRunner.RunAsync has cognitive complexity 32 (threshold 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 · BacklogBackfill.SurveyAsync (cognitive 32) · ×1
  • BacklogBackfill.SurveyAsync (cognitive 32) src/Kennel.Core/LanguageTraining/Application/BacklogBackfill.cs:27 — BacklogBackfill.SurveyAsync has cognitive complexity 32 (threshold 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 · RaterAppealsBackfill.SurveyAsync (cognitive 32) · ×1
  • RaterAppealsBackfill.SurveyAsync (cognitive 32) src/Kennel.Core/Questionnaires/Application/RaterAppealsBackfill.cs:29 — RaterAppealsBackfill.SurveyAsync has cognitive complexity 32 (threshold 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 · TurnGate.CheckAsync (cognitive 32) · ×1
  • TurnGate.CheckAsync (cognitive 32) src/Kennel.Improve.Orchestrator/Gates/TurnGate.cs:342 — TurnGate.CheckAsync has cognitive complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectSeams.Of (cognitive 31) · ×1
  • ProjectSeams.Of (cognitive 31) engine/src/Scanner/Architecture/D26/ProjectSeams.cs:94 — ProjectSeams.Of has cognitive complexity 31 (threshold 15). Of this number, 24 points are the body's own statements and 7 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 · AdrProhibitionConformance.DecisionSentences (cognitive 31) · ×1
  • AdrProhibitionConformance.DecisionSentences (cognitive 31) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:228 — AdrProhibitionConformance.DecisionSentences has cognitive complexity 31 (threshold 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 · DocumentReader.PathCandidate (cognitive 31) · ×1
  • DocumentReader.PathCandidate (cognitive 31) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1656 — DocumentReader.PathCandidate has cognitive complexity 31 (threshold 15). Of this number, 30 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 · DocInventory.ReadRouteStrings (cognitive 31) · ×1
  • DocInventory.ReadRouteStrings (cognitive 31) engine/src/Scanner/Maturity/M4/DocInventory.cs:451 — DocInventory.ReadRouteStrings has cognitive complexity 31 (threshold 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 · FrontendTestSuiteMasking.CollectPrunedTreeAliasModuleRefs (cognitive 31) · ×1
  • FrontendTestSuiteMasking.CollectPrunedTreeAliasModuleRefs (cognitive 31) engine/src/Core/Frontend/FrontendTestSuiteMasking.cs:774 — FrontendTestSuiteMasking.CollectPrunedTreeAliasModuleRefs has cognitive complexity 31 (threshold 15). 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 · ModuleReferenceScanner.Scan (cognitive 31) · ×1
  • ModuleReferenceScanner.Scan (cognitive 31) engine/src/Core/ArchitectureContracts/ModuleReferences.cs:93 — ModuleReferenceScanner.Scan has cognitive complexity 31 (threshold 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 · AccountPreferencesBackfill.SurveyAsync (cognitive 31) · ×1
  • AccountPreferencesBackfill.SurveyAsync (cognitive 31) src/Kennel.Core/Accounts/Application/AccountPreferencesBackfill.cs:44 — AccountPreferencesBackfill.SurveyAsync has cognitive complexity 31 (threshold 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 · RunTelemetryBackfill.SurveyAsync (cognitive 31) · ×1
  • RunTelemetryBackfill.SurveyAsync (cognitive 31) src/Kennel.Core/Scans/ReadModels/RunTelemetryBackfill.cs:35 — RunTelemetryBackfill.SurveyAsync has cognitive complexity 31 (threshold 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 · ScanQueueIssuesBackfill.SurveyAsync (cognitive 31) · ×1
  • ScanQueueIssuesBackfill.SurveyAsync (cognitive 31) src/Kennel.Watchdog.Core/Scheduling/Services/ScanQueueIssuesBackfill.cs:39 — ScanQueueIssuesBackfill.SurveyAsync has cognitive complexity 31 (threshold 15). Of this number, 30 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 · SecurityTxtReading.Judge (cognitive 30) · ×1
  • SecurityTxtReading.Judge (cognitive 30) engine/src/Scanner/LlmJudgedLanguage/LA3/SecurityTxtReading.cs:19 — SecurityTxtReading.Judge has cognitive complexity 30 (threshold 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 · NamingRules.Sigils (cognitive 30) · ×1
  • NamingRules.Sigils (cognitive 30) engine/src/Scanner/Docs/D21/NamingRules.cs:460 — NamingRules.Sigils has cognitive complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentValueAnalyzer.Card (cognitive 30) · ×1
  • CommentValueAnalyzer.Card (cognitive 30) engine/src/Scanner/Docs/D24/CommentValueAnalyzer.cs:59 — CommentValueAnalyzer.Card has cognitive complexity 30 (threshold 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 · CiTestCommands.ReadPackage (cognitive 30) · ×1
  • CiTestCommands.ReadPackage (cognitive 30) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:463 — CiTestCommands.ReadPackage has cognitive complexity 30 (threshold 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 · UntrustedMarkupScan.ScanCSharpAsync (cognitive 30) · ×1
  • UntrustedMarkupScan.ScanCSharpAsync (cognitive 30) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:62 — UntrustedMarkupScan.ScanCSharpAsync has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ScriptBlockingScan.Scan (cognitive 30) · ×1
  • ScriptBlockingScan.Scan (cognitive 30) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:107 — ScriptBlockingScan.Scan has cognitive complexity 30 (threshold 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 · RouteAuthorizationScan.ExpressAndFastify (cognitive 30) · ×1
  • RouteAuthorizationScan.ExpressAndFastify (cognitive 30) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:176 — RouteAuthorizationScan.ExpressAndFastify has cognitive complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FocusOutlineRemoval.Replaced (cognitive 30) · ×1
  • FocusOutlineRemoval.Replaced (cognitive 30) engine/src/Scanner/Accessibility/AC6/FocusOutlineRemoval.cs:366 — FocusOutlineRemoval.Replaced has cognitive complexity 30 (threshold 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 · AdrRulesBlock.Parse (cognitive 30) · ×1
  • AdrRulesBlock.Parse (cognitive 30) engine/src/Core/Adr/AdrRulesBlock.cs:95 — AdrRulesBlock.Parse has cognitive complexity 30 (threshold 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 · census.census (cognitive 30) · ×1
  • census.census (cognitive 30) docs/plans/deterministic-engine/tools/census.py:90 — census.census has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 5 (7 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KnowledgeInertShapes.IsOneIdentifierSubstitution (cognitive 29) · ×1
  • KnowledgeInertShapes.IsOneIdentifierSubstitution (cognitive 29) engine/src/CodeHealth.Toolchain/Git/KnowledgeInertShapes.cs:199 — KnowledgeInertShapes.IsOneIdentifierSubstitution has cognitive complexity 29 (threshold 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 · SliceModuleSites.ForeignImports (cognitive 29) · ×1
  • SliceModuleSites.ForeignImports (cognitive 29) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:81 — SliceModuleSites.ForeignImports has cognitive complexity 29 (threshold 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 · SliceModuleSites.Uses (cognitive 29) · ×1
  • SliceModuleSites.Uses (cognitive 29) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:273 — SliceModuleSites.Uses has cognitive complexity 29 (threshold 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 · DocumentReader.CheckPackageManager (cognitive 29) · ×1
  • DocumentReader.CheckPackageManager (cognitive 29) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1175 — DocumentReader.CheckPackageManager has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · CiTestGateSites.ChangeFilters (cognitive 29) · ×1
  • CiTestGateSites.ChangeFilters (cognitive 29) engine/src/Scanner/Readiness/P12/CiTestGateSites.cs:533 — CiTestGateSites.ChangeFilters has cognitive complexity 29 (threshold 15). Of this number, 25 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventPopulation.TreatedAsEvents (cognitive 29) · ×1
  • EventPopulation.TreatedAsEvents (cognitive 29) engine/src/Scanner/ModelAware/ModelAware.Prework/EventPopulation.cs:94 — EventPopulation.TreatedAsEvents has cognitive complexity 29 (threshold 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 · MarkupRepositoryFacts.Read (cognitive 29) · ×1
  • MarkupRepositoryFacts.Read (cognitive 29) engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupRepositoryFacts.cs:97 — MarkupRepositoryFacts.Read has cognitive complexity 29 (threshold 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 · NotificationsBackfill.SurveyAsync (cognitive 29) · ×1
  • NotificationsBackfill.SurveyAsync (cognitive 29) src/Kennel.Core/Inbox/Application/NotificationsBackfill.cs:36 — NotificationsBackfill.SurveyAsync has cognitive complexity 29 (threshold 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 · MaintainerKeysBackfill.SurveyAsync (cognitive 29) · ×1
  • MaintainerKeysBackfill.SurveyAsync (cognitive 29) src/Kennel.Watchdog.Core/Agents/Application/MaintainerKeysBackfill.cs:38 — MaintainerKeysBackfill.SurveyAsync has cognitive complexity 29 (threshold 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 · CheckoutFiles.Walk (cognitive 28) · ×1
  • CheckoutFiles.Walk (cognitive 28) engine/src/CodeHealth.Toolchain/Git/CheckoutFiles.cs:185 — CheckoutFiles.Walk has cognitive complexity 28 (threshold 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 · AdrRecordIntegrity.SupersedeRows (cognitive 28) · ×1
  • AdrRecordIntegrity.SupersedeRows (cognitive 28) engine/src/Scanner/Docs/D20/AdrRecordIntegrity.cs:430 — AdrRecordIntegrity.SupersedeRows has cognitive complexity 28 (threshold 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 · CommentRedundancy.Judge (cognitive 28) · ×1
  • CommentRedundancy.Judge (cognitive 28) engine/src/Scanner/Docs/D24/CommentRedundancy.cs:324 — CommentRedundancy.Judge has cognitive complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CiTestGatePipeline.Actions (cognitive 28) · ×1
  • CiTestGatePipeline.Actions (cognitive 28) engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:316 — CiTestGatePipeline.Actions has cognitive complexity 28 (threshold 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 · PrimitiveDataClumpsAnalyzer.RoslynShapes (cognitive 28) · ×1
  • PrimitiveDataClumpsAnalyzer.RoslynShapes (cognitive 28) engine/src/Scanner/ModelAware/DM8/PrimitiveDataClumpsAnalyzer.cs:101 — PrimitiveDataClumpsAnalyzer.RoslynShapes has cognitive complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (PrimitiveDataClumpsAnalyzer.NeutralShapes) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · PrimitiveDataClumpsAnalyzer.NeutralShapes (cognitive 28) · ×1
  • PrimitiveDataClumpsAnalyzer.NeutralShapes (cognitive 28) engine/src/Scanner/ModelAware/DM8/PrimitiveDataClumpsAnalyzer.cs:234 — PrimitiveDataClumpsAnalyzer.NeutralShapes has cognitive complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (PrimitiveDataClumpsAnalyzer.RoslynShapes) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · KubernetesFieldAnchor.FirstContainerWithout (cognitive 28) · ×1
  • KubernetesFieldAnchor.FirstContainerWithout (cognitive 28) engine/src/Scanner/Security/D31/Scanners/KubernetesFieldAnchor.cs:187 — KubernetesFieldAnchor.FirstContainerWithout has cognitive complexity 28 (threshold 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 · CheckoutWalk.Files (cognitive 28) · ×1
  • CheckoutWalk.Files (cognitive 28) engine/src/Scanner/Security/Shared/Scanners/CheckoutWalk.cs:31 — CheckoutWalk.Files has cognitive complexity 28 (threshold 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 · NativeSecretScanner.CryptoKeyBindingType (cognitive 28) · ×1
  • NativeSecretScanner.CryptoKeyBindingType (cognitive 28) engine/src/Core/Security/NativeSecretScanner.CryptographicKey.cs:86 — NativeSecretScanner.CryptoKeyBindingType has cognitive complexity 28 (threshold 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 · RepoModel.IdentifierAccess (cognitive 28) · ×1
  • RepoModel.IdentifierAccess (cognitive 28) engine/src/Scanner/Security/Shared.CSharp/EndpointAuthorizationScan.cs:1350 — RepoModel.IdentifierAccess has cognitive complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IngestedRunsBackfill.SurveyAsync (cognitive 28) · ×1
  • IngestedRunsBackfill.SurveyAsync (cognitive 28) src/Kennel.Core/Scans/ReadModels/IngestedRunsBackfill.cs:58 — IngestedRunsBackfill.SurveyAsync has cognitive complexity 28 (threshold 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 · AgentKeysBackfill.SurveyAsync (cognitive 28) · ×1
  • AgentKeysBackfill.SurveyAsync (cognitive 28) src/Kennel.Watchdog.Core/Agents/Application/AgentKeysBackfill.cs:38 — AgentKeysBackfill.SurveyAsync has cognitive complexity 28 (threshold 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 · PackageSelector.Select (cognitive 28) · ×1
  • PackageSelector.Select (cognitive 28) src/Kennel.Improve.Orchestrator/Queue/PackageSelector.cs:25 — PackageSelector.Select has cognitive complexity 28 (threshold 15). Of this number, 16 points are the body's own statements and 12 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · kennel-verb.main (cognitive 28) · ×1
  • kennel-verb.main (cognitive 28) tools/ops/kennel-verb.py:42 — kennel-verb.main has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, loops 3 (4 pts), ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KnowledgeInertShapes.Tokens (cognitive 27) · ×1
  • KnowledgeInertShapes.Tokens (cognitive 27) engine/src/CodeHealth.Toolchain/Git/KnowledgeInertShapes.cs:276 — KnowledgeInertShapes.Tokens has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DockerImages.BuiltBy (cognitive 27) · ×1
  • DockerImages.BuiltBy (cognitive 27) engine/src/Scanner/LlmJudgedLanguage/LA4/DockerImages.cs:300 — DockerImages.BuiltBy has cognitive complexity 27 (threshold 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 · CodeIndex.Resolve (cognitive 27) · ×1
  • CodeIndex.Resolve (cognitive 27) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:631 — CodeIndex.Resolve has cognitive complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SliceModuleSites.DeclarationAt (cognitive 27) · ×1
  • SliceModuleSites.DeclarationAt (cognitive 27) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:342 — SliceModuleSites.DeclarationAt has cognitive complexity 27 (threshold 15). 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 · ForeignScopedGlobalMutationScan.InspectPhp (cognitive 27) · ×1
  • ForeignScopedGlobalMutationScan.InspectPhp (cognitive 27) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:119 — ForeignScopedGlobalMutationScan.InspectPhp has cognitive complexity 27 (threshold 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 · ForeignDocumentWalkScan.KotlinParameterIn (cognitive 27) · ×1
  • ForeignDocumentWalkScan.KotlinParameterIn (cognitive 27) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:869 — ForeignDocumentWalkScan.KotlinParameterIn has cognitive complexity 27 (threshold 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 · ScriptBlockingScan.SpinsOnACallbackFlag (cognitive 27) · ×1
  • ScriptBlockingScan.SpinsOnACallbackFlag (cognitive 27) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:230 — ScriptBlockingScan.SpinsOnACallbackFlag has cognitive complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · EngineRuleWalk.Files (cognitive 27) · ×1
  • EngineRuleWalk.Files (cognitive 27) engine/src/Scanner/Security/D29/Scanners/EngineRuleWalk.cs:34 — EngineRuleWalk.Files has cognitive complexity 27 (threshold 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 · NamingPopulation.AddType (cognitive 27) · ×1
  • NamingPopulation.AddType (cognitive 27) engine/src/Core/Naming/NamingPopulation.cs:179 — NamingPopulation.AddType has cognitive complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · JsUnusedDeclarations.DeclaredPrivateMembers (cognitive 27) · ×1
  • JsUnusedDeclarations.DeclaredPrivateMembers (cognitive 27) engine/src/Core/Frontend/JsUnusedDeclarations.cs:192 — JsUnusedDeclarations.DeclaredPrivateMembers has cognitive complexity 27 (threshold 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 · VerificationFindingsBackfill.SurveyAsync (cognitive 27) · ×1
  • VerificationFindingsBackfill.SurveyAsync (cognitive 27) src/Kennel.Core/LanguageTraining/Application/VerificationFindingsBackfill.cs:33 — VerificationFindingsBackfill.SurveyAsync has cognitive complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SponsorshipSettingsBackfill.SurveyAsync (cognitive 27) · ×1
  • SponsorshipSettingsBackfill.SurveyAsync (cognitive 27) src/Kennel.Core/Repositories/Application/SettingsBackfills.cs:33 — SponsorshipSettingsBackfill.SurveyAsync has cognitive complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScanQueueOperatorLeversBackfill.SurveyAsync (cognitive 27) · ×1
  • ScanQueueOperatorLeversBackfill.SurveyAsync (cognitive 27) src/Kennel.Watchdog.Core/Scheduling/Services/ScanQueueOperatorLeversBackfill.cs:30 — ScanQueueOperatorLeversBackfill.SurveyAsync has cognitive complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AcceptanceCriteriaBackfill.SurveyAsync (cognitive 27) · ×1
  • AcceptanceCriteriaBackfill.SurveyAsync (cognitive 27) src/Kennel.Assay.Core/Profiles/Services/AcceptanceCriteriaBackfill.cs:75 — AcceptanceCriteriaBackfill.SurveyAsync has cognitive complexity 27 (threshold 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 · ForeignComplianceScan.ReadSwiftRetention (cognitive 26) · ×1
  • ForeignComplianceScan.ReadSwiftRetention (cognitive 26) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.SwiftRetention.cs:28 — ForeignComplianceScan.ReadSwiftRetention has cognitive complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DotNetTestInventory.TestsIn (cognitive 26) · ×1
  • DotNetTestInventory.TestsIn (cognitive 26) engine/src/Scanner/Readiness/P12/DotNetTestInventory.cs:249 — DotNetTestInventory.TestsIn has cognitive complexity 26 (threshold 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 · MutationIdempotencyAnalyzer.ReturnsTheAnswerOf (cognitive 26) · ×1
  • MutationIdempotencyAnalyzer.ReturnsTheAnswerOf (cognitive 26) engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.Evidence.cs:131 — MutationIdempotencyAnalyzer.ReturnsTheAnswerOf has cognitive complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · InlineScriptShadow.BlankRazor (cognitive 26) · ×1
  • InlineScriptShadow.BlankRazor (cognitive 26) engine/src/Scanner/Security/D29/Scanners/InlineScriptShadow.cs:208 — InlineScriptShadow.BlankRazor has cognitive complexity 26 (threshold 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 · ReducedMotion.InScript (cognitive 26) · ×1
  • ReducedMotion.InScript (cognitive 26) engine/src/Scanner/Accessibility/AC6/ReducedMotion.cs:356 — ReducedMotion.InScript has cognitive complexity 26 (threshold 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 · BoundaryCouplingDetector.PublicSurfaceTypes (cognitive 26) · ×1
  • BoundaryCouplingDetector.PublicSurfaceTypes (cognitive 26) engine/src/Core/Architecture/BoundaryCouplingDetector.cs:577 — BoundaryCouplingDetector.PublicSurfaceTypes has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · CoverletCoverageCollector.CollectUncachedAsync (cognitive 26) · ×1
  • CoverletCoverageCollector.CollectUncachedAsync (cognitive 26) engine/src/Core/Testing/CoverletCoverageCollector.cs:83 — CoverletCoverageCollector.CollectUncachedAsync has cognitive complexity 26 (threshold 15). 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 · Walk.Field (cognitive 26) · ×1
  • Walk.Field (cognitive 26) engine/src/Scanner/Security/Shared.CSharp/RedirectDestinationAuthority.cs:547 — Walk.Field has cognitive complexity 26 (threshold 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 · RunPlansBackfill.SurveyAsync (cognitive 26) · ×1
  • RunPlansBackfill.SurveyAsync (cognitive 26) src/Kennel.Core/LanguageTraining/Application/RunPlansBackfill.cs:25 — RunPlansBackfill.SurveyAsync has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AdvisoryFeedbackBackfill.SurveyAsync (cognitive 26) · ×1
  • AdvisoryFeedbackBackfill.SurveyAsync (cognitive 26) src/Kennel.Watchdog.Core/Agents/Application/AdvisoryFeedbackBackfill.cs:40 — AdvisoryFeedbackBackfill.SurveyAsync has cognitive complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TurnGate.RunAsync (cognitive 26) · ×1
  • TurnGate.RunAsync (cognitive 26) src/Kennel.Improve.Orchestrator/Gates/TurnGate.cs:83 — TurnGate.RunAsync has cognitive complexity 26 (threshold 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 · SupplyChainProvenanceAnalyzer.UnusedWriteScopeGrants (cognitive 25) · ×1
  • SupplyChainProvenanceAnalyzer.UnusedWriteScopeGrants (cognitive 25) engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.TokenSites.cs:333 — SupplyChainProvenanceAnalyzer.UnusedWriteScopeGrants has cognitive complexity 25 (threshold 15). Of this number, 24 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 · DocumentReader.ReadSpan (cognitive 25) · ×1
  • DocumentReader.ReadSpan (cognitive 25) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:668 — DocumentReader.ReadSpan has cognitive complexity 25 (threshold 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 · ForeignExceptionHandlingScan.DiscardingFunction (cognitive 25) · ×1
  • ForeignExceptionHandlingScan.DiscardingFunction (cognitive 25) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Js.cs:258 — ForeignExceptionHandlingScan.DiscardingFunction has cognitive complexity 25 (threshold 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 · CSharpSinkReader.IsSourcedWalk (cognitive 25) · ×1
  • CSharpSinkReader.IsSourcedWalk (cognitive 25) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:664 — CSharpSinkReader.IsSourcedWalk has cognitive complexity 25 (threshold 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 · Lexed.FunctionNameOfBody (cognitive 25) · ×1
  • Lexed.FunctionNameOfBody (cognitive 25) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:706 — Lexed.FunctionNameOfBody has cognitive complexity 25 (threshold 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 · MarkupEscapingRecheck.EveryTemplateHoleEncodedForItsContext (cognitive 25) · ×1
  • MarkupEscapingRecheck.EveryTemplateHoleEncodedForItsContext (cognitive 25) engine/src/Scanner/Security/Shared/Scanners/MarkupEscapingRecheck.cs:161 — MarkupEscapingRecheck.EveryTemplateHoleEncodedForItsContext has cognitive complexity 25 (threshold 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 · CssRules.ParseBlock (cognitive 25) · ×1
  • CssRules.ParseBlock (cognitive 25) engine/src/Scanner/Accessibility/AC6/CssRules.cs:103 — CssRules.ParseBlock has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · EslintBoundariesRules.Parse (cognitive 25) · ×1
  • EslintBoundariesRules.Parse (cognitive 25) engine/src/Core/Frontend/EslintBoundariesRules.cs:202 — EslintBoundariesRules.Parse has cognitive complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SwiftPackageHygiene.ParsePodfileLock (cognitive 25) · ×1
  • SwiftPackageHygiene.ParsePodfileLock (cognitive 25) engine/src/Core/Languages/Swift/Security/SwiftPackageHygiene.CocoaPods.cs:76 — SwiftPackageHygiene.ParsePodfileLock has cognitive complexity 25 (threshold 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 · ProjectionFold.BuildPlan (cognitive 25) · ×1
  • ProjectionFold.BuildPlan (cognitive 25) src/Kennel.Hosting/Projections/ProjectionFold.cs:85 — ProjectionFold.BuildPlan has cognitive complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FreePeriodEligibility.DecideAsync (cognitive 25) · ×1
  • FreePeriodEligibility.DecideAsync (cognitive 25) src/Kennel.Core/Billing/Partners/FreePeriodEligibility.cs:59 — FreePeriodEligibility.DecideAsync has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DetectorGapsBackfill.SurveyAsync (cognitive 25) · ×1
  • DetectorGapsBackfill.SurveyAsync (cognitive 25) src/Kennel.Watchdog.Core/Agents/Application/DetectorGapsBackfill.cs:38 — DetectorGapsBackfill.SurveyAsync has cognitive complexity 25 (threshold 15). Of this number, 24 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 · CalibrationTicketsBackfill.SurveyAsync (cognitive 25) · ×1
  • CalibrationTicketsBackfill.SurveyAsync (cognitive 25) src/Kennel.Watchdog.Core/Calibration/Application/CalibrationTicketsBackfill.cs:37 — CalibrationTicketsBackfill.SurveyAsync has cognitive complexity 25 (threshold 15). Of this number, 24 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 · AssayCodebaseReader.CodebaseAsync (cognitive 25) · ×1
  • AssayCodebaseReader.CodebaseAsync (cognitive 25) src/Kennel.Assay.Core/DecisionReports/Pages/AssayCodebase/AssayCodebaseReader.cs:56 — AssayCodebaseReader.CodebaseAsync has cognitive complexity 25 (threshold 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 · DocumentationShape.FindUnits (cognitive 24) · ×1
  • DocumentationShape.FindUnits (cognitive 24) engine/src/Scanner/Docs/D19/DocumentationShape.cs:297 — DocumentationShape.FindUnits has cognitive complexity 24 (threshold 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 · DocumentationShape.AddEmptySections (cognitive 24) · ×1
  • DocumentationShape.AddEmptySections (cognitive 24) engine/src/Scanner/Docs/D19/DocumentationShape.cs:687 — DocumentationShape.AddEmptySections has cognitive complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeIndex.ManifestUses (cognitive 24) · ×1
  • CodeIndex.ManifestUses (cognitive 24) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:825 — CodeIndex.ManifestUses has cognitive complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArchitectureModelPrework.ResolutionsFrom (cognitive 24) · ×1
  • ArchitectureModelPrework.ResolutionsFrom (cognitive 24) engine/src/Scanner/ArchitectureModel/ArchitectureModel.Prework/ArchitectureModelPrework.cs:407 — ArchitectureModelPrework.ResolutionsFrom has cognitive complexity 24 (threshold 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 · ElixirServerControls.ReadHeaderLiterals (cognitive 24) · ×1
  • ElixirServerControls.ReadHeaderLiterals (cognitive 24) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ElixirServerControls.cs:148 — ElixirServerControls.ReadHeaderLiterals has cognitive complexity 24 (threshold 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 · ForeignComplianceScan.ReadCSharpEntity (cognitive 24) · ×1
  • ForeignComplianceScan.ReadCSharpEntity (cognitive 24) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.CSharp.cs:171 — ForeignComplianceScan.ReadCSharpEntity has cognitive complexity 24 (threshold 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 · CiTestCommands.SplitShell (cognitive 24) · ×1
  • CiTestCommands.SplitShell (cognitive 24) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:588 — CiTestCommands.SplitShell has cognitive complexity 24 (threshold 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 · KotlinFile.KindOfType (cognitive 24) · ×1
  • KotlinFile.KindOfType (cognitive 24) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:523 — KotlinFile.KindOfType has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · JsSinkReader.ReturnsMarkupOnly (cognitive 24) · ×1
  • JsSinkReader.ReturnsMarkupOnly (cognitive 24) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1295 — JsSinkReader.ReturnsMarkupOnly has cognitive complexity 24 (threshold 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 · JsRegexCaptureGroupRecheck.ReadStringLiteral (cognitive 24) · ×1
  • JsRegexCaptureGroupRecheck.ReadStringLiteral (cognitive 24) engine/src/Scanner/Security/D29/Scanners/JsRegexCaptureGroupRecheck.cs:856 — JsRegexCaptureGroupRecheck.ReadStringLiteral has cognitive complexity 24 (threshold 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 · Model.IsConstantSpan (cognitive 24) · ×1
  • Model.IsConstantSpan (cognitive 24) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1423 — Model.IsConstantSpan has cognitive complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · VisualAndMotionAnalyzer.RepoReducedMotion (cognitive 24) · ×1
  • VisualAndMotionAnalyzer.RepoReducedMotion (cognitive 24) engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:1268 — VisualAndMotionAnalyzer.RepoReducedMotion has cognitive complexity 24 (threshold 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 · Walk.ActiveOptionalDependencies (cognitive 24) · ×1
  • Walk.ActiveOptionalDependencies (cognitive 24) engine/src/Core/Dependencies/CargoUnlockedResolver.cs:177 — Walk.ActiveOptionalDependencies has cognitive complexity 24 (threshold 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 · EslintBoundariesRules.ElementOf (cognitive 24) · ×1
  • EslintBoundariesRules.ElementOf (cognitive 24) engine/src/Core/Frontend/EslintBoundariesRules.cs:156 — EslintBoundariesRules.ElementOf has cognitive complexity 24 (threshold 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 · FrontendTestAndDocRefs.CollectCucumberSupportGlobs (cognitive 24) · ×1
  • FrontendTestAndDocRefs.CollectCucumberSupportGlobs (cognitive 24) engine/src/Core/Frontend/FrontendTestAndDocRefs.Cucumber.cs:46 — FrontendTestAndDocRefs.CollectCucumberSupportGlobs has cognitive complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsUnusedDeclarations.References (cognitive 24) · ×1
  • JsUnusedDeclarations.References (cognitive 24) engine/src/Core/Frontend/JsUnusedDeclarations.cs:391 — JsUnusedDeclarations.References has cognitive complexity 24 (threshold 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 · Builder.Walk (cognitive 24) · ×1
  • Builder.Walk (cognitive 24) engine/src/Core/Roslyn/CodeModel/ReferenceIndex.cs:303 — Builder.Walk has cognitive complexity 24 (threshold 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 · RepositoryCardsBackfill.SurveyAsync (cognitive 24) · ×1
  • RepositoryCardsBackfill.SurveyAsync (cognitive 24) src/Kennel.Core/Repositories/Application/RepositoryCardsBackfill.cs:46 — RepositoryCardsBackfill.SurveyAsync has cognitive complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThreatModelReviewsBackfill.SurveyAsync (cognitive 24) · ×1
  • ThreatModelReviewsBackfill.SurveyAsync (cognitive 24) src/Kennel.Watchdog.Core/Security/Application/ThreatModelReviewsBackfill.cs:39 — ThreatModelReviewsBackfill.SurveyAsync has cognitive complexity 24 (threshold 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 · ReportSubscriptionsBackfill.SurveyAsync (cognitive 24) · ×1
  • ReportSubscriptionsBackfill.SurveyAsync (cognitive 24) src/Kennel.Assay.Core/DecisionReports/Persistence/DecisionReportOpsBackfills.cs:37 — ReportSubscriptionsBackfill.SurveyAsync has cognitive complexity 24 (threshold 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 · StaffRegisterBackfill.SurveyAsync (cognitive 24) · ×1
  • StaffRegisterBackfill.SurveyAsync (cognitive 24) src/Kennel.Admin.Core/Admin/Services/AdminOpsBackfills.cs:42 — StaffRegisterBackfill.SurveyAsync has cognitive complexity 24 (threshold 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 · Options.Parse (cognitive 24) · ×1
  • Options.Parse (cognitive 24) src/Kennel.Improve.Orchestrator/Program.cs:483 — Options.Parse has cognitive complexity 24 (threshold 15). 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 · kennel-onboarding.initReportSetup (cognitive 24) · ×1
  • kennel-onboarding.initReportSetup (cognitive 24) src/Kennel.Ui/wwwroot/kennel-onboarding.js:47 — kennel-onboarding.initReportSetup has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 8, ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 76, 50, 71, …). 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 · ChangelogNarrator.SemanticDedupeAsync (cognitive 23) · ×1
  • ChangelogNarrator.SemanticDedupeAsync (cognitive 23) engine/src/CodeHealth.Reporting/Changelog/ChangelogNarrator.cs:1242 — ChangelogNarrator.SemanticDedupeAsync has cognitive complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NuGetDeprecationSites.DirectSite (cognitive 23) · ×1
  • NuGetDeprecationSites.DirectSite (cognitive 23) engine/src/Scanner/Dependencies/D12/NuGetDeprecationSites.cs:113 — NuGetDeprecationSites.DirectSite has cognitive complexity 23 (threshold 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 · LicenceEvidence.ManifestDeclaration (cognitive 23) · ×1
  • LicenceEvidence.ManifestDeclaration (cognitive 23) engine/src/Scanner/Docs/D19/LicenceEvidence.cs:121 — LicenceEvidence.ManifestDeclaration has cognitive complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · CodeIndex.Uses (cognitive 23) · ×1
  • CodeIndex.Uses (cognitive 23) engine/src/Scanner/Docs/D25/AdrProhibitionConformance.cs:787 — CodeIndex.Uses has cognitive complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SliceModuleSites.CollectBindings (cognitive 23) · ×1
  • SliceModuleSites.CollectBindings (cognitive 23) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:189 — SliceModuleSites.CollectBindings has cognitive complexity 23 (threshold 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 · ArchitectureModelPrework.TryReadRegistration (cognitive 23) · ×1
  • ArchitectureModelPrework.TryReadRegistration (cognitive 23) engine/src/Scanner/ArchitectureModel/ArchitectureModel.Prework/ArchitectureModelPrework.cs:203 — ArchitectureModelPrework.TryReadRegistration has cognitive complexity 23 (threshold 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 · DataSubjectRightsDimension.RunAsync (cognitive 23) · ×1
  • DataSubjectRightsDimension.RunAsync (cognitive 23) engine/src/Scanner/Compliance/C5/DataSubjectRightsDimension.cs:26 — DataSubjectRightsDimension.RunAsync has cognitive complexity 23 (threshold 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 · ForeignWebSecurityScan.ServerMadeAt (cognitive 23) · ×1
  • ForeignWebSecurityScan.ServerMadeAt (cognitive 23) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.NodeTransport.cs:169 — ForeignWebSecurityScan.ServerMadeAt has cognitive complexity 23 (threshold 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 · CiTestCommands.WorkspaceTask (cognitive 23) · ×1
  • CiTestCommands.WorkspaceTask (cognitive 23) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:331 — CiTestCommands.WorkspaceTask has cognitive complexity 23 (threshold 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 · CiTestGatePipeline.Azure (cognitive 23) · ×1
  • CiTestGatePipeline.Azure (cognitive 23) engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:716 — CiTestGatePipeline.Azure has cognitive complexity 23 (threshold 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 · CiTestGatePipeline.Circle (cognitive 23) · ×1
  • CiTestGatePipeline.Circle (cognitive 23) engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:813 — CiTestGatePipeline.Circle has cognitive complexity 23 (threshold 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 · JsInventory.ReadPackage (cognitive 23) · ×1
  • JsInventory.ReadPackage (cognitive 23) engine/src/Scanner/Readiness/P12/JsInventory.cs:94 — JsInventory.ReadPackage has cognitive complexity 23 (threshold 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 · ForeignDiagnosticMaterialisationScan.LexPhp (cognitive 23) · ×1
  • ForeignDiagnosticMaterialisationScan.LexPhp (cognitive 23) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Php.cs:141 — ForeignDiagnosticMaterialisationScan.LexPhp has cognitive complexity 23 (threshold 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 · CancellationPropagationAnalyzer.JudgeMethod (cognitive 23) · ×1
  • CancellationPropagationAnalyzer.JudgeMethod (cognitive 23) engine/src/Scanner/Defects/X2/CancellationPropagationAnalyzer.cs:106 — CancellationPropagationAnalyzer.JudgeMethod has cognitive complexity 23 (threshold 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 · JsSinkReader.TaintedCalls (cognitive 23) · ×1
  • JsSinkReader.TaintedCalls (cognitive 23) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:331 — JsSinkReader.TaintedCalls has cognitive complexity 23 (threshold 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 · SilentFallbackAnalyzer.Run (cognitive 23) · ×1
  • SilentFallbackAnalyzer.Run (cognitive 23) engine/src/Scanner/Defects/X7/SilentFallbackAnalyzer.cs:29 — SilentFallbackAnalyzer.Run has cognitive complexity 23 (threshold 15). 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 · ScriptBlockingScan.BlockAfterParameters (cognitive 23) · ×1
  • ScriptBlockingScan.BlockAfterParameters (cognitive 23) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:497 — ScriptBlockingScan.BlockAfterParameters has cognitive complexity 23 (threshold 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 · Lexed.FunctionBodyAfter (cognitive 23) · ×1
  • Lexed.FunctionBodyAfter (cognitive 23) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:615 — Lexed.FunctionBodyAfter has cognitive complexity 23 (threshold 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 · VisualAndMotionAnalyzer.RepoFocusOutlineRemoval (cognitive 23) · ×1
  • VisualAndMotionAnalyzer.RepoFocusOutlineRemoval (cognitive 23) engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:1151 — VisualAndMotionAnalyzer.RepoFocusOutlineRemoval has cognitive complexity 23 (threshold 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 · NativeSecretScanner.CredentialSinkIdentifiers (cognitive 23) · ×1
  • NativeSecretScanner.CredentialSinkIdentifiers (cognitive 23) engine/src/Core/Security/NativeSecretScanner.HardcodedCredential.cs:215 — NativeSecretScanner.CredentialSinkIdentifiers has cognitive complexity 23 (threshold 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 · JsUnusedDeclarations.InitializerIsAValue (cognitive 23) · ×1
  • JsUnusedDeclarations.InitializerIsAValue (cognitive 23) engine/src/Core/Frontend/JsUnusedDeclarations.cs:612 — JsUnusedDeclarations.InitializerIsAValue has cognitive complexity 23 (threshold 15). 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 · JsUnusedDeclarations.ClassBody (cognitive 23) · ×1
  • JsUnusedDeclarations.ClassBody (cognitive 23) engine/src/Core/Frontend/JsUnusedDeclarations.cs:707 — JsUnusedDeclarations.ClassBody has cognitive complexity 23 (threshold 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 · EndpointAuthorizationScan.Check (cognitive 23) · ×1
  • EndpointAuthorizationScan.Check (cognitive 23) engine/src/Scanner/Security/Shared.CSharp/EndpointAuthorizationScan.cs:771 — EndpointAuthorizationScan.Check has cognitive complexity 23 (threshold 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 · MarkupContexts.ContextAfter (cognitive 23) · ×1
  • MarkupContexts.ContextAfter (cognitive 23) engine/src/Core/MarkupOutput/MarkupContexts.cs:98 — MarkupContexts.ContextAfter has cognitive complexity 23 (threshold 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 · OnboardingDoorsBackfill.SurveyAsync (cognitive 23) · ×1
  • OnboardingDoorsBackfill.SurveyAsync (cognitive 23) src/Kennel.Core/Onboarding/Application/OnboardingDoorsBackfill.cs:46 — OnboardingDoorsBackfill.SurveyAsync has cognitive complexity 23 (threshold 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 · DistillationRequestsBackfill.SurveyAsync (cognitive 23) · ×1
  • DistillationRequestsBackfill.SurveyAsync (cognitive 23) src/Kennel.Watchdog.Core/Reporting/Application/DistillationRequestsBackfill.cs:51 — DistillationRequestsBackfill.SurveyAsync has cognitive complexity 23 (threshold 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 · ProjectCohesionAnalyzer.RunAsync (cognitive 22) · ×1
  • ProjectCohesionAnalyzer.RunAsync (cognitive 22) engine/src/Scanner/Architecture/D26/ProjectCohesionAnalyzer.cs:32 — ProjectCohesionAnalyzer.RunAsync has cognitive complexity 22 (threshold 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 · SupplyChainProvenanceAnalyzer.TriggerNames (cognitive 22) · ×1
  • SupplyChainProvenanceAnalyzer.TriggerNames (cognitive 22) engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.TokenSites.cs:185 — SupplyChainProvenanceAnalyzer.TriggerNames has cognitive complexity 22 (threshold 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 · DocumentationTree.Scan (cognitive 22) · ×1
  • DocumentationTree.Scan (cognitive 22) engine/src/Scanner/Docs/D19/DocumentationTree.cs:55 — DocumentationTree.Scan has cognitive complexity 22 (threshold 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 · SliceModuleSites.StatementEnd (cognitive 22) · ×1
  • SliceModuleSites.StatementEnd (cognitive 22) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:144 — SliceModuleSites.StatementEnd has cognitive complexity 22 (threshold 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 · DocumentReader.CheckDotnet (cognitive 22) · ×1
  • DocumentReader.CheckDotnet (cognitive 22) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:973 — DocumentReader.CheckDotnet has cognitive complexity 22 (threshold 15). 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 · DocumentReader.StatedRunFolder (cognitive 22) · ×1
  • DocumentReader.StatedRunFolder (cognitive 22) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1081 — DocumentReader.StatedRunFolder has cognitive complexity 22 (threshold 15). Of this number, 21 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 · ForeignWebSecurityScan.ReadPlaintextPasswordComparison (cognitive 22) · ×1
  • ForeignWebSecurityScan.ReadPlaintextPasswordComparison (cognitive 22) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.PasswordStorage.cs:413 — ForeignWebSecurityScan.ReadPlaintextPasswordComparison has cognitive complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · S1Analyzer.AddWebControlAbsenceRows (cognitive 22) · ×1
  • S1Analyzer.AddWebControlAbsenceRows (cognitive 22) engine/src/Scanner/Compliance/S1/S1Analyzer.cs:926 — S1Analyzer.AddWebControlAbsenceRows has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DotNetTestInventory.Targets (cognitive 22) · ×1
  • DotNetTestInventory.Targets (cognitive 22) engine/src/Scanner/Readiness/P12/DotNetTestInventory.cs:373 — DotNetTestInventory.Targets has cognitive complexity 22 (threshold 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 · PhpShape.PhpShape.ctor (cognitive 22) · ×1
  • PhpShape.PhpShape.ctor (cognitive 22) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:552 — PhpShape.PhpShape.ctor has cognitive complexity 22 (threshold 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 · BlockingOnAsyncSites.Invocation (cognitive 22) · ×1
  • BlockingOnAsyncSites.Invocation (cognitive 22) engine/src/Scanner/Defects/X1/BlockingOnAsyncSites.cs:72 — BlockingOnAsyncSites.Invocation has cognitive complexity 22 (threshold 15). 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 · ForeignAsyncCorrectnessScan.KotlinFunBody (cognitive 22) · ×1
  • ForeignAsyncCorrectnessScan.KotlinFunBody (cognitive 22) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Kotlin.cs:133 — ForeignAsyncCorrectnessScan.KotlinFunBody has cognitive complexity 22 (threshold 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 · ForeignExceptionHandlingScan.InspectJsTokens (cognitive 22) · ×1
  • ForeignExceptionHandlingScan.InspectJsTokens (cognitive 22) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Js.cs:68 — ForeignExceptionHandlingScan.InspectJsTokens has cognitive complexity 22 (threshold 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 · ForeignStructuredLoggingScan.ScalaFactoriesOf (cognitive 22) · ×1
  • ForeignStructuredLoggingScan.ScalaFactoriesOf (cognitive 22) engine/src/Scanner/Defects/X4/ForeignStructuredLoggingScan.Scala.cs:458 — ForeignStructuredLoggingScan.ScalaFactoriesOf has cognitive complexity 22 (threshold 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 · JsSinkReader.IndexDeclarations (cognitive 22) · ×1
  • JsSinkReader.IndexDeclarations (cognitive 22) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1398 — JsSinkReader.IndexDeclarations has cognitive complexity 22 (threshold 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 · NeutralCallees.WritesBelow (cognitive 22) · ×1
  • NeutralCallees.WritesBelow (cognitive 22) engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs:1582 — NeutralCallees.WritesBelow has cognitive complexity 22 (threshold 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 · RoslynCallees.WritesBelow (cognitive 22) · ×1
  • RoslynCallees.WritesBelow (cognitive 22) engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs:1690 — RoslynCallees.WritesBelow has cognitive complexity 22 (threshold 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 · DomainInfraBoundaryAnalyzer.DomainReferencesInfrastructureAsync (cognitive 22) · ×1
  • DomainInfraBoundaryAnalyzer.DomainReferencesInfrastructureAsync (cognitive 22) engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:152 — DomainInfraBoundaryAnalyzer.DomainReferencesInfrastructureAsync has cognitive complexity 22 (threshold 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 · InlineScriptShadow.RazorExpressionEnd (cognitive 22) · ×1
  • InlineScriptShadow.RazorExpressionEnd (cognitive 22) engine/src/Scanner/Security/D29/Scanners/InlineScriptShadow.cs:269 — InlineScriptShadow.RazorExpressionEnd has cognitive complexity 22 (threshold 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 · PlaywrightNodeRenderer.RenderAsync (cognitive 22) · ×1
  • PlaywrightNodeRenderer.RenderAsync (cognitive 22) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PlaywrightNodeRenderer.cs:58 — PlaywrightNodeRenderer.RenderAsync has cognitive complexity 22 (threshold 15). 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 · ApplicationScope.ApplicationInternalLibraries (cognitive 22) · ×1
  • ApplicationScope.ApplicationInternalLibraries (cognitive 22) engine/src/Core/ExplicitDebt/ApplicationScope.cs:83 — ApplicationScope.ApplicationInternalLibraries has cognitive complexity 22 (threshold 15). Of this number, 21 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 · TypeClasses.Classify (cognitive 22) · ×1
  • TypeClasses.Classify (cognitive 22) engine/src/Core/Naming/TypeClasses.cs:77 — TypeClasses.Classify has cognitive complexity 22 (threshold 15). 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 · NpmPackageSites.NpmLockEntries (cognitive 22) · ×1
  • NpmPackageSites.NpmLockEntries (cognitive 22) engine/src/Core/Dependencies/NpmPackageSites.cs:180 — NpmPackageSites.NpmLockEntries has cognitive complexity 22 (threshold 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 · NuGetPackageSites.LockEntries (cognitive 22) · ×1
  • NuGetPackageSites.LockEntries (cognitive 22) engine/src/Core/Dependencies/NuGetPackageSites.cs:455 — NuGetPackageSites.LockEntries has cognitive complexity 22 (threshold 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 · BoundaryCouplingDetector.ScanType (cognitive 22) · ×1
  • BoundaryCouplingDetector.ScanType (cognitive 22) engine/src/Core/Architecture/BoundaryCouplingDetector.cs:499 — BoundaryCouplingDetector.ScanType has cognitive complexity 22 (threshold 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 · NativeSecretScanner.HardcodedCredentialType (cognitive 22) · ×1
  • NativeSecretScanner.HardcodedCredentialType (cognitive 22) engine/src/Core/Security/NativeSecretScanner.HardcodedCredential.cs:553 — NativeSecretScanner.HardcodedCredentialType has cognitive complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · FrontendBoundaries.CollectBarrelLayerViolations (cognitive 22) · ×1
  • FrontendBoundaries.CollectBarrelLayerViolations (cognitive 22) engine/src/Core/Frontend/FrontendBoundaries.Layers.cs:139 — FrontendBoundaries.CollectBarrelLayerViolations has cognitive complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsUnusedDeclarations.ParameterProperties (cognitive 22) · ×1
  • JsUnusedDeclarations.ParameterProperties (cognitive 22) engine/src/Core/Frontend/JsUnusedDeclarations.cs:333 — JsUnusedDeclarations.ParameterProperties has cognitive complexity 22 (threshold 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 · DeclarationsReader.ForViewerAsync (cognitive 22) · ×1
  • DeclarationsReader.ForViewerAsync (cognitive 22) src/Kennel.Core/Compliance/Pages/Declarations/DeclarationsReader.cs:38 — DeclarationsReader.ForViewerAsync has cognitive complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProductComplianceProjection.Fold (cognitive 22) · ×1
  • ProductComplianceProjection.Fold (cognitive 22) src/Kennel.Core/Compliance/Pages/ProductCompliance/ProductComplianceProjection.cs:49 — ProductComplianceProjection.Fold has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BacklogService.HygieneBar (cognitive 22) · ×1
  • BacklogService.HygieneBar (cognitive 22) src/Kennel.Core/LanguageTraining/Services/BacklogService.Hygiene.cs:531 — BacklogService.HygieneBar has cognitive complexity 22 (threshold 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 · BenchRows.Moved (cognitive 22) · ×1
  • BenchRows.Moved (cognitive 22) src/Kennel.Improve.Orchestrator/Gates/BenchRows.cs:35 — BenchRows.Moved has cognitive complexity 22 (threshold 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 · decisionfacts.decisions_of (cognitive 22) · ×1
  • decisionfacts.decisions_of (cognitive 22) engine/sidecars/python-frontend/decisionfacts.py:45 — decisionfacts.decisions_of has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 6 (10 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 · ab.match (cognitive 22) · ×1
  • ab.match (cognitive 22) tools/deterministic-ab/ab.py:52 — ab.match has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 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 · ExecutiveBrief.Problems (cognitive 21) · ×1
  • ExecutiveBrief.Problems (cognitive 21) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:1185 — ExecutiveBrief.Problems has cognitive complexity 21 (threshold 15). 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 · LinkTextQualityAnalyzer.Analyze (cognitive 21) · ×1
  • LinkTextQualityAnalyzer.Analyze (cognitive 21) engine/src/Scanner/LlmJudgedLanguage/LA5/LinkTextQualityAnalyzer.cs:45 — LinkTextQualityAnalyzer.Analyze has cognitive complexity 21 (threshold 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 · NpmDeprecatedDependencies.Collect (cognitive 21) · ×1
  • NpmDeprecatedDependencies.Collect (cognitive 21) engine/src/Scanner/Dependencies/D12/NpmDeprecatedDependencies.cs:99 — NpmDeprecatedDependencies.Collect has cognitive complexity 21 (threshold 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 · IncompletenessAnalyzer.ReadRazorViews (cognitive 21) · ×1
  • IncompletenessAnalyzer.ReadRazorViews (cognitive 21) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.RazorScript.cs:269 — IncompletenessAnalyzer.ReadRazorViews has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · CaptiveDependenciesAnalyzer.DotNetCaptives (cognitive 21) · ×1
  • CaptiveDependenciesAnalyzer.DotNetCaptives (cognitive 21) engine/src/Scanner/ArchitectureModel/AX1/CaptiveDependenciesAnalyzer.cs:146 — CaptiveDependenciesAnalyzer.DotNetCaptives has cognitive complexity 21 (threshold 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 · DependencyDirectionAnalyzer.DependencyRuleDirection (cognitive 21) · ×1
  • DependencyDirectionAnalyzer.DependencyRuleDirection (cognitive 21) engine/src/Scanner/ArchitectureModel/AX4/DependencyDirectionAnalyzer.cs:86 — DependencyDirectionAnalyzer.DependencyRuleDirection has cognitive complexity 21 (threshold 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 · DocInventory.ReadPackageJson (cognitive 21) · ×1
  • DocInventory.ReadPackageJson (cognitive 21) engine/src/Scanner/Maturity/M4/DocInventory.cs:617 — DocInventory.ReadPackageJson has cognitive complexity 21 (threshold 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 · DocInventory.ReadMsBuild (cognitive 21) · ×1
  • DocInventory.ReadMsBuild (cognitive 21) engine/src/Scanner/Maturity/M4/DocInventory.cs:668 — DocInventory.ReadMsBuild has cognitive complexity 21 (threshold 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 · DataRetentionDimension.RunAsync (cognitive 21) · ×1
  • DataRetentionDimension.RunAsync (cognitive 21) engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs:26 — DataRetentionDimension.RunAsync has cognitive complexity 21 (threshold 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 · ForeignWebSecurityScan.MaskElixir (cognitive 21) · ×1
  • ForeignWebSecurityScan.MaskElixir (cognitive 21) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:148 — ForeignWebSecurityScan.MaskElixir has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · CiTestGatePipeline.GitLab (cognitive 21) · ×1
  • CiTestGatePipeline.GitLab (cognitive 21) engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:567 — CiTestGatePipeline.GitLab has cognitive complexity 21 (threshold 15). 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 · DataMigrationsAnalyzer.DataMigrations (cognitive 21) · ×1
  • DataMigrationsAnalyzer.DataMigrations (cognitive 21) engine/src/Scanner/Readiness/P8/DataMigrationsAnalyzer.cs:15 — DataMigrationsAnalyzer.DataMigrations has cognitive complexity 21 (threshold 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 · ForeignDeadBranchScan.KotlinTypedNames (cognitive 21) · ×1
  • ForeignDeadBranchScan.KotlinTypedNames (cognitive 21) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:485 — ForeignDeadBranchScan.KotlinTypedNames has cognitive complexity 21 (threshold 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 · ShrinkLoopAnalyzer.ForeignCard (cognitive 21) · ×1
  • ShrinkLoopAnalyzer.ForeignCard (cognitive 21) engine/src/Scanner/Defects/X16/ShrinkLoopAnalyzer.cs:95 — ShrinkLoopAnalyzer.ForeignCard has cognitive complexity 21 (threshold 15). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 98). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · KotlinShape.DeclaresAType (cognitive 21) · ×1
  • KotlinShape.DeclaresAType (cognitive 21) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:502 — KotlinShape.DeclaresAType has cognitive complexity 21 (threshold 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 · ForeignAsyncCorrectnessScan.KotlinWalk (cognitive 21) · ×1
  • ForeignAsyncCorrectnessScan.KotlinWalk (cognitive 21) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Kotlin.cs:91 — ForeignAsyncCorrectnessScan.KotlinWalk has cognitive complexity 21 (threshold 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 · ForeignMarkupTaintScan.DialectOf (cognitive 21) · ×1
  • ForeignMarkupTaintScan.DialectOf (cognitive 21) engine/src/Scanner/Defects/X24/ForeignMarkupTaintScan.cs:207 — ForeignMarkupTaintScan.DialectOf has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ShredderWritePath.FieldValues (cognitive 21) · ×1
  • ShredderWritePath.FieldValues (cognitive 21) engine/src/Scanner/ModelAware/ES3/ShredderWritePath.cs:131 — ShredderWritePath.FieldValues has cognitive complexity 21 (threshold 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 · DomainInfraEdgesTs.StatementSpecifier (cognitive 21) · ×1
  • DomainInfraEdgesTs.StatementSpecifier (cognitive 21) engine/src/Scanner/ModelAware/DM6/DomainInfraEdgesTs.cs:480 — DomainInfraEdgesTs.StatementSpecifier has cognitive complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Model.Model.ctor (cognitive 21) · ×1
  • Model.Model.ctor (cognitive 21) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:763 — Model.Model.ctor has cognitive complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SocketAndUpgradeRecheck.ClientSocketOnlyProbesAPort (cognitive 21) · ×1
  • SocketAndUpgradeRecheck.ClientSocketOnlyProbesAPort (cognitive 21) engine/src/Scanner/Security/Shared/Scanners/SocketAndUpgradeRecheck.cs:139 — SocketAndUpgradeRecheck.ClientSocketOnlyProbesAPort has cognitive complexity 21 (threshold 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 · XmlParserFeatureRecheck.HelperReachesApi (cognitive 21) · ×1
  • XmlParserFeatureRecheck.HelperReachesApi (cognitive 21) engine/src/Scanner/Security/Shared/Scanners/XmlParserFeatureRecheck.cs:111 — XmlParserFeatureRecheck.HelperReachesApi has cognitive complexity 21 (threshold 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 · PlaywrightNodeRenderer.ReplayPagesJobAsync (cognitive 21) · ×1
  • PlaywrightNodeRenderer.ReplayPagesJobAsync (cognitive 21) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PlaywrightNodeRenderer.cs:316 — PlaywrightNodeRenderer.ReplayPagesJobAsync has cognitive complexity 21 (threshold 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 · AdrStatus.Locate (cognitive 21) · ×1
  • AdrStatus.Locate (cognitive 21) engine/src/Core/Adr/AdrStatus.cs:60 — AdrStatus.Locate has cognitive complexity 21 (threshold 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 · NativeSecretScanner.HoldsPositionalPassword (cognitive 21) · ×1
  • NativeSecretScanner.HoldsPositionalPassword (cognitive 21) engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:275 — NativeSecretScanner.HoldsPositionalPassword has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · JsTestQualityCensus.ReadMockFacts (cognitive 21) · ×1
  • JsTestQualityCensus.ReadMockFacts (cognitive 21) engine/src/Core/Testing/JsTestQualityCensus.MockDominance.cs:34 — JsTestQualityCensus.ReadMockFacts has cognitive complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrontendBoundaries.OriginOf (cognitive 21) · ×1
  • FrontendBoundaries.OriginOf (cognitive 21) engine/src/Core/Frontend/FrontendBoundaries.Layers.cs:202 — FrontendBoundaries.OriginOf has cognitive complexity 21 (threshold 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 · SourceImportModuleGraph.ImportLanguageOf (cognitive 21) · ×1
  • SourceImportModuleGraph.ImportLanguageOf (cognitive 21) engine/src/Core/Manifests/SourceImportModuleGraph.cs:160 — SourceImportModuleGraph.ImportLanguageOf has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ReferenceIndex.BuildAsync (cognitive 21) · ×1
  • ReferenceIndex.BuildAsync (cognitive 21) engine/src/Core/Roslyn/CodeModel/ReferenceIndex.cs:160 — ReferenceIndex.BuildAsync has cognitive complexity 21 (threshold 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 · UserFeedbackBackfill.SurveyAsync (cognitive 21) · ×1
  • UserFeedbackBackfill.SurveyAsync (cognitive 21) src/Kennel.Core/Accounts/Application/UserFeedbackBackfill.cs:32 — UserFeedbackBackfill.SurveyAsync has cognitive complexity 21 (threshold 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 · ProviderConnectionsBackfill.SurveyAsync (cognitive 21) · ×1
  • ProviderConnectionsBackfill.SurveyAsync (cognitive 21) src/Kennel.Core/Repositories/Application/ProviderConnectionsBackfill.cs:55 — ProviderConnectionsBackfill.SurveyAsync has cognitive complexity 21 (threshold 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 · MyQueueDocument.Cut (cognitive 21) · ×1
  • MyQueueDocument.Cut (cognitive 21) src/Kennel.Watchdog.Core/Scheduling/Pages/MyQueue/MyQueueDocument.cs:101 — MyQueueDocument.Cut has cognitive complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 111, 131, 109, …). 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 · scoreboard.rows (cognitive 21) · ×1
  • scoreboard.rows (cognitive 21) tools/improve/scoreboard.py:43 — scoreboard.rows has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (8 pts), ternaries 3 (8 pts), error handling 1 (2 pts), if/else 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 · outro.capture (cognitive 21) · ×1
  • outro.capture (cognitive 21) docs/marketing/infomercial/screen/brand/outro.mjs:84 — outro.capture has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (6 pts), boolean chains 2, error handling 1, ternaries 1 (nesting depth added 6). Of this number, 11 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExecutiveBrief.CriticalPlan (cognitive 20) · ×1
  • ExecutiveBrief.CriticalPlan (cognitive 20) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:487 — ExecutiveBrief.CriticalPlan has cognitive complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 558, 552, 515, …). 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 · KnownNarrations.Told (cognitive 20) · ×1
  • KnownNarrations.Told (cognitive 20) engine/src/CodeHealth.Reporting/Changelog/KnownNarrations.cs:224 — KnownNarrations.Told has cognitive complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisclosurePolicyReading.Classify (cognitive 20) · ×1
  • DisclosurePolicyReading.Classify (cognitive 20) engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyReading.cs:369 — DisclosurePolicyReading.Classify has cognitive complexity 20 (threshold 15). 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 · DisclosurePolicyReading.Scope (cognitive 20) · ×1
  • DisclosurePolicyReading.Scope (cognitive 20) engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyReading.cs:509 — DisclosurePolicyReading.Scope has cognitive complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AdrRecordIntegrity.SectionRows (cognitive 20) · ×1
  • AdrRecordIntegrity.SectionRows (cognitive 20) engine/src/Scanner/Docs/D20/AdrRecordIntegrity.cs:185 — AdrRecordIntegrity.SectionRows has cognitive complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NamingRules.AffixPromise (cognitive 20) · ×1
  • NamingRules.AffixPromise (cognitive 20) engine/src/Scanner/Docs/D21/NamingRules.cs:349 — NamingRules.AffixPromise has cognitive complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VbDocRestatement.Items (cognitive 20) · ×1
  • VbDocRestatement.Items (cognitive 20) engine/src/Scanner/Docs/D24/VbDocRestatement.cs:15 — VbDocRestatement.Items has cognitive complexity 20 (threshold 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 · IncompletenessAnalyzer.MatchingBrace (cognitive 20) · ×1
  • IncompletenessAnalyzer.MatchingBrace (cognitive 20) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.RazorScript.cs:191 — IncompletenessAnalyzer.MatchingBrace has cognitive complexity 20 (threshold 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 · SliceReferenceSites.Findings (cognitive 20) · ×1
  • SliceReferenceSites.Findings (cognitive 20) engine/src/Scanner/ArchitectureModel/AX7/SliceReferenceSites.cs:30 — SliceReferenceSites.Findings has cognitive complexity 20 (threshold 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 · ForeignWebSecurityScan.JoseBuilderAt (cognitive 20) · ×1
  • ForeignWebSecurityScan.JoseBuilderAt (cognitive 20) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:229 — ForeignWebSecurityScan.JoseBuilderAt has cognitive complexity 20 (threshold 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 · ForeignWebSecurityScan.BindImport (cognitive 20) · ×1
  • ForeignWebSecurityScan.BindImport (cognitive 20) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:1276 — ForeignWebSecurityScan.BindImport has cognitive complexity 20 (threshold 15). 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 · ForeignComplianceScan.ReadElixirAccessControl (cognitive 20) · ×1
  • ForeignComplianceScan.ReadElixirAccessControl (cognitive 20) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAccessControl.cs:105 — ForeignComplianceScan.ReadElixirAccessControl has cognitive complexity 20 (threshold 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 · CiTestCommands.ResolveSegment (cognitive 20) · ×1
  • CiTestCommands.ResolveSegment (cognitive 20) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:89 — CiTestCommands.ResolveSegment has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CiTestGatePipeline.Read (cognitive 20) · ×1
  • CiTestGatePipeline.Read (cognitive 20) engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:67 — CiTestGatePipeline.Read has cognitive complexity 20 (threshold 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 · CiTestGatePipeline.Jenkins (cognitive 20) · ×1
  • CiTestGatePipeline.Jenkins (cognitive 20) engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:860 — CiTestGatePipeline.Jenkins has cognitive complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisposalDutyAnalyzer.InspectOverwrittenOwnedField (cognitive 20) · ×1
  • DisposalDutyAnalyzer.InspectOverwrittenOwnedField (cognitive 20) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:1101 — DisposalDutyAnalyzer.InspectOverwrittenOwnedField has cognitive complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NullableReferenceTypesAnalyzer.Run (cognitive 20) · ×1
  • NullableReferenceTypesAnalyzer.Run (cognitive 20) engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:29 — NullableReferenceTypesAnalyzer.Run has cognitive complexity 20 (threshold 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 · UntrustedMarkupScan.CastOperand (cognitive 20) · ×1
  • UntrustedMarkupScan.CastOperand (cognitive 20) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:275 — UntrustedMarkupScan.CastOperand has cognitive complexity 20 (threshold 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 · JsSinkReader.IsSourced (cognitive 20) · ×1
  • JsSinkReader.IsSourced (cognitive 20) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:421 — JsSinkReader.IsSourced has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsSinkReader.Handler (cognitive 20) · ×1
  • JsSinkReader.Handler (cognitive 20) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:674 — JsSinkReader.Handler has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · MutationIdempotencyAnalyzer.KeyHintNodes (cognitive 20) · ×1
  • MutationIdempotencyAnalyzer.KeyHintNodes (cognitive 20) engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.Guards.cs:93 — MutationIdempotencyAnalyzer.KeyHintNodes has cognitive complexity 20 (threshold 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 · DomainInfraBoundaryAnalyzer.TsDomainInfraBoundaryAsync (cognitive 20) · ×1
  • DomainInfraBoundaryAnalyzer.TsDomainInfraBoundaryAsync (cognitive 20) engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:408 — DomainInfraBoundaryAnalyzer.TsDomainInfraBoundaryAsync has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeutralScatteredDecision.Find (cognitive 20) · ×1
  • NeutralScatteredDecision.Find (cognitive 20) engine/src/Scanner/ModelAware/DM9/NeutralScatteredDecision.cs:33 — NeutralScatteredDecision.Find has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CleartextTransmissionScan.CodeSites (cognitive 20) · ×1
  • CleartextTransmissionScan.CodeSites (cognitive 20) engine/src/Scanner/Security/D29/Scanners/CleartextTransmissionScan.cs:325 — CleartextTransmissionScan.CodeSites has cognitive complexity 20 (threshold 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 · Model.MountGuarded (cognitive 20) · ×1
  • Model.MountGuarded (cognitive 20) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1034 — Model.MountGuarded has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PersonalDataLanguageCoverage.Measure (cognitive 20) · ×1
  • PersonalDataLanguageCoverage.Measure (cognitive 20) engine/src/Core/Compliance/PersonalDataLanguageCoverage.cs:45 — PersonalDataLanguageCoverage.Measure has cognitive complexity 20 (threshold 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 · SiblingRoles.Build (cognitive 20) · ×1
  • SiblingRoles.Build (cognitive 20) engine/src/Core/Naming/SiblingRoles.cs:37 — SiblingRoles.Build has cognitive complexity 20 (threshold 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 · NativeSecretScanner.HoldsPasswordBinding (cognitive 20) · ×1
  • NativeSecretScanner.HoldsPasswordBinding (cognitive 20) engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:123 — NativeSecretScanner.HoldsPasswordBinding has cognitive complexity 20 (threshold 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 · MarkupText.Append (cognitive 20) · ×1
  • MarkupText.Append (cognitive 20) engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupText.cs:144 — MarkupText.Append has cognitive complexity 20 (threshold 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 · NodeTestSuiteProbe.ScriptNamedRunner (cognitive 20) · ×1
  • NodeTestSuiteProbe.ScriptNamedRunner (cognitive 20) engine/src/Core/Testing/NodeTestSuiteProbe.cs:1890 — NodeTestSuiteProbe.ScriptNamedRunner has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · JsUnusedDeclarations.HasTemplateBindingDecorator (cognitive 20) · ×1
  • JsUnusedDeclarations.HasTemplateBindingDecorator (cognitive 20) engine/src/Core/Frontend/JsUnusedDeclarations.cs:460 — JsUnusedDeclarations.HasTemplateBindingDecorator has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · TemplateProjectTrees.ReadPubspec (cognitive 20) · ×1
  • TemplateProjectTrees.ReadPubspec (cognitive 20) engine/src/Core/Classification/TemplateProjectTrees.Consumption.Readers.cs:374 — TemplateProjectTrees.ReadPubspec has cognitive complexity 20 (threshold 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 · MartenSliceStore.FactsBeforeAsync (cognitive 20) · ×1
  • MartenSliceStore.FactsBeforeAsync (cognitive 20) src/Kennel.Hosting/Projections/SliceStore.cs:185 — MartenSliceStore.FactsBeforeAsync has cognitive complexity 20 (threshold 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 · AssayChargesBackfill.SurveyAsync (cognitive 20) · ×1
  • AssayChargesBackfill.SurveyAsync (cognitive 20) src/Kennel.Core/Billing/Application/AssayBillingBackfills.cs:39 — AssayChargesBackfill.SurveyAsync has cognitive complexity 20 (threshold 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 · AssayReportOrdersBackfill.SurveyAsync (cognitive 20) · ×1
  • AssayReportOrdersBackfill.SurveyAsync (cognitive 20) src/Kennel.Core/Billing/Application/AssayBillingBackfills.cs:125 — AssayReportOrdersBackfill.SurveyAsync has cognitive complexity 20 (threshold 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 · ConnectionHealthService.EvaluateAllAsync (cognitive 20) · ×1
  • ConnectionHealthService.EvaluateAllAsync (cognitive 20) src/Kennel.Core/Repositories/Services/ConnectionHealthService.cs:65 — ConnectionHealthService.EvaluateAllAsync has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrainingHubProjection.Tally (cognitive 20) · ×1
  • TrainingHubProjection.Tally (cognitive 20) src/Kennel.Admin.Core/Admin/Pages/TrainingHub/TrainingHubProjection.cs:403 — TrainingHubProjection.Tally has cognitive complexity 20 (threshold 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 · PartnerDetailsForm.Parse (cognitive 20) · ×1
  • PartnerDetailsForm.Parse (cognitive 20) src/Kennel.Admin.Core/Admin/Services/PartnerConsoleService.cs:69 — PartnerDetailsForm.Parse has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SideMoves.JudgeAsync (cognitive 20) · ×1
  • SideMoves.JudgeAsync (cognitive 20) src/Kennel.Improve.Orchestrator/Gates/SideMoves.cs:47 — SideMoves.JudgeAsync has cognitive complexity 20 (threshold 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 · PackageRegistryFailure.InNuGetOutput (cognitive 19) · ×1
  • PackageRegistryFailure.InNuGetOutput (cognitive 19) engine/src/CodeHealth.Toolchain/Tools/PackageRegistryFailure.cs:81 — PackageRegistryFailure.InNuGetOutput has cognitive complexity 19 (threshold 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 · ExecutiveBrief.VerdictDims (cognitive 19) · ×1
  • ExecutiveBrief.VerdictDims (cognitive 19) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:632 — ExecutiveBrief.VerdictDims has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChangelogNarrator.PlanEntries (cognitive 19) · ×1
  • ChangelogNarrator.PlanEntries (cognitive 19) engine/src/CodeHealth.Reporting/Changelog/ChangelogNarrator.cs:665 — ChangelogNarrator.PlanEntries has cognitive complexity 19 (threshold 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 · DisclosurePolicyReading.Visible (cognitive 19) · ×1
  • DisclosurePolicyReading.Visible (cognitive 19) engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyReading.cs:256 — DisclosurePolicyReading.Visible has cognitive complexity 19 (threshold 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 · DockerImages.Parse (cognitive 19) · ×1
  • DockerImages.Parse (cognitive 19) engine/src/Scanner/LlmJudgedLanguage/LA4/DockerImages.cs:65 — DockerImages.Parse has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FarBehindOutdated.Locate (cognitive 19) · ×1
  • FarBehindOutdated.Locate (cognitive 19) engine/src/Scanner/Dependencies/D12/FarBehindOutdated.cs:59 — FarBehindOutdated.Locate has cognitive complexity 19 (threshold 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 · SupplyChainProvenanceAnalyzer.JobTokenUse (cognitive 19) · ×1
  • SupplyChainProvenanceAnalyzer.JobTokenUse (cognitive 19) engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.TokenSites.cs:262 — SupplyChainProvenanceAnalyzer.JobTokenUse has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NamingRules.SiblingAlignment (cognitive 19) · ×1
  • NamingRules.SiblingAlignment (cognitive 19) engine/src/Scanner/Docs/D21/NamingRules.cs:565 — NamingRules.SiblingAlignment has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DocRestatement.Items (cognitive 19) · ×1
  • DocRestatement.Items (cognitive 19) engine/src/Scanner/Docs/D24/DocRestatement.cs:45 — DocRestatement.Items has cognitive complexity 19 (threshold 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 · IncompletenessAnalyzer.ArmEnd (cognitive 19) · ×1
  • IncompletenessAnalyzer.ArmEnd (cognitive 19) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScriptInert.cs:420 — IncompletenessAnalyzer.ArmEnd has cognitive complexity 19 (threshold 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 · DocAccuracyAnalyzer.DocAccuracy (cognitive 19) · ×1
  • DocAccuracyAnalyzer.DocAccuracy (cognitive 19) engine/src/Scanner/Maturity/M4/DocAccuracyAnalyzer.cs:23 — DocAccuracyAnalyzer.DocAccuracy has cognitive complexity 19 (threshold 15). 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 · DocumentReader.CheckCommand (cognitive 19) · ×1
  • DocumentReader.CheckCommand (cognitive 19) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:888 — DocumentReader.CheckCommand has cognitive complexity 19 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AuditTrailDimension.RunAsync (cognitive 19) · ×1
  • AuditTrailDimension.RunAsync (cognitive 19) engine/src/Scanner/Compliance/C3/AuditTrailDimension.cs:26 — AuditTrailDimension.RunAsync has cognitive complexity 19 (threshold 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 · ForeignWebSecurityScan.Read (cognitive 19) · ×1
  • ForeignWebSecurityScan.Read (cognitive 19) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.cs:102 — ForeignWebSecurityScan.Read has cognitive complexity 19 (threshold 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 · CompliancePrework.ComputeAsync (cognitive 19) · ×1
  • CompliancePrework.ComputeAsync (cognitive 19) engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:521 — CompliancePrework.ComputeAsync has cognitive complexity 19 (threshold 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 · Glob.ToRegex (cognitive 19) · ×1
  • Glob.ToRegex (cognitive 19) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:801 — Glob.ToRegex has cognitive complexity 19 (threshold 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 · DotNetTestInventory.Read (cognitive 19) · ×1
  • DotNetTestInventory.Read (cognitive 19) engine/src/Scanner/Readiness/P12/DotNetTestInventory.cs:35 — DotNetTestInventory.Read has cognitive complexity 19 (threshold 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 · OperabilityScan.ComputeAsync (cognitive 19) · ×1
  • OperabilityScan.ComputeAsync (cognitive 19) engine/src/Scanner/Readiness/Readiness.Prework/OperabilityScan.cs:53 — OperabilityScan.ComputeAsync has cognitive complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForeignDeadBranchScan.KotlinWhenConditions (cognitive 19) · ×1
  • ForeignDeadBranchScan.KotlinWhenConditions (cognitive 19) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:241 — ForeignDeadBranchScan.KotlinWhenConditions has cognitive complexity 19 (threshold 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 · DisposalDutyAnalyzer.InspectUnreleasedFactoryFields (cognitive 19) · ×1
  • DisposalDutyAnalyzer.InspectUnreleasedFactoryFields (cognitive 19) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:1429 — DisposalDutyAnalyzer.InspectUnreleasedFactoryFields has cognitive complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForeignDisposalDutyScan.JoinKotlin (cognitive 19) · ×1
  • ForeignDisposalDutyScan.JoinKotlin (cognitive 19) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:70 — ForeignDisposalDutyScan.JoinKotlin has cognitive complexity 19 (threshold 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 · ForeignReleaseGuardScan.KotlinFunHead (cognitive 19) · ×1
  • ForeignReleaseGuardScan.KotlinFunHead (cognitive 19) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:206 — ForeignReleaseGuardScan.KotlinFunHead has cognitive complexity 19 (threshold 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 · KotlinFile.MarkBinders (cognitive 19) · ×1
  • KotlinFile.MarkBinders (cognitive 19) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:638 — KotlinFile.MarkBinders has cognitive complexity 19 (threshold 15). 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 · CancellationPropagationAnalyzer.Run (cognitive 19) · ×1
  • CancellationPropagationAnalyzer.Run (cognitive 19) engine/src/Scanner/Defects/X2/CancellationPropagationAnalyzer.cs:28 — CancellationPropagationAnalyzer.Run has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ForeignUntrustedLengthScan.IsForCounterTest (cognitive 19) · ×1
  • ForeignUntrustedLengthScan.IsForCounterTest (cognitive 19) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.cs:648 — ForeignUntrustedLengthScan.IsForCounterTest has cognitive complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ForeignDocumentWalkScan.KotlinReceiverStart (cognitive 19) · ×1
  • ForeignDocumentWalkScan.KotlinReceiverStart (cognitive 19) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:1033 — ForeignDocumentWalkScan.KotlinReceiverStart has cognitive complexity 19 (threshold 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 · UncappedDocumentWalkAnalyzer.CountsItsDescent (cognitive 19) · ×1
  • UncappedDocumentWalkAnalyzer.CountsItsDescent (cognitive 19) engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:434 — UncappedDocumentWalkAnalyzer.CountsItsDescent has cognitive complexity 19 (threshold 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 · CSharpSinkReader.JudgeMarkup (cognitive 19) · ×1
  • CSharpSinkReader.JudgeMarkup (cognitive 19) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:834 — CSharpSinkReader.JudgeMarkup has cognitive complexity 19 (threshold 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 · PiiInEventStoreAnalyzer.AddLegacy (cognitive 19) · ×1
  • PiiInEventStoreAnalyzer.AddLegacy (cognitive 19) engine/src/Scanner/ModelAware/ES3/PiiInEventStoreAnalyzer.cs:264 — PiiInEventStoreAnalyzer.AddLegacy has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DomainInfraEdgesTs.RelativeSpecifiers (cognitive 19) · ×1
  • DomainInfraEdgesTs.RelativeSpecifiers (cognitive 19) engine/src/Scanner/ModelAware/DM6/DomainInfraEdgesTs.cs:376 — DomainInfraEdgesTs.RelativeSpecifiers has cognitive complexity 19 (threshold 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 · PatchParser.Read (cognitive 19) · ×1
  • PatchParser.Read (cognitive 19) engine/src/Scanner/Security/D28/Scanners/PasswordHistoryScan.cs:294 — PatchParser.Read has cognitive complexity 19 (threshold 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 · HttpCookieRecheck.JavaFlagReceiverIsNotACookie (cognitive 19) · ×1
  • HttpCookieRecheck.JavaFlagReceiverIsNotACookie (cognitive 19) engine/src/Scanner/Security/Shared/Scanners/HttpCookieRecheck.cs:121 — HttpCookieRecheck.JavaFlagReceiverIsNotACookie has cognitive complexity 19 (threshold 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 · ModalDialogFocus.Check (cognitive 19) · ×1
  • ModalDialogFocus.Check (cognitive 19) engine/src/Scanner/Accessibility/AC4/ModalDialogFocus.cs:73 — ModalDialogFocus.Check has cognitive complexity 19 (threshold 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 · PersonalDataEvidence.Classify (cognitive 19) · ×1
  • PersonalDataEvidence.Classify (cognitive 19) engine/src/Core/Compliance/PersonalDataEvidence.cs:263 — PersonalDataEvidence.Classify has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PersonalDataEvidence.MatchName (cognitive 19) · ×1
  • PersonalDataEvidence.MatchName (cognitive 19) engine/src/Core/Compliance/PersonalDataEvidence.cs:314 — PersonalDataEvidence.MatchName has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ApplePackageManagerPresence.DependencyFreeCocoaPodsLockCount (cognitive 19) · ×1
  • ApplePackageManagerPresence.DependencyFreeCocoaPodsLockCount (cognitive 19) engine/src/Core/Dependencies/ApplePackageManagerPresence.cs:117 — ApplePackageManagerPresence.DependencyFreeCocoaPodsLockCount has cognitive complexity 19 (threshold 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 · CratesSparseIndexClient.ReadRelease (cognitive 19) · ×1
  • CratesSparseIndexClient.ReadRelease (cognitive 19) engine/src/Core/Dependencies/CratesSparseIndexClient.cs:249 — CratesSparseIndexClient.ReadRelease has cognitive complexity 19 (threshold 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 · NuGetPackageSites.PulledIn (cognitive 19) · ×1
  • NuGetPackageSites.PulledIn (cognitive 19) engine/src/Core/Dependencies/NuGetPackageSites.cs:222 — NuGetPackageSites.PulledIn has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeSecretScanner.CollectReturnedLiterals (cognitive 19) · ×1
  • NativeSecretScanner.CollectReturnedLiterals (cognitive 19) engine/src/Core/Security/NativeSecretScanner.HardcodedCredential.cs:324 — NativeSecretScanner.CollectReturnedLiterals has cognitive complexity 19 (threshold 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 · EslintBoundariesRules.Glob (cognitive 19) · ×1
  • EslintBoundariesRules.Glob (cognitive 19) engine/src/Core/Frontend/EslintBoundariesRules.cs:368 — EslintBoundariesRules.Glob has cognitive complexity 19 (threshold 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 · JsUnusedDeclarations.PrivateMembers (cognitive 19) · ×1
  • JsUnusedDeclarations.PrivateMembers (cognitive 19) engine/src/Core/Frontend/JsUnusedDeclarations.cs:139 — JsUnusedDeclarations.PrivateMembers has cognitive complexity 19 (threshold 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 · ModuleReferenceGraph.Union (cognitive 19) · ×1
  • ModuleReferenceGraph.Union (cognitive 19) engine/src/Core/Manifests/ModuleReferenceGraph.cs:361 — ModuleReferenceGraph.Union has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, 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 · PersonalDataRoslyn.AttributeMarkers (cognitive 19) · ×1
  • PersonalDataRoslyn.AttributeMarkers (cognitive 19) engine/src/Core/ComplianceRoslyn/PersonalDataRoslyn.cs:272 — PersonalDataRoslyn.AttributeMarkers has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrainingLanguagesBackfill.SurveyAsync (cognitive 19) · ×1
  • TrainingLanguagesBackfill.SurveyAsync (cognitive 19) src/Kennel.Core/LanguageTraining/Application/TrainingLanguagesBackfill.cs:25 — TrainingLanguagesBackfill.SurveyAsync has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · BacklogService.UpdateAsync (cognitive 19) · ×1
  • BacklogService.UpdateAsync (cognitive 19) src/Kennel.Core/LanguageTraining/Services/BacklogService.cs:540 — BacklogService.UpdateAsync has cognitive complexity 19 (threshold 15). 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 · ExternalScannersBackfill.SurveyAsync (cognitive 19) · ×1
  • ExternalScannersBackfill.SurveyAsync (cognitive 19) src/Kennel.Watchdog.Core/Calibration/Application/ExternalScannersBackfill.cs:37 — ExternalScannersBackfill.SurveyAsync has cognitive complexity 19 (threshold 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 · ChangelogEntryDevSeeder.SeedAsync (cognitive 19) · ×1
  • ChangelogEntryDevSeeder.SeedAsync (cognitive 19) src/Kennel.Watchdog.Core/Reporting/Composition/ChangelogEntryDevSeeder.cs:52 — ChangelogEntryDevSeeder.SeedAsync has cognitive complexity 19 (threshold 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 · QueueEta.Label (cognitive 19) · ×1
  • QueueEta.Label (cognitive 19) src/Kennel.Watchdog.Core/Scheduling/Ui/QueueEta.cs:42 — QueueEta.Label has cognitive complexity 19 (threshold 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 · AffectedProjections.Judge (cognitive 19) · ×1
  • AffectedProjections.Judge (cognitive 19) src/Kennel.Infrastructure/Projections/AffectedProjections.cs:54 — AffectedProjections.Judge has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShellGate.Items (cognitive 19) · ×1
  • ShellGate.Items (cognitive 19) src/Kennel.Improve.Orchestrator/Gates/ShellGate.cs:393 — ShellGate.Items has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueueBuilder.EnrichAsync (cognitive 19) · ×1
  • QueueBuilder.EnrichAsync (cognitive 19) src/Kennel.Improve.Orchestrator/Queue/QueueBuilder.cs:27 — QueueBuilder.EnrichAsync has cognitive complexity 19 (threshold 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 · draw_h1.candidates (cognitive 19) · ×1
  • draw_h1.candidates (cognitive 19) docs/plans/deterministic-engine/draw_h1.py:32 — draw_h1.candidates has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (9 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 · merge_md_table.resolve (cognitive 19) · ×1
  • merge_md_table.resolve (cognitive 19) tools/improve/merge_md_table.py:45 — merge_md_table.resolve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 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 · backlog-drop-unreachable.main (cognitive 19) · ×1
  • backlog-drop-unreachable.main (cognitive 19) tools/ops/backlog-drop-unreachable.py:364 — backlog-drop-unreachable.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, ternaries 7, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · idempotency-facts.moduleOfExpression (cognitive 19) · ×1
  • idempotency-facts.moduleOfExpression (cognitive 19) engine/sidecars/tsjs-frontend/idempotency-facts.mjs:52 — idempotency-facts.moduleOfExpression has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 3 (5 pts), boolean chains 4 (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 · PackageRegistryFailure.InAssetsFile (cognitive 18) · ×1
  • PackageRegistryFailure.InAssetsFile (cognitive 18) engine/src/CodeHealth.Toolchain/Tools/PackageRegistryFailure.cs:191 — PackageRegistryFailure.InAssetsFile has cognitive complexity 18 (threshold 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 · PackageMap.Manifest (cognitive 18) · ×1
  • PackageMap.Manifest (cognitive 18) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.NodeTransport.cs:547 — PackageMap.Manifest has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ForeignWebSecurityScan.ReadPackageKdfCost (cognitive 18) · ×1
  • ForeignWebSecurityScan.ReadPackageKdfCost (cognitive 18) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.PasswordStorage.cs:365 — ForeignWebSecurityScan.ReadPackageKdfCost has cognitive complexity 18 (threshold 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 · RustServerControls.ReadSource (cognitive 18) · ×1
  • RustServerControls.ReadSource (cognitive 18) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.RustServerControls.cs:176 — RustServerControls.ReadSource has cognitive complexity 18 (threshold 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 · RustServerControls.ReadCookies (cognitive 18) · ×1
  • RustServerControls.ReadCookies (cognitive 18) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.RustServerControls.cs:281 — RustServerControls.ReadCookies has cognitive complexity 18 (threshold 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 · ForeignComplianceScan.ReadSwiftType (cognitive 18) · ×1
  • ForeignComplianceScan.ReadSwiftType (cognitive 18) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Swift.cs:132 — ForeignComplianceScan.ReadSwiftType has cognitive complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ForeignComplianceScan.IsSwiftNonStored (cognitive 18) · ×1
  • ForeignComplianceScan.IsSwiftNonStored (cognitive 18) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.Swift.cs:215 — ForeignComplianceScan.IsSwiftNonStored has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DisasterRecoveryAnalyzer.WalkInertContent (cognitive 18) · ×1
  • DisasterRecoveryAnalyzer.WalkInertContent (cognitive 18) engine/src/Scanner/Readiness/P5/DisasterRecoveryAnalyzer.cs:344 — DisasterRecoveryAnalyzer.WalkInertContent has cognitive complexity 18 (threshold 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 · CiTestCommands.StripLaunchers (cognitive 18) · ×1
  • CiTestCommands.StripLaunchers (cognitive 18) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:182 — CiTestCommands.StripLaunchers has cognitive complexity 18 (threshold 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 · CiTestGatePipeline.PipelineFiles (cognitive 18) · ×1
  • CiTestGatePipeline.PipelineFiles (cognitive 18) engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:160 — CiTestGatePipeline.PipelineFiles has cognitive complexity 18 (threshold 15). 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 · CiTestGateSites.DotNetChangeFilters (cognitive 18) · ×1
  • CiTestGateSites.DotNetChangeFilters (cognitive 18) engine/src/Scanner/Readiness/P12/CiTestGateSites.cs:262 — CiTestGateSites.DotNetChangeFilters has cognitive complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KotlinDisposalShape.InspectAbandoned (cognitive 18) · ×1
  • KotlinDisposalShape.InspectAbandoned (cognitive 18) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:997 — KotlinDisposalShape.InspectAbandoned has cognitive complexity 18 (threshold 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 · ForeignScopedGlobalMutationScan.PhpAssignedLocal (cognitive 18) · ×1
  • ForeignScopedGlobalMutationScan.PhpAssignedLocal (cognitive 18) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:508 — ForeignScopedGlobalMutationScan.PhpAssignedLocal has cognitive complexity 18 (threshold 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 · PhpShape.Classify (cognitive 18) · ×1
  • PhpShape.Classify (cognitive 18) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:880 — PhpShape.Classify has cognitive complexity 18 (threshold 15). 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 · ForeignReleaseGuardScan.PhpFunctionHead (cognitive 18) · ×1
  • ForeignReleaseGuardScan.PhpFunctionHead (cognitive 18) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Php.cs:126 — ForeignReleaseGuardScan.PhpFunctionHead has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · KotlinFile.NotThisLoops (cognitive 18) · ×1
  • KotlinFile.NotThisLoops (cognitive 18) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:750 — KotlinFile.NotThisLoops has cognitive complexity 18 (threshold 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 · NullableReferenceTypesAnalyzer.BuildNullable (cognitive 18) · ×1
  • NullableReferenceTypesAnalyzer.BuildNullable (cognitive 18) engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:1954 — NullableReferenceTypesAnalyzer.BuildNullable has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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 · ForeignUntrustedLengthScan.PythonTupleTargets (cognitive 18) · ×1
  • ForeignUntrustedLengthScan.PythonTupleTargets (cognitive 18) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs:520 — ForeignUntrustedLengthScan.PythonTupleTargets has cognitive complexity 18 (threshold 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 · CleartextIngressScan.FindingsIn (cognitive 18) · ×1
  • CleartextIngressScan.FindingsIn (cognitive 18) engine/src/Scanner/Security/D31/Scanners/CleartextIngressScan.cs:80 — CleartextIngressScan.FindingsIn has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FocusOutlineRemoval.OutlineEffect (cognitive 18) · ×1
  • FocusOutlineRemoval.OutlineEffect (cognitive 18) engine/src/Scanner/Accessibility/AC6/FocusOutlineRemoval.cs:291 — FocusOutlineRemoval.OutlineEffect has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PagesDeployWorkflow.StandIn (cognitive 18) · ×1
  • PagesDeployWorkflow.StandIn (cognitive 18) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PagesDeployWorkflow.cs:348 — PagesDeployWorkflow.StandIn has cognitive complexity 18 (threshold 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 · PlaywrightNodeRenderer.SetUpAsync (cognitive 18) · ×1
  • PlaywrightNodeRenderer.SetUpAsync (cognitive 18) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PlaywrightNodeRenderer.cs:468 — PlaywrightNodeRenderer.SetUpAsync has cognitive complexity 18 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · RoslynDeadCodeDetector.ScanDocumentAsync (cognitive 18) · ×1
  • RoslynDeadCodeDetector.ScanDocumentAsync (cognitive 18) engine/src/Core/ExplicitDebt/RoslynDeadCodeDetector.cs:153 — RoslynDeadCodeDetector.ScanDocumentAsync has cognitive complexity 18 (threshold 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 · SiblingRoles.Align (cognitive 18) · ×1
  • SiblingRoles.Align (cognitive 18) engine/src/Core/Naming/SiblingRoles.cs:187 — SiblingRoles.Align has cognitive complexity 18 (threshold 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 · MarkupTextCard.Build (cognitive 18) · ×1
  • MarkupTextCard.Build (cognitive 18) engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupTextCard.cs:58 — MarkupTextCard.Build has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RoslynTestQualityCollector.DoubleFields (cognitive 18) · ×1
  • RoslynTestQualityCollector.DoubleFields (cognitive 18) engine/src/Core/Testing/RoslynTestQualityCollector.MockDominance.cs:112 — RoslynTestQualityCollector.DoubleFields has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DestructuredPersonalDataLogScan.FindingsIn (cognitive 18) · ×1
  • DestructuredPersonalDataLogScan.FindingsIn (cognitive 18) engine/src/Scanner/Security/Shared.CSharp/DestructuredPersonalDataLogScan.cs:114 — DestructuredPersonalDataLogScan.FindingsIn has cognitive complexity 18 (threshold 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 · ModuleReferenceScanner.Referenced (cognitive 18) · ×1
  • ModuleReferenceScanner.Referenced (cognitive 18) engine/src/Core/ArchitectureContracts/ModuleReferences.cs:175 — ModuleReferenceScanner.Referenced has cognitive complexity 18 (threshold 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 · PackageCache.ServeMetadataAsync (cognitive 18) · ×1
  • PackageCache.ServeMetadataAsync (cognitive 18) engine/src/PkgCache/PackageCache.cs:281 — PackageCache.ServeMetadataAsync has cognitive complexity 18 (threshold 15). 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 · PartnerAttributionsBackfill.SurveyAsync (cognitive 18) · ×1
  • PartnerAttributionsBackfill.SurveyAsync (cognitive 18) src/Kennel.Core/Billing/Application/PlanBackfills.cs:137 — PartnerAttributionsBackfill.SurveyAsync has cognitive complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CorpusKeyService.VerdictRefusal (cognitive 18) · ×1
  • CorpusKeyService.VerdictRefusal (cognitive 18) src/Kennel.Core/LanguageTraining/Services/CorpusKeyService.cs:272 — CorpusKeyService.VerdictRefusal has cognitive complexity 18 (threshold 15). 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 · RunDimensionStatesBackfill.SurveyAsync (cognitive 18) · ×1
  • RunDimensionStatesBackfill.SurveyAsync (cognitive 18) src/Kennel.Core/Metrics/ReadModels/RunDimensionStatesBackfill.cs:25 — RunDimensionStatesBackfill.SurveyAsync has cognitive complexity 18 (threshold 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 · ScanDocumentsBackfill.SurveyAsync (cognitive 18) · ×1
  • ScanDocumentsBackfill.SurveyAsync (cognitive 18) src/Kennel.Core/Scans/ReadModels/ScanDocumentsBackfill.cs:42 — ScanDocumentsBackfill.SurveyAsync has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FindingFacts.StampedBySubject (cognitive 18) · ×1
  • FindingFacts.StampedBySubject (cognitive 18) src/Kennel.Watchdog.Core/Agents/Application/FindingFacts.cs:36 — FindingFacts.StampedBySubject has cognitive complexity 18 (threshold 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 · ModuleStructureService.LoadAsync (cognitive 18) · ×1
  • ModuleStructureService.LoadAsync (cognitive 18) src/Kennel.Watchdog.Core/Architecture/Application/ModuleStructureService.cs:145 — ModuleStructureService.LoadAsync has cognitive complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 169, 176, 191). 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 · ChangelogRetirementsBackfill.SurveyAsync (cognitive 18) · ×1
  • ChangelogRetirementsBackfill.SurveyAsync (cognitive 18) src/Kennel.Watchdog.Core/Reporting/Application/ChangelogRetirementsBackfill.cs:48 — ChangelogRetirementsBackfill.SurveyAsync has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ProductReleasesBackfill.SurveyAsync (cognitive 18) · ×1
  • ProductReleasesBackfill.SurveyAsync (cognitive 18) src/Kennel.Watchdog.Core/Reporting/Application/ProductReportingBackfills.cs:28 — ProductReleasesBackfill.SurveyAsync has cognitive complexity 18 (threshold 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 · TrainingQueueProjection.Count (cognitive 18) · ×1
  • TrainingQueueProjection.Count (cognitive 18) src/Kennel.Admin.Core/Admin/Pages/TrainingQueue/TrainingQueueProjection.cs:122 — TrainingQueueProjection.Count has cognitive complexity 18 (threshold 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 · PartnerMintForm.Parse (cognitive 18) · ×1
  • PartnerMintForm.Parse (cognitive 18) src/Kennel.Admin.Core/Admin/Services/PartnerConsoleService.cs:28 — PartnerMintForm.Parse has cognitive complexity 18 (threshold 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 · initReportSetup · ×1
  • initReportSetup::(anonymous)::sync (cognitive 18) src/Kennel.Ui/wwwroot/kennel-onboarding.js:76 — initReportSetup::(anonymous)::sync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 2 (5 pts), boolean chains 4 (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 · DisclosurePolicyReading.Links (cognitive 17) · ×1
  • DisclosurePolicyReading.Links (cognitive 17) engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyReading.cs:330 — DisclosurePolicyReading.Links has cognitive complexity 17 (threshold 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 · DatastoreHosts.In (cognitive 17) · ×1
  • DatastoreHosts.In (cognitive 17) engine/src/Scanner/LlmJudgedLanguage/LA4/DatastoreHosts.cs:28 — DatastoreHosts.In has cognitive complexity 17 (threshold 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 · EnvironmentCrossing.SharedDatastores (cognitive 17) · ×1
  • EnvironmentCrossing.SharedDatastores (cognitive 17) engine/src/Scanner/LlmJudgedLanguage/LA4/EnvironmentCrossing.cs:185 — EnvironmentCrossing.SharedDatastores has cognitive complexity 17 (threshold 15). 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 · LinkTextQualityAnalyzer.Context (cognitive 17) · ×1
  • LinkTextQualityAnalyzer.Context (cognitive 17) engine/src/Scanner/LlmJudgedLanguage/LA5/LinkTextQualityAnalyzer.cs:189 — LinkTextQualityAnalyzer.Context has cognitive complexity 17 (threshold 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 · JsonKeys.Enumerate (cognitive 17) · ×1
  • JsonKeys.Enumerate (cognitive 17) engine/src/Scanner/Dependencies/D12/NpmDeprecatedDependencies.cs:706 — JsonKeys.Enumerate has cognitive complexity 17 (threshold 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 · Builder.SkipFrontMatter (cognitive 17) · ×1
  • Builder.SkipFrontMatter (cognitive 17) engine/src/Scanner/Docs/D19/MarkupDocument.cs:408 — Builder.SkipFrontMatter has cognitive complexity 17 (threshold 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 · NamingRules.MissingIn (cognitive 17) · ×1
  • NamingRules.MissingIn (cognitive 17) engine/src/Scanner/Docs/D21/NamingRules.cs:423 — NamingRules.MissingIn has cognitive complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IncompletenessAnalyzer.ForeignJsxEmptyHandlerRows (cognitive 17) · ×1
  • IncompletenessAnalyzer.ForeignJsxEmptyHandlerRows (cognitive 17) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScriptInert.cs:475 — IncompletenessAnalyzer.ForeignJsxEmptyHandlerRows has cognitive complexity 17 (threshold 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 · DocInventory.IsIgnored (cognitive 17) · ×1
  • DocInventory.IsIgnored (cognitive 17) engine/src/Scanner/Maturity/M4/DocInventory.cs:181 — DocInventory.IsIgnored has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DocInventory.Read (cognitive 17) · ×1
  • DocInventory.Read (cognitive 17) engine/src/Scanner/Maturity/M4/DocInventory.cs:362 — DocInventory.Read has cognitive complexity 17 (threshold 15). 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 · CompliancePrework.CollectAuthorizationSites (cognitive 17) · ×1
  • CompliancePrework.CollectAuthorizationSites (cognitive 17) engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:4874 — CompliancePrework.CollectAuthorizationSites has cognitive complexity 17 (threshold 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 · CiTestCommands.Tokenize (cognitive 17) · ×1
  • CiTestCommands.Tokenize (cognitive 17) engine/src/Scanner/Readiness/P12/CiTestCommands.cs:694 — CiTestCommands.Tokenize has cognitive complexity 17 (threshold 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 · DisposalDutyAnalyzer.CallerReachingItLive (cognitive 17) · ×1
  • DisposalDutyAnalyzer.CallerReachingItLive (cognitive 17) engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:1175 — DisposalDutyAnalyzer.CallerReachingItLive has cognitive complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JavaShape.ReadMembers (cognitive 17) · ×1
  • JavaShape.ReadMembers (cognitive 17) engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Java.cs:741 — JavaShape.ReadMembers has cognitive complexity 17 (threshold 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 · ForeignScopedGlobalMutationScan.JoinKotlin (cognitive 17) · ×1
  • ForeignScopedGlobalMutationScan.JoinKotlin (cognitive 17) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:112 — ForeignScopedGlobalMutationScan.JoinKotlin has cognitive complexity 17 (threshold 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 · PhpShape.StatementEnd (cognitive 17) · ×1
  • PhpShape.StatementEnd (cognitive 17) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:740 — PhpShape.StatementEnd has cognitive complexity 17 (threshold 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 · ForeignSideEffectingGuardScan.PythonBranchStart (cognitive 17) · ×1
  • ForeignSideEffectingGuardScan.PythonBranchStart (cognitive 17) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:270 — ForeignSideEffectingGuardScan.PythonBranchStart has cognitive complexity 17 (threshold 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 · ForeignSideEffectingGuardScan.ScalaGuardIf (cognitive 17) · ×1
  • ForeignSideEffectingGuardScan.ScalaGuardIf (cognitive 17) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:400 — ForeignSideEffectingGuardScan.ScalaGuardIf has cognitive complexity 17 (threshold 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 · ForeignSideEffectingGuardScan.ScalaCaseArrow (cognitive 17) · ×1
  • ForeignSideEffectingGuardScan.ScalaCaseArrow (cognitive 17) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:435 — ForeignSideEffectingGuardScan.ScalaCaseArrow has cognitive complexity 17 (threshold 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 · SideEffectingGuardAnalyzer.Run (cognitive 17) · ×1
  • SideEffectingGuardAnalyzer.Run (cognitive 17) engine/src/Scanner/Defects/X21/SideEffectingGuardAnalyzer.cs:23 — SideEffectingGuardAnalyzer.Run has cognitive complexity 17 (threshold 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 · ContradictedHandoffAnalyzer.Run (cognitive 17) · ×1
  • ContradictedHandoffAnalyzer.Run (cognitive 17) engine/src/Scanner/Defects/X22/ContradictedHandoffAnalyzer.cs:23 — ContradictedHandoffAnalyzer.Run has cognitive complexity 17 (threshold 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 · GoShape.SignatureBodyBrace (cognitive 17) · ×1
  • GoShape.SignatureBodyBrace (cognitive 17) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Go.cs:235 — GoShape.SignatureBodyBrace has cognitive complexity 17 (threshold 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 · PythonShape.TakesALock (cognitive 17) · ×1
  • PythonShape.TakesALock (cognitive 17) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Python.cs:561 — PythonShape.TakesALock has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · UnsynchronisedHandoffAnalyzer.Run (cognitive 17) · ×1
  • UnsynchronisedHandoffAnalyzer.Run (cognitive 17) engine/src/Scanner/Defects/X26/UnsynchronisedHandoffAnalyzer.cs:23 — UnsynchronisedHandoffAnalyzer.Run has cognitive complexity 17 (threshold 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 · KotlinFile.ReadImports (cognitive 17) · ×1
  • KotlinFile.ReadImports (cognitive 17) engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.Kotlin.cs:666 — KotlinFile.ReadImports has cognitive complexity 17 (threshold 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 · SelfMutatingLoopAnalyzer.InspectSelfMutatingLoop (cognitive 17) · ×1
  • SelfMutatingLoopAnalyzer.InspectSelfMutatingLoop (cognitive 17) engine/src/Scanner/Defects/X27/SelfMutatingLoopAnalyzer.cs:476 — SelfMutatingLoopAnalyzer.InspectSelfMutatingLoop has cognitive complexity 17 (threshold 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 · ForeignUncoveredIndexGuardScan.VbEstablishedBeforehand (cognitive 17) · ×1
  • ForeignUncoveredIndexGuardScan.VbEstablishedBeforehand (cognitive 17) engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Vb.cs:311 — ForeignUncoveredIndexGuardScan.VbEstablishedBeforehand has cognitive complexity 17 (threshold 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 · FixedElementGuardAnalyzer.InspectFixedElementGuard (cognitive 17) · ×1
  • FixedElementGuardAnalyzer.InspectFixedElementGuard (cognitive 17) engine/src/Scanner/Defects/X29/FixedElementGuardAnalyzer.cs:177 — FixedElementGuardAnalyzer.InspectFixedElementGuard has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AsyncCorrectnessAnalyzer.Run (cognitive 17) · ×1
  • AsyncCorrectnessAnalyzer.Run (cognitive 17) engine/src/Scanner/Defects/X1/AsyncCorrectnessAnalyzer.cs:28 — AsyncCorrectnessAnalyzer.Run has cognitive complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForeignCancellationScan.JudgeDroppedSignals (cognitive 17) · ×1
  • ForeignCancellationScan.JudgeDroppedSignals (cognitive 17) engine/src/Scanner/Defects/X2/ForeignCancellationScan.SignalCallees.cs:125 — ForeignCancellationScan.JudgeDroppedSignals has cognitive complexity 17 (threshold 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 · ForeignExceptionHandlingScan.Compute (cognitive 17) · ×1
  • ForeignExceptionHandlingScan.Compute (cognitive 17) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.cs:113 — ForeignExceptionHandlingScan.Compute has cognitive complexity 17 (threshold 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 · ForeignExceptionHandlingScan.LeavesOnly (cognitive 17) · ×1
  • ForeignExceptionHandlingScan.LeavesOnly (cognitive 17) engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.Js.cs:141 — ForeignExceptionHandlingScan.LeavesOnly has cognitive complexity 17 (threshold 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 · ScalaReading.Judged (cognitive 17) · ×1
  • ScalaReading.Judged (cognitive 17) engine/src/Scanner/Defects/X4/ForeignStructuredLoggingScan.Scala.cs:220 — ScalaReading.Judged has cognitive complexity 17 (threshold 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 · ForeignAddressClassifierScan.PythonFunctions (cognitive 17) · ×1
  • ForeignAddressClassifierScan.PythonFunctions (cognitive 17) engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Python.cs:204 — ForeignAddressClassifierScan.PythonFunctions has cognitive complexity 17 (threshold 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 · ForeignUntrustedLengthScan.IsPythonTargetList (cognitive 17) · ×1
  • ForeignUntrustedLengthScan.IsPythonTargetList (cognitive 17) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs:626 — ForeignUntrustedLengthScan.IsPythonTargetList has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · UncappedDocumentWalkAnalyzer.InspectUncappedDocumentWalk (cognitive 17) · ×1
  • UncappedDocumentWalkAnalyzer.InspectUncappedDocumentWalk (cognitive 17) engine/src/Scanner/Defects/X17/UncappedDocumentWalkAnalyzer.cs:259 — UncappedDocumentWalkAnalyzer.InspectUncappedDocumentWalk has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CSharpSinkReader.TaintParameters (cognitive 17) · ×1
  • CSharpSinkReader.TaintParameters (cognitive 17) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:719 — CSharpSinkReader.TaintParameters has cognitive complexity 17 (threshold 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 · JsSinkReader.TopLevelTernary (cognitive 17) · ×1
  • JsSinkReader.TopLevelTernary (cognitive 17) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1531 — JsSinkReader.TopLevelTernary has cognitive complexity 17 (threshold 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 · JsSinkReader.ExprEnd (cognitive 17) · ×1
  • JsSinkReader.ExprEnd (cognitive 17) engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs:1754 — JsSinkReader.ExprEnd has cognitive complexity 17 (threshold 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 · PendingWithoutFailureRule.RazorFiles (cognitive 17) · ×1
  • PendingWithoutFailureRule.RazorFiles (cognitive 17) engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:429 — PendingWithoutFailureRule.RazorFiles has cognitive complexity 17 (threshold 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 · MutationIdempotencyAnalyzer.BuilderGateGuardsInsert (cognitive 17) · ×1
  • MutationIdempotencyAnalyzer.BuilderGateGuardsInsert (cognitive 17) engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.V2.cs:163 — MutationIdempotencyAnalyzer.BuilderGateGuardsInsert has cognitive complexity 17 (threshold 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 · DependencyHygieneDimensionBuilder.HygieneDimension (cognitive 17) · ×1
  • DependencyHygieneDimensionBuilder.HygieneDimension (cognitive 17) engine/src/Scanner/Frontend/R8/DependencyHygieneDimensionBuilder.cs:45 — DependencyHygieneDimensionBuilder.HygieneDimension has cognitive complexity 17 (threshold 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 · CleartextTransmissionScan.SchemeSiteInLiteral (cognitive 17) · ×1
  • CleartextTransmissionScan.SchemeSiteInLiteral (cognitive 17) engine/src/Scanner/Security/D29/Scanners/CleartextTransmissionScan.cs:383 — CleartextTransmissionScan.SchemeSiteInLiteral has cognitive complexity 17 (threshold 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 · CleartextTransmissionScan.MarkupSites (cognitive 17) · ×1
  • CleartextTransmissionScan.MarkupSites (cognitive 17) engine/src/Scanner/Security/D29/Scanners/CleartextTransmissionScan.cs:461 — CleartextTransmissionScan.MarkupSites has cognitive complexity 17 (threshold 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 · JsRegexCaptureGroupRecheck.ReadStringExpression (cognitive 17) · ×1
  • JsRegexCaptureGroupRecheck.ReadStringExpression (cognitive 17) engine/src/Scanner/Security/D29/Scanners/JsRegexCaptureGroupRecheck.cs:758 — JsRegexCaptureGroupRecheck.ReadStringExpression has cognitive complexity 17 (threshold 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 · Model.ScopeGuardsBefore (cognitive 17) · ×1
  • Model.ScopeGuardsBefore (cognitive 17) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:984 — Model.ScopeGuardsBefore has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Model.HandlerExempt (cognitive 17) · ×1
  • Model.HandlerExempt (cognitive 17) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1149 — Model.HandlerExempt has cognitive complexity 17 (threshold 15). 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 · NuGetVulnerabilityArm.NuGetArmAsync (cognitive 17) · ×1
  • NuGetVulnerabilityArm.NuGetArmAsync (cognitive 17) engine/src/Scanner/Security/Shared/NuGetVulnerabilityArm.cs:24 — NuGetVulnerabilityArm.NuGetArmAsync has cognitive complexity 17 (threshold 15). 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 · ConditionalSymbolInventory.AddTemplateManifestSymbols (cognitive 17) · ×1
  • ConditionalSymbolInventory.AddTemplateManifestSymbols (cognitive 17) engine/src/Core/ExplicitDebt/ConditionalSymbolInventory.cs:200 — ConditionalSymbolInventory.AddTemplateManifestSymbols has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · YamlDisabledConfigScanner.IsAlsoSetLive (cognitive 17) · ×1
  • YamlDisabledConfigScanner.IsAlsoSetLive (cognitive 17) engine/src/Core/ExplicitDebt/YamlDisabledConfigScanner.cs:430 — YamlDisabledConfigScanner.IsAlsoSetLive has cognitive complexity 17 (threshold 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 · PublishedSurfaceProbe.Discover (cognitive 17) · ×1
  • PublishedSurfaceProbe.Discover (cognitive 17) engine/src/Core/CodeShape/PublishedSurfaceProbe.cs:94 — PublishedSurfaceProbe.Discover has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · RazorCodeVirtualizer.FindNextBlock (cognitive 17) · ×1
  • RazorCodeVirtualizer.FindNextBlock (cognitive 17) engine/src/Core/CodeShape/RazorCodeVirtualizer.cs:179 — RazorCodeVirtualizer.FindNextBlock has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · WindowWalk.WindowNeutralUnit (cognitive 17) · ×1
  • WindowWalk.WindowNeutralUnit (cognitive 17) engine/src/Core/CodeShape/RoslynDuplicationDetector.Walk.cs:301 — WindowWalk.WindowNeutralUnit has cognitive complexity 17 (threshold 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 · CratesIoClient.Parse (cognitive 17) · ×1
  • CratesIoClient.Parse (cognitive 17) engine/src/Core/Dependencies/CratesIoClient.cs:390 — CratesIoClient.Parse has cognitive complexity 17 (threshold 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 · MavenResolvedGraph.Parse (cognitive 17) · ×1
  • MavenResolvedGraph.Parse (cognitive 17) engine/src/Core/Dependencies/MavenResolvedGraph.cs:48 — MavenResolvedGraph.Parse has cognitive complexity 17 (threshold 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 · MixManifestHygiene.DependencyBodyIsLiteral (cognitive 17) · ×1
  • MixManifestHygiene.DependencyBodyIsLiteral (cognitive 17) engine/src/Core/Dependencies/MixManifestHygiene.cs:115 — MixManifestHygiene.DependencyBodyIsLiteral has cognitive complexity 17 (threshold 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 · NpmCurrencyCollector.CollectAsync (cognitive 17) · ×1
  • NpmCurrencyCollector.CollectAsync (cognitive 17) engine/src/Core/Dependencies/NpmCurrencyCollector.cs:68 — NpmCurrencyCollector.CollectAsync has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PassThroughFacadeDetector.Detect (cognitive 17) · ×1
  • PassThroughFacadeDetector.Detect (cognitive 17) engine/src/Core/Architecture/PassThroughFacadeDetector.cs:63 — PassThroughFacadeDetector.Detect has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PulumiExtractor.Classify (cognitive 17) · ×1
  • PulumiExtractor.Classify (cognitive 17) engine/src/Core/Architecture/Topology/Extractors/PulumiExtractor.cs:67 — PulumiExtractor.Classify has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SystemdUnitExtractor.Extract (cognitive 17) · ×1
  • SystemdUnitExtractor.Extract (cognitive 17) engine/src/Core/Architecture/Topology/Extractors/SystemdUnitExtractor.cs:45 — SystemdUnitExtractor.Extract has cognitive complexity 17 (threshold 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 · SystemdUnitExtractor.RunImage (cognitive 17) · ×1
  • SystemdUnitExtractor.RunImage (cognitive 17) engine/src/Core/Architecture/Topology/Extractors/SystemdUnitExtractor.cs:331 — SystemdUnitExtractor.RunImage has cognitive complexity 17 (threshold 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 · CredentialScannerAllowlist.ParsePathPatterns (cognitive 17) · ×1
  • CredentialScannerAllowlist.ParsePathPatterns (cognitive 17) engine/src/Core/Security/CredentialScannerAllowlist.cs:117 — CredentialScannerAllowlist.ParsePathPatterns has cognitive complexity 17 (threshold 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 · DotnetProjectLicensesCollector.CloseOverDependencyGraphAsync (cognitive 17) · ×1
  • DotnetProjectLicensesCollector.CloseOverDependencyGraphAsync (cognitive 17) engine/src/Core/Security/DotnetProjectLicensesCollector.cs:538 — DotnetProjectLicensesCollector.CloseOverDependencyGraphAsync has cognitive complexity 17 (threshold 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 · SyftSbomNormalizer.ReadLicenses (cognitive 17) · ×1
  • SyftSbomNormalizer.ReadLicenses (cognitive 17) engine/src/Core/Security/SyftSbomNormalizer.cs:128 — SyftSbomNormalizer.ReadLicenses has cognitive complexity 17 (threshold 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 · GeneratorBoilerplate.Classify (cognitive 17) · ×1
  • GeneratorBoilerplate.Classify (cognitive 17) engine/src/Core/Docs/GeneratorBoilerplate.cs:75 — GeneratorBoilerplate.Classify has cognitive complexity 17 (threshold 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 · MarkupText.IsExpression (cognitive 17) · ×1
  • MarkupText.IsExpression (cognitive 17) engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupText.cs:75 — MarkupText.IsExpression has cognitive complexity 17 (threshold 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 · NodeTestSuiteCoverageCollector.GatherLcov (cognitive 17) · ×1
  • NodeTestSuiteCoverageCollector.GatherLcov (cognitive 17) engine/src/Core/Testing/NodeTestSuiteCoverageCollector.cs:1172 — NodeTestSuiteCoverageCollector.GatherLcov has cognitive complexity 17 (threshold 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 · NodeWorkspaceSiblingBuilder.EntryPoint (cognitive 17) · ×1
  • NodeWorkspaceSiblingBuilder.EntryPoint (cognitive 17) engine/src/Core/Testing/NodeWorkspaceSiblingBuilder.cs:182 — NodeWorkspaceSiblingBuilder.EntryPoint has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · FrontendConfigResolution.ParseTsConfigRaw (cognitive 17) · ×1
  • FrontendConfigResolution.ParseTsConfigRaw (cognitive 17) engine/src/Core/Frontend/FrontendConfigResolution.cs:253 — FrontendConfigResolution.ParseTsConfigRaw has cognitive complexity 17 (threshold 15). 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 · FrontendManifestEntryPoints.AddRegistryFiles (cognitive 17) · ×1
  • FrontendManifestEntryPoints.AddRegistryFiles (cognitive 17) engine/src/Core/Frontend/FrontendManifestEntryPoints.cs:240 — FrontendManifestEntryPoints.AddRegistryFiles has cognitive complexity 17 (threshold 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 · FrontendPathLiteralRefs.CollectGoEmbedRefs (cognitive 17) · ×1
  • FrontendPathLiteralRefs.CollectGoEmbedRefs (cognitive 17) engine/src/Core/Frontend/FrontendPathLiteralRefs.cs:548 — FrontendPathLiteralRefs.CollectGoEmbedRefs has cognitive complexity 17 (threshold 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 · FrontendPathLiteralRefs.AddComputedDirPathRefs (cognitive 17) · ×1
  • FrontendPathLiteralRefs.AddComputedDirPathRefs (cognitive 17) engine/src/Core/Frontend/FrontendPathLiteralRefs.cs:955 — FrontendPathLiteralRefs.AddComputedDirPathRefs has cognitive complexity 17 (threshold 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 · NxDependencyConstraints.Violations (cognitive 17) · ×1
  • NxDependencyConstraints.Violations (cognitive 17) engine/src/Core/Frontend/NxDependencyConstraints.cs:50 — NxDependencyConstraints.Violations has cognitive complexity 17 (threshold 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 · DependencyGraph.FindCycles (cognitive 17) · ×1
  • DependencyGraph.FindCycles (cognitive 17) engine/src/Core/Statistics/DependencyGraph.cs:26 — DependencyGraph.FindCycles has cognitive complexity 17 (threshold 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 · DotnetBuildStatistician.UninitialisedSubmodules (cognitive 17) · ×1
  • DotnetBuildStatistician.UninitialisedSubmodules (cognitive 17) engine/src/Core/Statistics/DotnetBuildStatistician.cs:570 — DotnetBuildStatistician.UninitialisedSubmodules has cognitive complexity 17 (threshold 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 · OtpModuleGraph.StripComments (cognitive 17) · ×1
  • OtpModuleGraph.StripComments (cognitive 17) engine/src/Core/Manifests/OtpModuleGraph.cs:403 — OtpModuleGraph.StripComments has cognitive complexity 17 (threshold 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 · SourceImportModuleGraph.BuildSingleComponent (cognitive 17) · ×1
  • SourceImportModuleGraph.BuildSingleComponent (cognitive 17) engine/src/Core/Manifests/SourceImportModuleGraph.cs:349 — SourceImportModuleGraph.BuildSingleComponent has cognitive complexity 17 (threshold 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 · XcodeGenModuleGraph.Collect (cognitive 17) · ×1
  • XcodeGenModuleGraph.Collect (cognitive 17) engine/src/Core/Manifests/XcodeGenModuleGraph.cs:261 — XcodeGenModuleGraph.Collect has cognitive complexity 17 (threshold 15). 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 · SfcScriptExtractor.AttributeValue (cognitive 17) · ×1
  • SfcScriptExtractor.AttributeValue (cognitive 17) engine/src/Core/Classification/SfcScriptExtractor.cs:250 — SfcScriptExtractor.AttributeValue has cognitive complexity 17 (threshold 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 · TemplateProjectTrees.ReadSbt (cognitive 17) · ×1
  • TemplateProjectTrees.ReadSbt (cognitive 17) engine/src/Core/Classification/TemplateProjectTrees.Consumption.Readers.cs:283 — TemplateProjectTrees.ReadSbt has cognitive complexity 17 (threshold 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 · PolyglotSampleCorpus.IsCorpus (cognitive 17) · ×1
  • PolyglotSampleCorpus.IsCorpus (cognitive 17) engine/src/Core/SourceCensus/PolyglotSampleCorpus.cs:39 — PolyglotSampleCorpus.IsCorpus has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · TsConfigStrictness.Read (cognitive 17) · ×1
  • TsConfigStrictness.Read (cognitive 17) engine/src/Core/Languages/Ts/TsConfigStrictness.cs:54 — TsConfigStrictness.Read has cognitive complexity 17 (threshold 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 · RubyArgumentMutatedScan.MutatesHere (cognitive 17) · ×1
  • RubyArgumentMutatedScan.MutatesHere (cognitive 17) engine/src/Core/Languages/Ruby/Security/RubyArgumentMutatedScan.cs:562 — RubyArgumentMutatedScan.MutatesHere has cognitive complexity 17 (threshold 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 · ErlangDomainConventions.BlockingHandlers (cognitive 17) · ×1
  • ErlangDomainConventions.BlockingHandlers (cognitive 17) engine/src/Core/Languages/Erlang/Domain/ErlangDomainConventions.cs:349 — ErlangDomainConventions.BlockingHandlers has cognitive complexity 17 (threshold 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 · ErlangTestSuiteScanner.ErlangFiles (cognitive 17) · ×1
  • ErlangTestSuiteScanner.ErlangFiles (cognitive 17) engine/src/Core/Languages/Erlang/Testing/ErlangTestSuiteScanner.cs:397 — ErlangTestSuiteScanner.ErlangFiles has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GoModuleTestScanner.GoTestFiles (cognitive 17) · ×1
  • GoModuleTestScanner.GoTestFiles (cognitive 17) engine/src/Core/Languages/Go/Testing/GoModuleTestScanner.cs:222 — GoModuleTestScanner.GoTestFiles has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PythonManifestHygiene.ParseSetupPy (cognitive 17) · ×1
  • PythonManifestHygiene.ParseSetupPy (cognitive 17) engine/src/Core/Languages/Python/Dependencies/PythonManifestHygiene.cs:524 — PythonManifestHygiene.ParseSetupPy has cognitive complexity 17 (threshold 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 · PythonManifestHygiene.LiteralStringList (cognitive 17) · ×1
  • PythonManifestHygiene.LiteralStringList (cognitive 17) engine/src/Core/Languages/Python/Dependencies/PythonManifestHygiene.cs:578 — PythonManifestHygiene.LiteralStringList has cognitive complexity 17 (threshold 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 · ScalaTestSuiteScanner.ScalaFiles (cognitive 17) · ×1
  • ScalaTestSuiteScanner.ScalaFiles (cognitive 17) engine/src/Core/Languages/Scala/Testing/ScalaTestSuiteScanner.cs:313 — ScalaTestSuiteScanner.ScalaFiles has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SwiftDomainConventions.SwiftDualWrites (cognitive 17) · ×1
  • SwiftDomainConventions.SwiftDualWrites (cognitive 17) engine/src/Core/Languages/Swift/Domain/SwiftDomainConventions.cs:740 — SwiftDomainConventions.SwiftDualWrites has cognitive complexity 17 (threshold 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 · FrontendSourcePresence.AtLeast (cognitive 17) · ×1
  • FrontendSourcePresence.AtLeast (cognitive 17) engine/src/Core/FrontendPresence/FrontendSourcePresence.cs:80 — FrontendSourcePresence.AtLeast has cognitive complexity 17 (threshold 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 · UiReadsViewModelsOnlyAnalyzer.Banned (cognitive 17) · ×1
  • UiReadsViewModelsOnlyAnalyzer.Banned (cognitive 17) src/Kennel.Analyzers/UiReadsViewModelsOnlyAnalyzer.cs:209 — UiReadsViewModelsOnlyAnalyzer.Banned has cognitive complexity 17 (threshold 15). 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 · PartnerRedemption.RedeemAsync (cognitive 17) · ×1
  • PartnerRedemption.RedeemAsync (cognitive 17) src/Kennel.Core/Billing/Partners/PartnerRedemption.cs:75 — PartnerRedemption.RedeemAsync has cognitive complexity 17 (threshold 15). 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 · OrgInvitationClaimHook.OnUserProvisionedAsync (cognitive 17) · ×1
  • OrgInvitationClaimHook.OnUserProvisionedAsync (cognitive 17) src/Kennel.Core/Billing/Services/OrgInvitationClaimHook.cs:31 — OrgInvitationClaimHook.OnUserProvisionedAsync has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComplianceDeliveryService.MintAndSignAsync (cognitive 17) · ×1
  • ComplianceDeliveryService.MintAndSignAsync (cognitive 17) src/Kennel.Core/Compliance/Report/ComplianceDeliveryService.cs:52 — ComplianceDeliveryService.MintAndSignAsync has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · BacklogService.DeltaBar (cognitive 17) · ×1
  • BacklogService.DeltaBar (cognitive 17) src/Kennel.Core/LanguageTraining/Services/BacklogService.cs:2168 — BacklogService.DeltaBar has cognitive complexity 17 (threshold 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 · RepositoryAccessPolicy.AddGrantedOrAdministeredOrTeamHeldAsync (cognitive 17) · ×1
  • RepositoryAccessPolicy.AddGrantedOrAdministeredOrTeamHeldAsync (cognitive 17) src/Kennel.Core/Repositories/Services/RepositoryAccessPolicy.cs:203 — RepositoryAccessPolicy.AddGrantedOrAdministeredOrTeamHeldAsync has cognitive complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 3 function literals inside it that branch. 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 · CauseDispositionsBackfill.SurveyAsync (cognitive 17) · ×1
  • CauseDispositionsBackfill.SurveyAsync (cognitive 17) src/Kennel.Watchdog.Core/Agents/Application/CauseDispositionsBackfill.cs:37 — CauseDispositionsBackfill.SurveyAsync has cognitive complexity 17 (threshold 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 · CustomerDetailReader.ForViewerAsync (cognitive 17) · ×1
  • CustomerDetailReader.ForViewerAsync (cognitive 17) src/Kennel.Watchdog.Core/Customers/Pages/CustomerDetail/CustomerDetailReader.cs:112 — CustomerDetailReader.ForViewerAsync has cognitive complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackerTicketsBackfill.SurveyAsync (cognitive 17) · ×1
  • TrackerTicketsBackfill.SurveyAsync (cognitive 17) src/Kennel.Watchdog.Core/Trackers/Application/TrackerTicketsBackfill.cs:40 — TrackerTicketsBackfill.SurveyAsync has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrainingHubDocument.FixQueue (cognitive 17) · ×1
  • TrainingHubDocument.FixQueue (cognitive 17) src/Kennel.Admin.Core/Admin/Pages/TrainingHub/TrainingHubDocument.cs:126 — TrainingHubDocument.FixQueue has cognitive complexity 17 (threshold 15). 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 · PartnerConsoleService.MintCodeAsync (cognitive 17) · ×1
  • PartnerConsoleService.MintCodeAsync (cognitive 17) src/Kennel.Admin.Core/Admin/Services/PartnerConsoleService.cs:233 — PartnerConsoleService.MintCodeAsync has cognitive complexity 17 (threshold 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 · DeclaredTestSources.matchingClose (cognitive 17) · ×1
  • DeclaredTestSources.matchingClose (cognitive 17) engine/sidecars/java-spoon/src/main/java/dev/canine/codehealth/java/DeclaredTestSources.java:244 — DeclaredTestSources.matchingClose has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rate_audit.rate_item (cognitive 17) · ×1
  • rate_audit.rate_item (cognitive 17) tools/train/rate_audit.py:112 — rate_audit.rate_item has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 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.
D2 · Cognitive Complexity · idempotency-facts.presenceTested (cognitive 17) · ×1
  • idempotency-facts.presenceTested (cognitive 17) engine/sidecars/tsjs-frontend/idempotency-facts.mjs:189 — idempotency-facts.presenceTested has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · moduleOfClass (cognitive 17) · ×1
  • moduleOfClass (cognitive 17) engine/sidecars/tsjs-frontend/idempotency-facts.mjs:111 — moduleOfClass has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), other 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseServerTiming (cognitive 17) · ×1
  • parseServerTiming (cognitive 17) tools/localdev/ui/timing-gate.mjs:52 — parseServerTiming has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (7 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 · AnalyzeCommand.ExecuteCoreAsync (cognitive 16) · ×1
  • AnalyzeCommand.ExecuteCoreAsync (cognitive 16) engine/src/CodeHealth.Cli/Commands/AnalyzeCommand.cs:298 — AnalyzeCommand.ExecuteCoreAsync has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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 · ExecutiveBrief.SeriousPlaces (cognitive 16) · ×1
  • ExecutiveBrief.SeriousPlaces (cognitive 16) engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:386 — ExecutiveBrief.SeriousPlaces has cognitive complexity 16 (threshold 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 · ChangelogNarrator.StartEntriesAsync (cognitive 16) · ×1
  • ChangelogNarrator.StartEntriesAsync (cognitive 16) engine/src/CodeHealth.Reporting/Changelog/ChangelogNarrator.cs:350 — ChangelogNarrator.StartEntriesAsync has cognitive complexity 16 (threshold 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 · SynthesisEngine.Trajectory (cognitive 16) · ×1
  • SynthesisEngine.Trajectory (cognitive 16) engine/src/CodeHealth.Reporting/Synthesis/SynthesisEngine.cs:116 — SynthesisEngine.Trajectory has cognitive complexity 16 (threshold 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 · SynthesisEngine.RootCauses (cognitive 16) · ×1
  • SynthesisEngine.RootCauses (cognitive 16) engine/src/CodeHealth.Reporting/Synthesis/SynthesisEngine.cs:223 — SynthesisEngine.RootCauses has cognitive complexity 16 (threshold 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 · BoundaryCouplingAnalyzer.RunWithWithheldAsync (cognitive 16) · ×1
  • BoundaryCouplingAnalyzer.RunWithWithheldAsync (cognitive 16) engine/src/Scanner/ArchitectureJudged/D23/BoundaryCouplingAnalyzer.cs:64 — BoundaryCouplingAnalyzer.RunWithWithheldAsync has cognitive complexity 16 (threshold 15). 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 · ConfigEntries.ReadXmlTransform (cognitive 16) · ×1
  • ConfigEntries.ReadXmlTransform (cognitive 16) engine/src/Scanner/LlmJudgedLanguage/LA4/ConfigEntries.cs:101 — ConfigEntries.ReadXmlTransform has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeadingLabelQualityAnalyzer.Analyze (cognitive 16) · ×1
  • HeadingLabelQualityAnalyzer.Analyze (cognitive 16) engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:46 — HeadingLabelQualityAnalyzer.Analyze has cognitive complexity 16 (threshold 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 · SupplyChainProvenanceAnalyzer.JudgedWriteGrants (cognitive 16) · ×1
  • SupplyChainProvenanceAnalyzer.JudgedWriteGrants (cognitive 16) engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.TokenSites.cs:297 — SupplyChainProvenanceAnalyzer.JudgedWriteGrants has cognitive complexity 16 (threshold 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 · NamingRules.RoleSlotToken (cognitive 16) · ×1
  • NamingRules.RoleSlotToken (cognitive 16) engine/src/Scanner/Docs/D21/NamingRules.cs:238 — NamingRules.RoleSlotToken has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IncompletenessAnalyzer.ForeignStableValue (cognitive 16) · ×1
  • IncompletenessAnalyzer.ForeignStableValue (cognitive 16) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScriptInert.cs:198 — IncompletenessAnalyzer.ForeignStableValue has cognitive complexity 16 (threshold 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 · IncompletenessAnalyzer.EmptyWiredRazorHandlers (cognitive 16) · ×1
  • IncompletenessAnalyzer.EmptyWiredRazorHandlers (cognitive 16) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.RazorScript.cs:143 — IncompletenessAnalyzer.EmptyWiredRazorHandlers has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SliceModuleSites.Resolve (cognitive 16) · ×1
  • SliceModuleSites.Resolve (cognitive 16) engine/src/Scanner/ArchitectureModel/AX7/SliceModuleSites.cs:233 — SliceModuleSites.Resolve has cognitive complexity 16 (threshold 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 · DocumentReader.CheckProjectArgument (cognitive 16) · ×1
  • DocumentReader.CheckProjectArgument (cognitive 16) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1024 — DocumentReader.CheckProjectArgument has cognitive complexity 16 (threshold 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 · DocumentReader.CheckRoute (cognitive 16) · ×1
  • DocumentReader.CheckRoute (cognitive 16) engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:1380 — DocumentReader.CheckRoute has cognitive complexity 16 (threshold 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 · ForeignWebSecurityScan.SwitchesHstsOff (cognitive 16) · ×1
  • ForeignWebSecurityScan.SwitchesHstsOff (cognitive 16) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.NodeTransport.cs:390 — ForeignWebSecurityScan.SwitchesHstsOff has cognitive complexity 16 (threshold 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 · ForeignComplianceScan.ElixirPlugDefinitions (cognitive 16) · ×1
  • ForeignComplianceScan.ElixirPlugDefinitions (cognitive 16) engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirAccessControl.cs:233 — ForeignComplianceScan.ElixirPlugDefinitions has cognitive complexity 16 (threshold 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 · ForeignDeadBranchScan.IsKotlinPureSubject (cognitive 16) · ×1
  • ForeignDeadBranchScan.IsKotlinPureSubject (cognitive 16) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:441 — ForeignDeadBranchScan.IsKotlinPureSubject has cognitive complexity 16 (threshold 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 · KotlinShape.KotlinShape.ctor (cognitive 16) · ×1
  • KotlinShape.KotlinShape.ctor (cognitive 16) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Kotlin.cs:256 — KotlinShape.KotlinShape.ctor has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ForeignSideEffectingGuardScan.PythonMatchingElse (cognitive 16) · ×1
  • ForeignSideEffectingGuardScan.PythonMatchingElse (cognitive 16) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Python.cs:210 — ForeignSideEffectingGuardScan.PythonMatchingElse has cognitive complexity 16 (threshold 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 · ForeignSideEffectingGuardScan.ScalaGuardEnd (cognitive 16) · ×1
  • ForeignSideEffectingGuardScan.ScalaGuardEnd (cognitive 16) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Scala.cs:475 — ForeignSideEffectingGuardScan.ScalaGuardEnd has cognitive complexity 16 (threshold 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 · ForeignDiagnosticMaterialisationScan.MentionsALevel (cognitive 16) · ×1
  • ForeignDiagnosticMaterialisationScan.MentionsALevel (cognitive 16) engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:587 — ForeignDiagnosticMaterialisationScan.MentionsALevel has cognitive complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ForeignUnsynchronisedHandoffScan.Compute (cognitive 16) · ×1
  • ForeignUnsynchronisedHandoffScan.Compute (cognitive 16) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:142 — ForeignUnsynchronisedHandoffScan.Compute has cognitive complexity 16 (threshold 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 · UncoveredIndexGuardAnalyzer.Run (cognitive 16) · ×1
  • UncoveredIndexGuardAnalyzer.Run (cognitive 16) engine/src/Scanner/Defects/X28/UncoveredIndexGuardAnalyzer.cs:24 — UncoveredIndexGuardAnalyzer.Run has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BlockingOnAsyncSites.BlockingHelper (cognitive 16) · ×1
  • BlockingOnAsyncSites.BlockingHelper (cognitive 16) engine/src/Scanner/Defects/X1/BlockingOnAsyncSites.cs:171 — BlockingOnAsyncSites.BlockingHelper has cognitive complexity 16 (threshold 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 · ForeignNullableTypingScan.ReadJavaBuildFiles (cognitive 16) · ×1
  • ForeignNullableTypingScan.ReadJavaBuildFiles (cognitive 16) engine/src/Scanner/Defects/X5/ForeignNullableTypingScan.Java.cs:223 — ForeignNullableTypingScan.ReadJavaBuildFiles has cognitive complexity 16 (threshold 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 · ForeignDocumentWalkScan.KotlinCalls (cognitive 16) · ×1
  • ForeignDocumentWalkScan.KotlinCalls (cognitive 16) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:996 — ForeignDocumentWalkScan.KotlinCalls has cognitive complexity 16 (threshold 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 · ForeignDocumentWalkScan.KotlinReferences (cognitive 16) · ×1
  • ForeignDocumentWalkScan.KotlinReferences (cognitive 16) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:1101 — ForeignDocumentWalkScan.KotlinReferences has cognitive complexity 16 (threshold 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 · ForeignDocumentWalkScan.IsKotlinWholeValue (cognitive 16) · ×1
  • ForeignDocumentWalkScan.IsKotlinWholeValue (cognitive 16) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:1185 — ForeignDocumentWalkScan.IsKotlinWholeValue has cognitive complexity 16 (threshold 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 · PendingWithoutFailureRule.PersistedFailure (cognitive 16) · ×1
  • PendingWithoutFailureRule.PersistedFailure (cognitive 16) engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:393 — PendingWithoutFailureRule.PersistedFailure has cognitive complexity 16 (threshold 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 · ScriptBlockingScan.ArrowAfterParameters (cognitive 16) · ×1
  • ScriptBlockingScan.ArrowAfterParameters (cognitive 16) engine/src/Scanner/ModelAware/PF3/ScriptBlockingScan.cs:450 — ScriptBlockingScan.ArrowAfterParameters has cognitive complexity 16 (threshold 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 · DomainInfraEdgesTs.NamesOnlyNestWiring (cognitive 16) · ×1
  • DomainInfraEdgesTs.NamesOnlyNestWiring (cognitive 16) engine/src/Scanner/ModelAware/DM6/DomainInfraEdgesTs.cs:301 — DomainInfraEdgesTs.NamesOnlyNestWiring has cognitive complexity 16 (threshold 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 · ConfigCredentialBindingScan.Scan (cognitive 16) · ×1
  • ConfigCredentialBindingScan.Scan (cognitive 16) engine/src/Scanner/Security/D28/Scanners/ConfigCredentialBindingScan.cs:207 — ConfigCredentialBindingScan.Scan has cognitive complexity 16 (threshold 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 · Model.HandlesCredential (cognitive 16) · ×1
  • Model.HandlesCredential (cognitive 16) engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:1236 — Model.HandlesCredential has cognitive complexity 16 (threshold 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 · KubernetesFieldAnchor.HostPathVolumeLines (cognitive 16) · ×1
  • KubernetesFieldAnchor.HostPathVolumeLines (cognitive 16) engine/src/Scanner/Security/D31/Scanners/KubernetesFieldAnchor.cs:151 — KubernetesFieldAnchor.HostPathVolumeLines has cognitive complexity 16 (threshold 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 · RuntimeHardeningScan.WorkloadDocuments (cognitive 16) · ×1
  • RuntimeHardeningScan.WorkloadDocuments (cognitive 16) engine/src/Scanner/Security/Shared/RuntimeHardeningScan.cs:291 — RuntimeHardeningScan.WorkloadDocuments has cognitive complexity 16 (threshold 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 · SemgrepTargets.For (cognitive 16) · ×1
  • SemgrepTargets.For (cognitive 16) engine/src/Scanner/Security/Shared/Scanners/SemgrepTargets.cs:52 — SemgrepTargets.For has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VisualAndMotionAnalyzer.StyleSheetContrast (cognitive 16) · ×1
  • VisualAndMotionAnalyzer.StyleSheetContrast (cognitive 16) engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:245 — VisualAndMotionAnalyzer.StyleSheetContrast has cognitive complexity 16 (threshold 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 · EventHandlers.WithDeclaredBodyCalls (cognitive 16) · ×1
  • EventHandlers.WithDeclaredBodyCalls (cognitive 16) engine/src/Scanner/Accessibility/Accessibility.Prework/EventHandlers.cs:532 — EventHandlers.WithDeclaredBodyCalls has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PlaywrightNodeRenderer.ReadCommandFiles (cognitive 16) · ×1
  • PlaywrightNodeRenderer.ReadCommandFiles (cognitive 16) engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PlaywrightNodeRenderer.cs:586 — PlaywrightNodeRenderer.ReadCommandFiles has cognitive complexity 16 (threshold 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 · RustSource.ReadPathAttributes (cognitive 16) · ×1
  • RustSource.ReadPathAttributes (cognitive 16) engine/src/Core/Api/CargoLibraryTarget.cs:836 — RustSource.ReadPathAttributes has cognitive complexity 16 (threshold 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 · ExposedPackageMarkers.NestedComposerManifests (cognitive 16) · ×1
  • ExposedPackageMarkers.NestedComposerManifests (cognitive 16) engine/src/Core/Api/ExposedPackageMarkers.ComposerMonorepo.cs:83 — ExposedPackageMarkers.NestedComposerManifests has cognitive complexity 16 (threshold 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 · SetuptoolsDistribution.MatchingClose (cognitive 16) · ×1
  • SetuptoolsDistribution.MatchingClose (cognitive 16) engine/src/Core/Api/SetuptoolsDistribution.cs:165 — SetuptoolsDistribution.MatchingClose has cognitive complexity 16 (threshold 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 · PersonalDataEvidence.TypeEvidence (cognitive 16) · ×1
  • PersonalDataEvidence.TypeEvidence (cognitive 16) engine/src/Core/Compliance/PersonalDataEvidence.cs:423 — PersonalDataEvidence.TypeEvidence has cognitive complexity 16 (threshold 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 · SourceCommentTaskScanner.CommentStart (cognitive 16) · ×1
  • SourceCommentTaskScanner.CommentStart (cognitive 16) engine/src/Core/ExplicitDebt/SourceCommentTaskScanner.cs:128 — SourceCommentTaskScanner.CommentStart has cognitive complexity 16 (threshold 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 · YamlDisabledConfigScanner.ScanLines (cognitive 16) · ×1
  • YamlDisabledConfigScanner.ScanLines (cognitive 16) engine/src/Core/ExplicitDebt/YamlDisabledConfigScanner.cs:220 — YamlDisabledConfigScanner.ScanLines has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArchGraphClustering.Build (cognitive 16) · ×1
  • ArchGraphClustering.Build (cognitive 16) engine/src/Core/Graph/ArchGraphClustering.cs:30 — ArchGraphClustering.Build has cognitive complexity 16 (threshold 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 · RazorCodeVirtualizer.EnumerateRazorFiles (cognitive 16) · ×1
  • RazorCodeVirtualizer.EnumerateRazorFiles (cognitive 16) engine/src/Core/CodeShape/RazorCodeVirtualizer.cs:93 — RazorCodeVirtualizer.EnumerateRazorFiles has cognitive complexity 16 (threshold 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 · ApplePackageManagerPresence.Read (cognitive 16) · ×1
  • ApplePackageManagerPresence.Read (cognitive 16) engine/src/Core/Dependencies/ApplePackageManagerPresence.cs:49 — ApplePackageManagerPresence.Read has cognitive complexity 16 (threshold 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 · NpmLockfileReader.ReadPackageLock (cognitive 16) · ×1
  • NpmLockfileReader.ReadPackageLock (cognitive 16) engine/src/Core/Dependencies/NpmLockfileReader.cs:35 — NpmLockfileReader.ReadPackageLock has cognitive complexity 16 (threshold 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 · NpmManifestHygiene.DeclaresAShippedDependency (cognitive 16) · ×1
  • NpmManifestHygiene.DeclaresAShippedDependency (cognitive 16) engine/src/Core/Dependencies/NpmManifestHygiene.cs:364 — NpmManifestHygiene.DeclaresAShippedDependency has cognitive complexity 16 (threshold 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 · ProjectModuleFolders.Detect (cognitive 16) · ×1
  • ProjectModuleFolders.Detect (cognitive 16) engine/src/Core/Architecture/ProjectModuleFolders.cs:65 — ProjectModuleFolders.Detect has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · NativeSecretScanner.ScanAsync (cognitive 16) · ×1
  • NativeSecretScanner.ScanAsync (cognitive 16) engine/src/Core/Security/NativeSecretScanner.cs:522 — NativeSecretScanner.ScanAsync has cognitive complexity 16 (threshold 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 · NativeSecretScanner.HeaderCallCredentialType (cognitive 16) · ×1
  • NativeSecretScanner.HeaderCallCredentialType (cognitive 16) engine/src/Core/Security/NativeSecretScanner.HardcodedCredential.cs:624 — NativeSecretScanner.HeaderCallCredentialType has cognitive complexity 16 (threshold 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 · AstroMarkupProducer.NextRawTextOpen (cognitive 16) · ×1
  • AstroMarkupProducer.NextRawTextOpen (cognitive 16) engine/src/Core/Markup/AstroMarkupProducer.cs:252 — AstroMarkupProducer.NextRawTextOpen has cognitive complexity 16 (threshold 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 · MarkupCodeSpans.Compute (cognitive 16) · ×1
  • MarkupCodeSpans.Compute (cognitive 16) engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupCodeSpans.cs:37 — MarkupCodeSpans.Compute has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DotnetTestReliabilityCollector.MergeTrx (cognitive 16) · ×1
  • DotnetTestReliabilityCollector.MergeTrx (cognitive 16) engine/src/Core/Testing/DotnetTestReliabilityCollector.cs:336 — DotnetTestReliabilityCollector.MergeTrx has cognitive complexity 16 (threshold 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 · JsTestQualityCensus.ImportBindings (cognitive 16) · ×1
  • JsTestQualityCensus.ImportBindings (cognitive 16) engine/src/Core/Testing/JsTestQualityCensus.MockDominance.cs:269 — JsTestQualityCensus.ImportBindings has cognitive complexity 16 (threshold 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 · ForeignPackageOwnership.IsForeignOwnedDirectory (cognitive 16) · ×1
  • ForeignPackageOwnership.IsForeignOwnedDirectory (cognitive 16) engine/src/Core/Frontend/ForeignPackageOwnership.cs:110 — ForeignPackageOwnership.IsForeignOwnedDirectory has cognitive complexity 16 (threshold 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 · FrontendConfigResolution.ParsePnpmPackages (cognitive 16) · ×1
  • FrontendConfigResolution.ParsePnpmPackages (cognitive 16) engine/src/Core/Frontend/FrontendConfigResolution.cs:58 — FrontendConfigResolution.ParsePnpmPackages has cognitive complexity 16 (threshold 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 · FrontendTestSuiteMasking.PrunedTreeSourceFiles (cognitive 16) · ×1
  • FrontendTestSuiteMasking.PrunedTreeSourceFiles (cognitive 16) engine/src/Core/Frontend/FrontendTestSuiteMasking.cs:822 — FrontendTestSuiteMasking.PrunedTreeSourceFiles has cognitive complexity 16 (threshold 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 · TsConfigGlob.ToRegex (cognitive 16) · ×1
  • TsConfigGlob.ToRegex (cognitive 16) engine/src/Core/Frontend/FrontendWorkspaceFacts.cs:305 — TsConfigGlob.ToRegex has cognitive complexity 16 (threshold 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 · JsModuleWrapper.Find (cognitive 16) · ×1
  • JsModuleWrapper.Find (cognitive 16) engine/src/Core/Frontend/JsModuleWrapper.cs:30 — JsModuleWrapper.Find has cognitive complexity 16 (threshold 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 · JsScopeBindings.ArrowParameterRange (cognitive 16) · ×1
  • JsScopeBindings.ArrowParameterRange (cognitive 16) engine/src/Core/Frontend/JsScopeBindings.cs:642 — JsScopeBindings.ArrowParameterRange has cognitive complexity 16 (threshold 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 · JsUnusedDeclarations.TopLevelDeclarationName (cognitive 16) · ×1
  • JsUnusedDeclarations.TopLevelDeclarationName (cognitive 16) engine/src/Core/Frontend/JsUnusedDeclarations.cs:563 — JsUnusedDeclarations.TopLevelDeclarationName has cognitive complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · JsUnusedDeclarations.StandaloneOccurrences (cognitive 16) · ×1
  • JsUnusedDeclarations.StandaloneOccurrences (cognitive 16) engine/src/Core/Frontend/JsUnusedDeclarations.cs:672 — JsUnusedDeclarations.StandaloneOccurrences has cognitive complexity 16 (threshold 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 · CiWorkflowReader.AppendMakeRecipes (cognitive 16) · ×1
  • CiWorkflowReader.AppendMakeRecipes (cognitive 16) engine/src/Core/Readiness/CiWorkflowReader.cs:514 — CiWorkflowReader.AppendMakeRecipes has cognitive complexity 16 (threshold 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 · LayerConventions.FindViolations (cognitive 16) · ×1
  • LayerConventions.FindViolations (cognitive 16) engine/src/Core/Statistics/LayerConventions.cs:87 — LayerConventions.FindViolations has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinkedAppHosts.Materialise (cognitive 16) · ×1
  • LinkedAppHosts.Materialise (cognitive 16) engine/src/Core/Statistics/LinkedAppHosts.cs:36 — LinkedAppHosts.Materialise has cognitive complexity 16 (threshold 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 · ContainerHardeningParser.Parse (cognitive 16) · ×1
  • ContainerHardeningParser.Parse (cognitive 16) engine/src/Core/RuntimeBoot/ContainerHardeningParser.cs:62 — ContainerHardeningParser.Parse has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolchainServerDetector.Jvm (cognitive 16) · ×1
  • ToolchainServerDetector.Jvm (cognitive 16) engine/src/Core/RuntimeBoot/ToolchainServerDetector.Jvm.cs:11 — ToolchainServerDetector.Jvm has cognitive complexity 16 (threshold 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 · CargoVersionRequirement.TryParseComparator (cognitive 16) · ×1
  • CargoVersionRequirement.TryParseComparator (cognitive 16) engine/src/Core/Manifests/CargoVersionRequirement.cs:100 — CargoVersionRequirement.TryParseComparator has cognitive complexity 16 (threshold 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 · SourceClassifier.IsTestByBasename (cognitive 16) · ×1
  • SourceClassifier.IsTestByBasename (cognitive 16) engine/src/Core/Classification/SourceClassifier.cs:330 — SourceClassifier.IsTestByBasename has cognitive complexity 16 (threshold 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 · SourceClassifier.PackageManifestVerdict (cognitive 16) · ×1
  • SourceClassifier.PackageManifestVerdict (cognitive 16) engine/src/Core/Classification/SourceClassifier.cs:4390 — SourceClassifier.PackageManifestVerdict has cognitive complexity 16 (threshold 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 · TemplateDetection.IsTemplateProject (cognitive 16) · ×1
  • TemplateDetection.IsTemplateProject (cognitive 16) engine/src/Core/Classification/TemplateDetection.cs:74 — TemplateDetection.IsTemplateProject has cognitive complexity 16 (threshold 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 · TemplateProjectTrees.ReadPackageJson (cognitive 16) · ×1
  • TemplateProjectTrees.ReadPackageJson (cognitive 16) engine/src/Core/Classification/TemplateProjectTrees.Consumption.cs:182 — TemplateProjectTrees.ReadPackageJson has cognitive complexity 16 (threshold 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 · TemplateProjectTrees.ReadGoMod (cognitive 16) · ×1
  • TemplateProjectTrees.ReadGoMod (cognitive 16) engine/src/Core/Classification/TemplateProjectTrees.Consumption.cs:323 — TemplateProjectTrees.ReadGoMod has cognitive complexity 16 (threshold 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 · TemplateProjectTrees.BracketDepth (cognitive 16) · ×1
  • TemplateProjectTrees.BracketDepth (cognitive 16) engine/src/Core/Classification/TemplateProjectTrees.Consumption.Readers.cs:207 — TemplateProjectTrees.BracketDepth has cognitive complexity 16 (threshold 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 · TestProjectDetection.UnconditionalIsTestProject (cognitive 16) · ×1
  • TestProjectDetection.UnconditionalIsTestProject (cognitive 16) engine/src/Core/Classification/TestProjectDetection.cs:744 — TestProjectDetection.UnconditionalIsTestProject has cognitive complexity 16 (threshold 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 · DashboardExportHeuristics.DeclaresDashboardSchema (cognitive 16) · ×1
  • DashboardExportHeuristics.DeclaresDashboardSchema (cognitive 16) engine/src/Core/FileQuality/DashboardExportHeuristics.cs:67 — DashboardExportHeuristics.DeclaresDashboardSchema has cognitive complexity 16 (threshold 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 · TypeReferenceOccurrences.DeclaredNames (cognitive 16) · ×1
  • TypeReferenceOccurrences.DeclaredNames (cognitive 16) engine/src/Core/Roslyn/CodeModel/TypeReferenceOccurrences.cs:83 — TypeReferenceOccurrences.DeclaredNames has cognitive complexity 16 (threshold 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 · DomainLayerShape.IsStronglyTypedId (cognitive 16) · ×1
  • DomainLayerShape.IsStronglyTypedId (cognitive 16) engine/src/Core/DomainShape/DomainLayerShape.cs:188 — DomainLayerShape.IsStronglyTypedId has cognitive complexity 16 (threshold 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 · DomainLayerShape.HasIdWrapperBase (cognitive 16) · ×1
  • DomainLayerShape.HasIdWrapperBase (cognitive 16) engine/src/Core/DomainShape/DomainLayerShape.cs:505 — DomainLayerShape.HasIdWrapperBase has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GemVersion.Compare (cognitive 16) · ×1
  • GemVersion.Compare (cognitive 16) engine/src/Core/Languages/Ruby/Dependencies/GemVersion.cs:115 — GemVersion.Compare has cognitive complexity 16 (threshold 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 · RubyArgumentMutatedScan.FirstDestructiveUse (cognitive 16) · ×1
  • RubyArgumentMutatedScan.FirstDestructiveUse (cognitive 16) engine/src/Core/Languages/Ruby/Security/RubyArgumentMutatedScan.cs:499 — RubyArgumentMutatedScan.FirstDestructiveUse has cognitive complexity 16 (threshold 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 · RubyArgumentMutatedScan.ArgumentTextAt (cognitive 16) · ×1
  • RubyArgumentMutatedScan.ArgumentTextAt (cognitive 16) engine/src/Core/Languages/Ruby/Security/RubyArgumentMutatedScan.cs:663 — RubyArgumentMutatedScan.ArgumentTextAt has cognitive complexity 16 (threshold 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 · RubyTestReliabilityCollector.CollectAsync (cognitive 16) · ×1
  • RubyTestReliabilityCollector.CollectAsync (cognitive 16) engine/src/Core/Languages/Ruby/Testing/RubyTestReliabilityCollector.cs:313 — RubyTestReliabilityCollector.CollectAsync has cognitive complexity 16 (threshold 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 · RustTestReliabilityCollector.PinnedToolchain (cognitive 16) · ×1
  • RustTestReliabilityCollector.PinnedToolchain (cognitive 16) engine/src/Core/Languages/Rust/Testing/RustTestReliabilityCollector.cs:223 — RustTestReliabilityCollector.PinnedToolchain has cognitive complexity 16 (threshold 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 · RustTestReliabilityCollector.CollectAsync (cognitive 16) · ×1
  • RustTestReliabilityCollector.CollectAsync (cognitive 16) engine/src/Core/Languages/Rust/Testing/RustTestReliabilityCollector.cs:301 — RustTestReliabilityCollector.CollectAsync has cognitive complexity 16 (threshold 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 · ScalaDomainConventions.BypassableInvariantEntities (cognitive 16) · ×1
  • ScalaDomainConventions.BypassableInvariantEntities (cognitive 16) engine/src/Core/Languages/Scala/Domain/ScalaDomainConventions.cs:944 — ScalaDomainConventions.BypassableInvariantEntities has cognitive complexity 16 (threshold 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 · CocoaPodsCurrencyCollector.CollectAsync (cognitive 16) · ×1
  • CocoaPodsCurrencyCollector.CollectAsync (cognitive 16) engine/src/Core/Languages/Swift/Dependencies/CocoaPodsCurrencyCollector.cs:31 — CocoaPodsCurrencyCollector.CollectAsync has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SwiftLibraryProducts.LiteralStringArrayArgument (cognitive 16) · ×1
  • SwiftLibraryProducts.LiteralStringArrayArgument (cognitive 16) engine/src/Core/Languages/Swift/Readiness/SwiftLibraryProducts.cs:312 — SwiftLibraryProducts.LiteralStringArrayArgument has cognitive complexity 16 (threshold 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 · DartDomainConventions.ClassifyHandler (cognitive 16) · ×1
  • DartDomainConventions.ClassifyHandler (cognitive 16) engine/src/Core/Languages/Dart/Domain/DartDomainConventions.cs:151 — DartDomainConventions.ClassifyHandler has cognitive complexity 16 (threshold 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 · PackageIndex.Build (cognitive 16) · ×1
  • PackageIndex.Build (cognitive 16) engine/src/Core/Packages/PackageIndex.cs:17 — PackageIndex.Build has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DotnetProjectFiles.ExistUnder (cognitive 16) · ×1
  • DotnetProjectFiles.ExistUnder (cognitive 16) engine/src/Core/DotnetProjects/DotnetProjectFiles.cs:58 — DotnetProjectFiles.ExistUnder has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · EndpointAuthorizationScan.Read (cognitive 16) · ×1
  • EndpointAuthorizationScan.Read (cognitive 16) engine/src/Scanner/Security/Shared.CSharp/EndpointAuthorizationScan.cs:1499 — EndpointAuthorizationScan.Read has cognitive complexity 16 (threshold 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 · ScriptSourceMask.SwiftStringEnd (cognitive 16) · ×1
  • ScriptSourceMask.SwiftStringEnd (cognitive 16) engine/src/Core/ScriptLexing/ScriptSourceMask.Swift.cs:88 — ScriptSourceMask.SwiftStringEnd has cognitive complexity 16 (threshold 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 · PackageCache.FetchAndStoreAsync (cognitive 16) · ×1
  • PackageCache.FetchAndStoreAsync (cognitive 16) engine/src/PkgCache/PackageCache.cs:201 — PackageCache.FetchAndStoreAsync has cognitive complexity 16 (threshold 15). 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 · CustomerContactsBackfill.SurveyAsync (cognitive 16) · ×1
  • CustomerContactsBackfill.SurveyAsync (cognitive 16) src/Kennel.Core/AccessGrants/Application/CustomerContactsBackfill.cs:53 — CustomerContactsBackfill.SurveyAsync has cognitive complexity 16 (threshold 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 · PlanDocument.Discounts (cognitive 16) · ×1
  • PlanDocument.Discounts (cognitive 16) src/Kennel.Core/Billing/Pages/Plan/PlanDocument.cs:188 — PlanDocument.Discounts has cognitive complexity 16 (threshold 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 · CompliancePromptAcksBackfill.SurveyAsync (cognitive 16) · ×1
  • CompliancePromptAcksBackfill.SurveyAsync (cognitive 16) src/Kennel.Core/Compliance/Application/CompliancePromptAcksBackfill.cs:30 — CompliancePromptAcksBackfill.SurveyAsync has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · RunReadingsBackfill.SurveyAsync (cognitive 16) · ×1
  • RunReadingsBackfill.SurveyAsync (cognitive 16) src/Kennel.Core/Metrics/ReadModels/RunReadingsBackfill.cs:34 — RunReadingsBackfill.SurveyAsync has cognitive complexity 16 (threshold 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 · ProductRepositoriesProjection.HoldAsync (cognitive 16) · ×1
  • ProductRepositoriesProjection.HoldAsync (cognitive 16) src/Kennel.Core/Portfolios/Pages/ProductRepositories/ProductRepositoriesProjection.cs:327 — ProductRepositoriesProjection.HoldAsync has cognitive complexity 16 (threshold 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 · CommunityTagsBackfill.SurveyAsync (cognitive 16) · ×1
  • CommunityTagsBackfill.SurveyAsync (cognitive 16) src/Kennel.Watchdog.Core/Gallery/Application/CommunityTagsBackfill.cs:37 — CommunityTagsBackfill.SurveyAsync has cognitive complexity 16 (threshold 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 · Telling.Tells (cognitive 16) · ×1
  • Telling.Tells (cognitive 16) src/Kennel.Watchdog.Core/Reporting/Persistence/ChangelogEntryStore.cs:683 — Telling.Tells has cognitive complexity 16 (threshold 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 · VerificationReminderRulesBackfill.SurveyAsync (cognitive 16) · ×1
  • VerificationReminderRulesBackfill.SurveyAsync (cognitive 16) src/Kennel.Admin.Core/Admin/Services/AdminOpsBackfills.cs:197 — VerificationReminderRulesBackfill.SurveyAsync has cognitive complexity 16 (threshold 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 · GalleryCorpusDevSeeder.SeedAsync (cognitive 16) · ×1
  • GalleryCorpusDevSeeder.SeedAsync (cognitive 16) src/Kennel.Admin.Core/Admin/Services/GalleryCorpusDevSeeder.cs:75 — GalleryCorpusDevSeeder.SeedAsync has cognitive complexity 16 (threshold 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 · Main.emitUnparsedFragments (cognitive 16) · ×1
  • Main.emitUnparsedFragments (cognitive 16) engine/sidecars/java-spoon/src/main/java/dev/canine/codehealth/java/Main.java:452 — Main.emitUnparsedFragments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), error handling 2 (5 pts), loops 3 (4 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 · draw_h1.clone (cognitive 16) · ×1
  • draw_h1.clone (cognitive 16) docs/plans/deterministic-engine/draw_h1.py:69 — draw_h1.clone has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · merge_md_table.merge (cognitive 16) · ×1
  • merge_md_table.merge (cognitive 16) tools/improve/merge_md_table.py:81 — merge_md_table.merge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · guard_quarantine.cmd_retire (cognitive 16) · ×1
  • guard_quarantine.cmd_retire (cognitive 16) tools/train/guard_quarantine.py:178 — guard_quarantine.cmd_retire has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 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 · art.dog (cognitive 16) · ×1
  • art.dog (cognitive 16) docs/marketing/infomercial/explainer/art.js:31 — art.dog has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 13 (16 pts) (nesting depth added 3). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function items inside it that branch (arm, arm::tube). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · main.main (cognitive 16) · ×1
  • main.main (cognitive 16) engine/sidecars/tsjs-frontend/main.mjs:141 — main.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 5, boolean chains 3, error handling 1, loops 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 240, withProgramOnly, emitBodyFor, …). 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 · confinedHost (cognitive 16) · ×1
  • confinedHost (cognitive 16) engine/sidecars/tsjs-frontend/main.mjs:37 — confinedHost has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (5 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (2 pts), other 2 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 6 function items inside it that branch (a function literal at line 45, readFile, fileExists, …). 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium CVE · ×1
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: NoiseSplit.cs ↔ AdvisoryCatalog.cs src/Kennel.Core/LanguageTraining/Services/NoiseSplit.cs:1 — `src/Kennel.Core/LanguageTraining/Services/NoiseSplit.cs` and `src/Kennel.Core/Repositories/Advisory/AdvisoryCatalog.cs` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `6b68b05c` fix(advisory): the four Runtime Evidence cards are declared advisory …; `22e2210b` fix(dm9): declare the dimension everywhere it has to be declared; `7e0bee07` fix(X32): adding a dimension is a TWO-repository change, and 9c5dcfa1… — run `git show` on any of them.
D4 · Code Duplication · Near-duplicate member family (4 members, 31 shared lines) · ×1
  • Near-duplicate member family (4 members, 31 shared lines) engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs:27 — engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs:27-81 | engine/src/Scanner/Compliance/C3/AuditTrailDimension.cs:27-86 | engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs:27-91 | engine/src/Scanner/Compliance/C5/DataSubjectRightsDimension.cs:27-99 — These 4 members are variants of one another: a block of 31 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 24 shared lines) · ×1
  • Near-duplicate member family (4 members, 24 shared lines) engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:27 — engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:27-77 | engine/src/Scanner/Compliance/C3/AuditTrailDimension.cs:27-86 | engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs:27-91 | engine/src/Scanner/Compliance/C5/DataSubjectRightsDimension.cs:27-99 — These 4 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 10 shared lines) · ×1
  • Near-duplicate member family (4 members, 10 shared lines) tools/multilang/agg_combined3.py:122 — tools/multilang/agg_combined3.py:122-141 | tools/multilang/agg_combined4.py:144-162 | tools/multilang/agg_combined5.py:150-168 | tools/multilang/agg_combined6.py:161-179 — These 4 members are variants of one another: a block of 10 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) tools/multilang/agg_holdout5.py:188 — tools/multilang/agg_holdout5.py:188-204 | tools/multilang/agg_holdout6.py:246-265 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) engine/src/CodeHealth.Reporting/Security/SecurityWatchRenderer.cs:129 — engine/src/CodeHealth.Reporting/Security/SecurityWatchRenderer.cs:129-154 | engine/src/CodeHealth.Reporting/Security/SecurityWatchRenderer.cs:161-180 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (15 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (15 members, 50+ identical tokens) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:24 — engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:24-90 | engine/src/Scanner/Defects/X13/UndrainedStreamAnalyzer.cs:24-74 | engine/src/Scanner/Defects/X16/ShrinkLoopAnalyzer.cs:24-84 | engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:24-88 | engine/src/Scanner/Defects/X19/ScopedGlobalMutationAnalyzer.cs:24-84 | engine/src/Scanner/Defects/X20/ArgumentGuardAnalyzer.cs:24-82 | engine/src/Scanner/Defects/X21/SideEffectingGuardAnalyzer.cs:24-93 | engine/src/Scanner/Defects/X22/ContradictedHandoffAnalyzer.cs:24-97 | engine/src/Scanner/Defects/X23/DiagnosticMaterialisationAnalyzer.cs:25-90 | engine/src/Scanner/Defects/X25/InertKnobAnalyzer.cs:24-90 | engine/src/Scanner/Defects/X26/UnsynchronisedHandoffAnalyzer.cs:24-101 | engine/src/Scanner/Defects/X28/UncoveredIndexGuardAnalyzer.cs:25-89 | engine/src/Scanner/Defects/X29/FixedElementGuardAnalyzer.cs:24-75 | engine/src/Scanner/Defects/X30/InvertedSupportGuardAnalyzer.cs:24-81 | engine/src/Scanner/Defects/X32/SimpleNameResolutionAnalyzer.cs:20-90 — These 15 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 15 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 15 times.
D4 · Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (12 members, 50+ identical tokens) engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:1928 — engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:1928-1982 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:1997-2037 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2056-2099 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2119-2162 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2186-2231 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2260-2310 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2317-2400 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2425-2495 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2548-2607 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2628-2697 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2704-2773 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2935-3006 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1442 — engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1442-1485 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1764-1820 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2085-2130 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2162-2213 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2237-2295 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2335-2384 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2576-2629 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2633-2665 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2670-2701 — These 9 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 9 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 9 times.
D4 · Code Duplication · Duplicated block (41–53 lines × 2) · ×1
  • Duplicated block (41–53 lines × 2) engine/src/CodeHealth.History/RunSidecar.cs:101 — engine/src/CodeHealth.History/RunSidecar.cs:101-141 | engine/src/CodeHealth.Reporting/RunReport.cs:75-127 — 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. 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 (24–39 lines × 2) · ×1
  • Duplicated block (24–39 lines × 2) engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:415 — engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:415-438 | engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:596-634 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16–35 lines × 15) · ×1
  • Duplicated block (16–35 lines × 15) engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:42 — engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:42-57 | engine/src/Scanner/Defects/X13/UndrainedStreamAnalyzer.cs:40-55 | engine/src/Scanner/Defects/X16/ShrinkLoopAnalyzer.cs:41-59 | engine/src/Scanner/Defects/X18/DisposalDutyAnalyzer.cs:40-57 | engine/src/Scanner/Defects/X19/ScopedGlobalMutationAnalyzer.cs:41-59 | engine/src/Scanner/Defects/X20/ArgumentGuardAnalyzer.cs:42-61 | engine/src/Scanner/Defects/X21/SideEffectingGuardAnalyzer.cs:55-76 | engine/src/Scanner/Defects/X22/ContradictedHandoffAnalyzer.cs:58-78 | engine/src/Scanner/Defects/X23/DiagnosticMaterialisationAnalyzer.cs:37-57 | engine/src/Scanner/Defects/X25/InertKnobAnalyzer.cs:40-57 | engine/src/Scanner/Defects/X26/UnsynchronisedHandoffAnalyzer.cs:57-75 | engine/src/Scanner/Defects/X28/UncoveredIndexGuardAnalyzer.cs:42-62 | engine/src/Scanner/Defects/X29/FixedElementGuardAnalyzer.cs:36-57 | engine/src/Scanner/Defects/X30/InvertedSupportGuardAnalyzer.cs:42-63 | engine/src/Scanner/Defects/X32/SimpleNameResolutionAnalyzer.cs:38-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 15 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 15 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/DeadBranchAnalyzer.cs:42` 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 (34–35 lines × 2) · ×1
  • Duplicated block (34–35 lines × 2) engine/src/Scanner/Security/Shared/Scanners/DeepScan.cs:360 — engine/src/Scanner/Security/Shared/Scanners/DeepScan.cs:360-394 | engine/src/Scanner/Security/Shared/Scanners/DeepScan.cs:445-478 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `null` to `IReadOnlyList<(ScanRun Run, int FindingCount)>? passes =` in one and `IReadOnlyList<ScanFinding>? scoredSubset =` 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 (31–35 lines × 2) · ×1
  • Duplicated block (31–35 lines × 2) engine/src/Core/Dependencies/NpmLockfileReader.cs:36 — engine/src/Core/Dependencies/NpmLockfileReader.cs:36-70 | engine/src/Core/Dependencies/NpmLockfileReader.cs:127-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. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Dependencies/NpmLockfileReader.cs:36` 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 (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) engine/src/Core/Docs/CurrentStateDocuments.cs:92 — engine/src/Core/Docs/CurrentStateDocuments.cs:92-124 | engine/src/Scanner/Maturity/M4/DocAccuracyAnalyzer.cs:485-517 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (31 lines × 3) · ×1
  • Duplicated block (31 lines × 3) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:776 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:776-806 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Rust.cs:918-948 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Scala.cs:646-676 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Elixir.cs:776` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) engine/src/Scanner/Security/D31/Scanners/ComposeServiceSurface.cs:350 — engine/src/Scanner/Security/D31/Scanners/ComposeServiceSurface.cs:350-373 | engine/src/Scanner/Security/Shared/Scanners/ComposeRuntimeSocketMountScan.cs:223-246 | engine/src/Scanner/Security/Shared/Scanners/WranglerPlaintextVarScan.cs:423-446 — 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 `engine/src/Scanner/Security/D31/Scanners/ComposeServiceSurface.cs:350` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28–30 lines × 2) · ×1
  • Duplicated block (28–30 lines × 2) engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:711 — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:711-740 | engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs:799-826 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) engine/src/Scanner/ModelAware/DM3/IntegrationEventCouplingAnalyzer.cs:32 — engine/src/Scanner/ModelAware/DM3/IntegrationEventCouplingAnalyzer.cs:32-60 | engine/src/Scanner/ModelAware/DM7/RepositoryGranularityAnalyzer.cs:32-60 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (20–30 lines × 2) · ×1
  • Duplicated block (20–30 lines × 2) engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:109 — engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:109-128 | engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:743-772 — 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 `engine/src/Scanner/ModelAware/DM5/EncapsulatedStateAnalyzer.cs:109` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15–29 lines × 5) · ×1
  • Duplicated block (15–29 lines × 5) engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:363 — engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:363-391 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:456-481 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:511-526 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:559-578 | engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:612-626 — 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 `engine/src/Scanner/ModelAware/DM6/DomainInfraBoundaryAnalyzer.cs:363` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `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. 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 (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Python.cs:280 — engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.Python.cs:280-306 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Python.cs:956-982 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `t` to `int[] Depth) Structure(IReadOnlyList<JsToken>` in one and `int[] Depth) PyStructure(IReadOnlyList<JsToken>` 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 (26–28 lines × 2) · ×1
  • Duplicated block (26–28 lines × 2) engine/src/Scanner/ModelAware/ES2/ImmutableEventsAnalyzer.cs:73 — engine/src/Scanner/ModelAware/ES2/ImmutableEventsAnalyzer.cs:73-100 | engine/src/Scanner/ModelAware/ES2/ImmutableEventsAnalyzer.cs:305-330 — 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 `engine/src/Scanner/ModelAware/ES2/ImmutableEventsAnalyzer.cs:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `types` to `IReadOnlyList<INamedTypeSymbol>` in one and `IReadOnlyList<Nm.ICodeType>` 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 (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2317 — engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2317-2342 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2425-2449 — 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 `engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2317` 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 (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:148 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Dart.cs:148-172 | engine/src/Scanner/Defects/X14/ForeignAddressClassifierScan.Dart.cs:148-172 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (19–25 lines × 5) · ×1
  • Duplicated block (19–25 lines × 5) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2093 — engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2093-2111 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2170-2191 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2252-2273 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2343-2362 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2584-2608 — 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 `engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2093` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (24–25 lines × 3) · ×1
  • Duplicated block (24–25 lines × 3) engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:38 — engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:38-62 | engine/src/Scanner/ModelAware/ED2/EventCommandShapeAnalyzer.cs:38-61 | engine/src/Scanner/ModelAware/ED4/OutboxDualWriteAnalyzer.cs:40-63 — 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 `engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:38` 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 (11–25 lines × 2) · ×1
  • Duplicated block (11–25 lines × 2) engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:369 — engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:369-379 | engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:478-502 — 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 `engine/src/Scanner/ModelAware/DM2/StronglyTypedIdsAnalyzer.cs:369` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (16–24 lines × 2) · ×1
  • Duplicated block (16–24 lines × 2) engine/src/Scanner/Complexity/D1/CyclomaticComplexityAnalyzer.cs:64 — engine/src/Scanner/Complexity/D1/CyclomaticComplexityAnalyzer.cs:64-79 | engine/src/Scanner/Complexity/D2/CognitiveComplexityAnalyzer.cs:32-55 — 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.
D4 · Code Duplication · Duplicated block (18–23 lines × 4) · ×1
  • Duplicated block (18–23 lines × 4) engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:29 — engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:29-47 | engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs:29-51 | engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs:29-46 | engine/src/Scanner/Compliance/C5/DataSubjectRightsDimension.cs:29-49 — before extracting anything, compare `engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs` and `engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:29` 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–23 lines × 2) · ×1
  • Duplicated block (19–23 lines × 2) engine/src/CodeHealth.Cli.Edition/EditionComposition.cs:111 — engine/src/CodeHealth.Cli.Edition/EditionComposition.cs:111-129 | engine/src/CodeHealth.Cli/Composition/DimensionsRegistration.cs:61-83 — 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.
D4 · Code Duplication · Duplicated block (17–23 lines × 2) · ×1
  • Duplicated block (17–23 lines × 2) engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2818 — engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2818-2834 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2878-2900 — 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 `engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2818` 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 (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) engine/src/Scanner/Security/D29/Scanners/RecursiveOwnershipRootRecheck.cs:83 — engine/src/Scanner/Security/D29/Scanners/RecursiveOwnershipRootRecheck.cs:83-104 | engine/src/Scanner/Security/D29/Scanners/ShellCommandPrefixRecheck.cs:94-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/D29/Scanners/RecursiveOwnershipRootRecheck.cs:83` 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 (22 lines × 7) · ×1
  • Duplicated block (22 lines × 7) engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:1943 — engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:1943-1964 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2344-2369 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2451-2477 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2572-2597 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2655-2681 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2731-2757 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2954-2981 — 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 `engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:1943` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–22 lines × 3) · ×1
  • Duplicated block (15–22 lines × 3) engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:439 — engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:439-453 | engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:470-484 | engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:501-522 — 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 `engine/src/Scanner/ModelAware/ED1/HandlerTemporalCouplingAnalyzer.cs:439` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs:66 — engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs:66-81 | engine/src/Scanner/Compliance/C3/AuditTrailDimension.cs:71-86 | engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs:76-91 | engine/src/Scanner/Compliance/C5/DataSubjectRightsDimension.cs:84-99 — before extracting anything, compare `engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs` and `engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–21 lines × 2) · ×1
  • Duplicated block (13–21 lines × 2) engine/src/Scanner/Complexity/D1/CyclomaticComplexityAnalyzer.cs:25 — engine/src/Scanner/Complexity/D1/CyclomaticComplexityAnalyzer.cs:25-37 | engine/src/Scanner/Complexity/D2/CognitiveComplexityAnalyzer.cs:24-44 — 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 `engine/src/Scanner/Complexity/D1/CyclomaticComplexityAnalyzer.cs:25` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/Scanner/Complexity/D1/CyclomaticComplexityAnalyzer.cs:37` calls `ComputeAsync`, `ConfigureAwait`, `WithSupplementaryModelsAsync` and `engine/src/Scanner/Complexity/D2/CognitiveComplexityAnalyzer.cs:44` 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 (16–21 lines × 2) · ×1
  • Duplicated block (16–21 lines × 2) engine/src/Core/Architecture/WorkspacePackages.cs:100 — engine/src/Core/Architecture/WorkspacePackages.cs:100-120 | engine/src/Scanner/Security/Shared/Scanners/VendoredManifestScope.cs:347-362 — 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 `engine/src/Core/Architecture/WorkspacePackages.cs:100` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 12) · ×1
  • Duplicated block (20 lines × 12) engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:1943 — engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:1943-1964 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2006-2025 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2067-2087 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2130-2150 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2199-2219 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2274-2298 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2344-2369 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2451-2477 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2572-2597 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2655-2681 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2731-2757 | engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:2954-2981 — all 12 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 `engine/src/Scanner/Dependencies/D12/DependencyHygieneAnalyzer.cs:1943` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–20 lines × 5) · ×1
  • Duplicated block (15–20 lines × 5) engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:27 — engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:27-42 | engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs:27-46 | engine/src/Scanner/Compliance/C3/AuditTrailDimension.cs:27-41 | engine/src/Scanner/Compliance/C4/DataRetentionDimension.cs:27-41 | engine/src/Scanner/Compliance/C5/DataSubjectRightsDimension.cs:27-44 — before extracting anything, compare `engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs` and `engine/src/Scanner/Compliance/C2/AccessControlsDimension.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Compliance/C1/DataProtectionDimension.cs:27` 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 (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) engine/src/Core/ModelAware/DomainConventions.cs:295 — engine/src/Core/ModelAware/DomainConventions.cs:295-313 | engine/src/Core/ModelAware/DomainConventions.cs:2343-2359 — 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 first that the copies are not typed on the same thing: the declarations holding them bind `type` to `INamedTypeSymbol` in one and `Nm.ICodeType` 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 (16–18 lines × 5) · ×1
  • Duplicated block (16–18 lines × 5) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Dart.cs:111 — engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Dart.cs:111-126 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Java.cs:502-517 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.JavaScript.cs:154-171 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Ruby.cs:122-137 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Scala.cs:118-133 — 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 all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.Dart.cs:111` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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 × 4) · ×1
  • Duplicated block (17 lines × 4) engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:116 — engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:116-132 | engine/src/Scanner/Security/D31/Scanners/GitOwnershipCheckDisabledScan.cs:87-103 | engine/src/Scanner/Security/D31/Scanners/SetuidBinaryGrantScan.cs:63-79 | engine/src/Scanner/Security/D31/Scanners/WorldWritableOwnedPathScan.cs:96-112 — 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 all 4 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (14–18 lines × 2) · ×1
  • Duplicated block (14–18 lines × 2) engine/src/CodeHealth.History/RunSidecar.cs:93 — engine/src/CodeHealth.History/RunSidecar.cs:93-106 | engine/src/CodeHealth.Reporting/RunReport.cs:238-255 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:2893 — engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:2893-2910 | engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs:2084-2099 — 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 `engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:2893` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 before the matched lines, `engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:2890` calls `ContainsAwaitWord` and `engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs:2082` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs:238 — engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Dart.cs:238-249 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.FSharp.cs:104-115 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Go.cs:213-224 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.Scala.cs:197-208 | engine/src/Scanner/ArchitectureModel/AX1/InHouseContainers.cs:743-754 — 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 all 5 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `code` to `string` in one and `bool Narrower) GoLifetimes(string` 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 (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) engine/src/Scanner/Accessibility/AC1/TextAlternativesAnalyzer.cs:24 — engine/src/Scanner/Accessibility/AC1/TextAlternativesAnalyzer.cs:24-37 | engine/src/Scanner/Accessibility/AC2/FormsAndLabelsAnalyzer.cs:24-37 | engine/src/Scanner/Accessibility/AC4/KeyboardSemanticsAnalyzer.cs:24-37 | engine/src/Scanner/Accessibility/AC5/AriaCorrectnessAnalyzer.cs:24-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Accessibility/AC1/TextAlternativesAnalyzer.cs:24` 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 (16–17 lines × 3) · ×1
  • Duplicated block (16–17 lines × 3) engine/src/Scanner/Defects/X21/SideEffectingGuardAnalyzer.cs:24 — engine/src/Scanner/Defects/X21/SideEffectingGuardAnalyzer.cs:24-39 | engine/src/Scanner/Defects/X22/ContradictedHandoffAnalyzer.cs:24-40 | engine/src/Scanner/Defects/X26/UnsynchronisedHandoffAnalyzer.cs:24-39 — 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 `engine/src/Scanner/Defects/X21/SideEffectingGuardAnalyzer.cs:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `null` to `ForeignGuardFacts? foreign =` in one and `ForeignHandoffFacts? foreign =` 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 (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:7089 — engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:7089-7104 | engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:7190-7206 — 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 `engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:7089` 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 (15 lines × 8) · ×1
  • Duplicated block (15 lines × 8) engine/src/Core/Api/CargoLibraryTarget.cs:879 — engine/src/Core/Api/CargoLibraryTarget.cs:879-893 | engine/src/Core/Api/CargoLibraryTarget.cs:1112-1126 | engine/src/Scanner/Accessibility/AC6/CssRules.cs:367-381 | engine/src/Scanner/CodeShape/D4/CodeShape/DuplicationAnalyzer.cs:4147-4161 | engine/src/Scanner/Defects/X7/RazorBranchModel.cs:367-381 | engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:4339-4353 | engine/src/Scanner/Security/Shared/Scanners/SemgrepUnsafeAdvice.cs:287-301 | engine/src/Scanner/Security/Shared/Scanners/SqlBuilderCompositionWalk.cs:346-360 — there are 8 copies across 7 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 8 sites; resolving a subset leaves the remainder to drift apart. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×1
  • Duplicated block (15 lines × 4) engine/src/Core/Markup/BuilderDslMarkupProducer.cs:883 — engine/src/Core/Markup/BuilderDslMarkupProducer.cs:883-897 | engine/src/Scanner/CodeShape/D4/CodeShape/DuplicationAnalyzer.cs:2648-2662 | engine/src/Scanner/Readiness/P7/ForeignHttpResilienceScan.cs:563-577 | engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:1733-1747 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (13–16 lines × 3) · ×1
  • Duplicated block (13–16 lines × 3) engine/src/Core/Dependencies/PubspecManifest.cs:99 — engine/src/Core/Dependencies/PubspecManifest.cs:99-111 | engine/src/Core/Dependencies/PubspecManifest.cs:421-436 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.DartServer.cs:165-177 — 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. 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–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.cs:121 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.cs:121-136 | engine/src/Scanner/Defects/X27/ForeignSelfMutatingLoopScan.cs:123-136 — 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 `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.cs:121` 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 (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Java.cs:58 — engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Java.cs:58-70 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Js.cs:114-126 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:172-184 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:221-233 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Ruby.cs:259-271 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.cs:2918-2930 — there are 6 copies across 5 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 6 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (13–15 lines × 4) · ×1
  • Duplicated block (13–15 lines × 4) engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs:169 — engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs:169-181 | engine/src/Scanner/ModelAware/ED5/MutationIdempotencyAnalyzer.cs:752-764 | engine/src/Scanner/ModelAware/ModelAware.Prework/DomainModelScan.cs:190-204 | engine/src/Scanner/ModelAware/ModelAware.Prework/EventDrivenScan.cs:148-160 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/ArchitectureModel/AX9/CqsAnalyzer.cs:169` 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 (14–15 lines × 3) · ×1
  • Duplicated block (14–15 lines × 3) engine/src/CodeHealth.Toolchain/MsBuild/CentralPackageManagement.cs:89 — engine/src/CodeHealth.Toolchain/MsBuild/CentralPackageManagement.cs:89-102 | engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:433-447 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.RazorScript.cs:280-294 — 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 `engine/src/CodeHealth.Toolchain/MsBuild/CentralPackageManagement.cs:89` 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 (13–15 lines × 3) · ×1
  • Duplicated block (13–15 lines × 3) engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2074 — engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2074-2086 | engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2400-2414 | engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2547-2559 — 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 `engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2074` 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 (9–15 lines × 2) · ×1
  • Duplicated block (9–15 lines × 2) engine/src/Scanner/GitMining/GitMining.Shared/GitMiningSourceFiles.cs:183 — engine/src/Scanner/GitMining/GitMining.Shared/GitMiningSourceFiles.cs:183-197 | engine/src/Scanner/GitMining/GitMining.Shared/GitMiningSourceFiles.cs:1135-1143 — 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 `engine/src/Scanner/GitMining/GitMining.Shared/GitMiningSourceFiles.cs:183` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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 (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) engine/src/Scanner/Docs/D24/DocRestatement.cs:67 — engine/src/Scanner/Docs/D24/DocRestatement.cs:67-81 | engine/src/Scanner/Docs/D24/VbDocRestatement.cs:43-56 — 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. 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 (12–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) engine/src/Scanner/Security/Shared/DependencyVulnerabilityUnion.cs:192 — engine/src/Scanner/Security/Shared/DependencyVulnerabilityUnion.cs:192-206 | engine/src/Scanner/Security/Shared/DependencyVulnerabilityUnion.cs:317-328 — 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 `engine/src/Scanner/Security/Shared/DependencyVulnerabilityUnion.cs:192` 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 (8–15 lines × 2) · ×1
  • Duplicated block (8–15 lines × 2) engine/src/Core/Dependencies/MavenManifestHygiene.cs:279 — engine/src/Core/Dependencies/MavenManifestHygiene.cs:279-293 | engine/src/Core/Dependencies/MavenManifestHygiene.cs:396-403 — 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 `engine/src/Core/Dependencies/MavenManifestHygiene.cs:279` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12 lines × 7) · ×1
  • Duplicated block (12 lines × 7) engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Dart.cs:43 — engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Dart.cs:43-54 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Java.cs:58-69 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Js.cs:114-125 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:172-183 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Python.cs:221-232 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Ruby.cs:259-270 | engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.cs:2918-2929 — there are 7 copies across 6 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X28/ForeignUncoveredIndexGuardScan.Dart.cs:43` 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 (13–14 lines × 4) · ×1
  • Duplicated block (13–14 lines × 4) engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:434 — engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:434-447 | engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.RazorScript.cs:282-294 | engine/src/Scanner/Security/D29/Scanners/EngineRuleWalk.cs:49-61 | engine/src/Scanner/Security/Shared/Scanners/CheckoutWalk.cs:47-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:434` 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 after the matched lines, `engine/src/Scanner/Security/Shared/Scanners/CheckoutWalk.cs:63` calls `Sort` and `engine/src/Scanner/Security/D29/Scanners/EngineRuleWalk.cs:65` 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–14 lines × 3) · ×1
  • Duplicated block (11–14 lines × 3) engine/src/Scanner/Defects/Defects.Prework/DataShapeScan.cs:102 — engine/src/Scanner/Defects/Defects.Prework/DataShapeScan.cs:102-115 | engine/src/Scanner/Defects/X10/StringContractSmellAnalyzer.cs:117-127 | engine/src/Scanner/Defects/X9/CoherenceSmellAnalyzer.cs:109-119 — 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 `engine/src/Scanner/Defects/Defects.Prework/DataShapeScan.cs:102` 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 (3–14 lines × 4) · ×1
  • Duplicated block (3–14 lines × 4) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:324 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:324-337 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Python.cs:140-142 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Ruby.cs:271-273 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.cs:276-289 — 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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:324` 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 lines × 7) · ×1
  • Duplicated block (11 lines × 7) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:101 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:101-111 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Go.cs:123-133 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:133-143 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:83-93 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Php.cs:137-147 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs:266-276 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Rust.cs:169-179 — 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 all 7 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Go.cs:135` calls `GoByteOrderNames` and `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:113` 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 (8–12 lines × 2) · ×1
  • Duplicated block (8–12 lines × 2) engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.cs:66 — engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.cs:66-77 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.cs:154-161 — 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 `engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.cs:66` 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 (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) engine/src/Core/Dependencies/MixManifestHygiene.cs:672 — engine/src/Core/Dependencies/MixManifestHygiene.cs:672-681 | engine/src/Scanner/Security/Shared/Scanners/OsvScannerIgnores.cs:444-455 — 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 `engine/src/Core/Dependencies/MixManifestHygiene.cs:672` 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 (8–11 lines × 5) · ×1
  • Duplicated block (8–11 lines × 5) engine/src/Scanner/Defects/X10/StringContractSmellAnalyzer.cs:97 — engine/src/Scanner/Defects/X10/StringContractSmellAnalyzer.cs:97-107 | engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:376-383 | engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:413-420 | engine/src/Scanner/Defects/X24/UntrustedMarkupScan.CSharp.cs:68-75 | engine/src/Scanner/Defects/X9/CoherenceSmellAnalyzer.cs:89-99 — there are 5 copies across 4 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X10/StringContractSmellAnalyzer.cs:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) engine/src/Scanner/Defects/X6/ForeignHandRolledParsingScan.cs:177 — engine/src/Scanner/Defects/X6/ForeignHandRolledParsingScan.cs:177-187 | engine/src/Scanner/Readiness/P7/ForeignHttpResilienceScan.cs:287-296 — 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 `engine/src/Scanner/Defects/X6/ForeignHandRolledParsingScan.cs:177` 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 (8 lines × 5) · ×1
  • Duplicated block (8 lines × 5) engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs:340 — engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs:340-347 | engine/src/Scanner/Security/D31/Scanners/MutableGitCloneScan.cs:144-151 | engine/src/Scanner/Security/Shared/Scanners/UnverifiedRemoteInstallerScan.cs:887-894 | engine/src/Scanner/Security/Shared/Scanners/UnverifiedRemoteInstallerScan.cs:1343-1350 | engine/src/Scanner/Security/Shared/Scanners/UnverifiedRemoteInstallerScan.cs:1388-1395 — there are 5 copies across 3 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs:340` 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 `statements` to `string? Ref) StagePin( IReadOnlyList<DockerfileSyntax.Statement>` in one and `IReadOnlyList<DockerfileSyntax.Statement>` 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 (8–10 lines × 4) · ×1
  • Duplicated block (8–10 lines × 4) engine/src/Core/Dependencies/CratesIoClient.cs:186 — engine/src/Core/Dependencies/CratesIoClient.cs:186-195 | engine/src/Core/Dependencies/HexRegistryClient.cs:128-137 | engine/src/Core/Dependencies/OsvAdvisoryClient.cs:145-152 | engine/src/Core/Dependencies/UnityRegistryClient.cs:128-135 — 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 all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:325 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:325-334 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Python.cs:131-139 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.cs:277-286 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:325` 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 (6–9 lines × 8) · ×1
  • Duplicated block (6–9 lines × 8) engine/src/Core/ModelAware/RepoProfiler.cs:204 — engine/src/Core/ModelAware/RepoProfiler.cs:204-209 | engine/src/Scanner/Defects/X10/StringContractSmellAnalyzer.cs:96-104 | engine/src/Scanner/Defects/X24/BuildlessFrameworkCompilation.cs:45-50 | engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:374-380 | engine/src/Scanner/Defects/X24/MarkupTaintPass.cs:412-417 | engine/src/Scanner/Defects/X8/JsInteropContractAnalyzer.cs:102-107 | engine/src/Scanner/Defects/X9/CoherenceSmellAnalyzer.cs:88-96 | engine/src/Scanner/Readiness/Readiness.Prework/OperabilityScan.cs:59-64 — there are 8 copies across 7 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 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/ModelAware/RepoProfiler.cs:204` 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 (8 lines × 8) · ×1
  • Duplicated block (8 lines × 8) engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:102 — engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:102-109 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Go.cs:124-131 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Java.cs:134-141 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Kotlin.cs:84-91 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Php.cs:138-145 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Python.cs:267-274 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Rust.cs:170-177 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Scala.cs:87-94 — 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 all 8 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:102` 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 after the matched lines, `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Go.cs:135` calls `GoByteOrderNames` and `engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.Dart.cs:113` 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 (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:90 — engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:90-96 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.cs:262-270 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.Java.cs:90` 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 (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:809 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:809-817 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.cs:1036-1043 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–8 lines × 4) · ×1
  • Duplicated block (7–8 lines × 4) engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:325 — engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:325-332 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Python.cs:131-137 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Ruby.cs:259-265 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.cs:277-284 — 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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.Kotlin.cs:325` 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 (3–8 lines × 4) · ×1
  • Duplicated block (3–8 lines × 4) engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:642 — engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:642-645 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Ruby.cs:587-594 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Ruby.cs:686-693 | engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Scala.cs:963-965 — there are 4 copies across 3 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X26/ForeignUnsynchronisedHandoffScan.Kotlin.cs:642` 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 (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:337 — engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:337-343 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.cs:655-662 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (5 lines × 9) · ×1
  • Duplicated block (5 lines × 9) engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1481 — engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1481-1485 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1816-1820 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2126-2130 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2209-2213 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2291-2295 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2380-2384 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2625-2629 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2661-2665 | engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:2697-2701 — all 9 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 `engine/src/Scanner/Security/D14/LicenseComplianceAnalyzer.cs:1481` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `licences` to `GoLicenseReport` in one and `PubLicenseReport` 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 (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.cs:84 — engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.cs:84-89 | engine/src/Scanner/Defects/X12/ForeignDeadBranchScan.cs:96-101 | engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.cs:158-163 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:147-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Scanner/Defects/X1/ForeignAsyncCorrectnessScan.cs: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.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×1
  • Duplicated block (6–7 lines × 3) engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:597 — engine/src/Scanner/Defects/X16/ForeignShrinkLoopScan.cs:597-602 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Dart.cs:337-342 | engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.cs:655-661 — 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. 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) engine/src/Scanner/ModelAware/ES3/PiiInEventStoreAnalyzer.cs:135 — engine/src/Scanner/ModelAware/ES3/PiiInEventStoreAnalyzer.cs:135-140 | engine/src/Scanner/ModelAware/ModelAware.Prework/EventSourcingScan.cs:248-254 — 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 `engine/src/Scanner/ModelAware/ES3/PiiInEventStoreAnalyzer.cs:135` 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–7 lines × 2) · ×1
  • Duplicated block (5–7 lines × 2) engine/src/Core/Dependencies/CargoManifestHygiene.cs:54 — engine/src/Core/Dependencies/CargoManifestHygiene.cs:54-60 | engine/src/Scanner/Security/Shared/Scanners/CargoLockGraph.cs:50-54 — 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. 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 (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) engine/src/Core/Architecture/Topology/Extractors/ArmExtractor.cs:140 — engine/src/Core/Architecture/Topology/Extractors/ArmExtractor.cs:140-151 | engine/src/Core/Architecture/Topology/Extractors/CloudFormationExtractor.cs:149-160 | engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:219-230 | engine/src/Scanner/SecurityPosture/D41/SyscallConfinementAnalyzer.cs:337-348 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Core/Architecture/Topology/Extractors/ArmExtractor.cs:135` calls `Has`, `Any`, `Contains` and `engine/src/Core/Architecture/Topology/Extractors/CloudFormationExtractor.cs:144` 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 (7 lines × 22) · ×1
  • Duplicated block (7 lines × 22) engine/src/Core/Api/PyprojectDistribution.cs:414 — engine/src/Core/Api/PyprojectDistribution.cs:414-423 | engine/src/Core/Dependencies/CargoManifestHygiene.Direct.cs:384-399 | engine/src/Core/ExplicitDebt/UnloadedSourceReferenceScanner.cs:93-108 | engine/src/Core/Markup/MarkupBlindnessCensus.cs:280-295 | engine/src/Core/Security/DotnetProjectLicensesCollector.cs:290-296 | engine/src/Scanner/Accessibility/Accessibility.Prework/RepoStylesheets.cs:69-84 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.RubyServer.cs:372-378 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.Scala.cs:161-167 | engine/src/Scanner/Defects/X10/StringContractSmellAnalyzer.cs:523-538 | engine/src/Scanner/Defects/X21/ForeignSideEffectingGuardScan.cs:205-211 | engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:200-206 | engine/src/Scanner/Defects/X7/PendingWithoutFailureRule.cs:514-529 | engine/src/Scanner/Defects/X9/CoherenceSmellAnalyzer.cs:520-535 | engine/src/Scanner/Incompleteness/Incompleteness.Shared/ScriptFunctions.cs:1244-1250 | engine/src/Scanner/ModelAware/PF2/NeutralAllocationAwareness.cs:111-126 | engine/src/Scanner/Readiness/P2/ForeignObservability.cs:254-263 | engine/src/Scanner/Readiness/P3/SecurityAndPerfToolingAnalyzer.cs:958-967 | engine/src/Scanner/Readiness/P3/SecurityAndPerfToolingAnalyzer.cs:1208-1214 | engine/src/Scanner/Readiness/P4/DeploymentRollbackAnalyzer.cs:945-960 | engine/src/Scanner/Readiness/P5/DisasterRecoveryAnalyzer.cs:185-200 | engine/src/Scanner/Readiness/P7/ForeignHttpResilienceScan.cs:314-320 | engine/src/Scanner/Readiness/P7/ForeignHttpResilienceScan.cs:1531-1537 — there are 22 copies across 20 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 22 sites; resolving a subset leaves the remainder to drift apart. 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, `engine/src/Scanner/Defects/X10/StringContractSmellAnalyzer.cs:540` calls `IsPlainJs`, `GetExtension`, `ToLowerInvariant` and `engine/src/Scanner/Defects/X9/CoherenceSmellAnalyzer.cs:537` 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 × 12) · ×1
  • Duplicated block (11 lines × 12) engine/src/Core/CodeShape/PolyglotConditionScanner.cs:563 — engine/src/Core/CodeShape/PolyglotConditionScanner.cs:563-574 | engine/src/Core/CodeShape/RazorCodeVirtualizer.cs:332-343 | engine/src/Scanner/Accessibility/AC6/CssRules.cs:384-395 | engine/src/Scanner/Accessibility/AC6/VisualAndMotionAnalyzer.cs:538-549 | engine/src/Scanner/ArchitectureModel/AX1/RiverpodProviders.cs:392-403 | engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:5766-5776 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.KotlinDataProtection.cs:212-223 | engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.RustDataProtection.cs:223-234 | engine/src/Scanner/Defects/X4/ForeignStructuredLoggingScan.Dart.cs:142-153 | engine/src/Scanner/Defects/X6/ForeignHandRolledParsingScan.cs:678-689 | engine/src/Scanner/Defects/X7/RazorBranchModel.cs:118-129 | engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:1008-1019 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 12 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 12 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 10) · ×1
  • Duplicated block (11 lines × 10) engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ElixirServer.cs:172 — engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ElixirServer.cs:172-182 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ElixirServerControls.cs:330-340 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.RustServerControls.cs:477-487 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ScalaServer.cs:233-243 | engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ScalaServerControls.cs:491-501 | engine/src/Scanner/Defects/X20/ForeignArgumentGuardScan.FSharp.cs:339-349 | engine/src/Scanner/Defects/X3/ForeignExceptionHandlingScan.cs:410-420 | engine/src/Scanner/Defects/X5/ForeignNullableTypingScan.Java.cs:207-217 | engine/src/Scanner/ModelAware/PF3/NeutralSyncOverAsync.FSharp.cs:171-181 | engine/src/Scanner/Readiness/P7/ForeignHttpResilienceScan.cs:1446-1456 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 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 10 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10 lines × 8) · ×1
  • Duplicated block (10 lines × 8) engine/src/Core/ExplicitDebt/RazorMarkupReferenceScanner.cs:307 — engine/src/Core/ExplicitDebt/RazorMarkupReferenceScanner.cs:307-316 | engine/src/Core/ExplicitDebt/XamlMarkupReferenceScanner.cs:234-243 | engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:6127-6136 | engine/src/Scanner/Readiness/P12/CiTestCommands.cs:571-580 | engine/src/Scanner/Readiness/P12/CiTestGatePipeline.cs:149-158 | engine/src/Scanner/Readiness/P12/CiTestGateSites.cs:636-645 | engine/src/Scanner/Readiness/P12/DotNetTestInventory.cs:349-358 | engine/src/Scanner/Readiness/P12/JsInventory.cs:230-239 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 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 8 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) engine/src/Core/Api/SetuptoolsDistribution.cs:317 — engine/src/Core/Api/SetuptoolsDistribution.cs:317-326 | engine/src/Core/Security/DotnetProjectLicensesCollector.cs:394-403 | engine/src/Scanner/Accessibility/AC4/ModalDialogFocus.cs:298-313 | engine/src/Scanner/ModelAware/PF3/NeutralSyncOverAsync.cs:224-230 | engine/src/Scanner/Readiness/P3/SecurityAndPerfToolingAnalyzer.cs:1545-1554 | engine/src/Scanner/Security/Shared/Scanners/DeclaredDependencies.cs:620-626 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. 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 × 14) · ×1
  • Duplicated block (10 lines × 14) engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:99 — engine/src/Scanner/Security/D31/Scanners/BrowserSandboxDisabledScan.cs:99-108 | engine/src/Scanner/Security/D31/Scanners/BuildTimeKeyMaterialScan.cs:131-140 | engine/src/Scanner/Security/D31/Scanners/EndOfLifeBaseImageScan.cs:164-173 | engine/src/Scanner/Security/D31/Scanners/GitOwnershipCheckDisabledScan.cs:70-79 | engine/src/Scanner/Security/D31/Scanners/InsecureTransportFetchScan.cs:118-127 | engine/src/Scanner/Security/D31/Scanners/MutableBaseImageScan.cs:85-94 | engine/src/Scanner/Security/D31/Scanners/MutableGitCloneScan.cs:75-84 | engine/src/Scanner/Security/D31/Scanners/NoOpToolShimScan.cs:92-101 | engine/src/Scanner/Security/D31/Scanners/PythonInstallGuardDisabledScan.cs:83-92 | engine/src/Scanner/Security/D31/Scanners/SetuidBinaryGrantScan.cs:46-55 | engine/src/Scanner/Security/D31/Scanners/UnpinnedToolchainInstallScan.cs:196-205 | engine/src/Scanner/Security/D31/Scanners/UnverifiedTrustAnchorScan.cs:115-124 | engine/src/Scanner/Security/D31/Scanners/WorldWritableOwnedPathScan.cs:79-88 | engine/src/Scanner/Security/Shared/Scanners/UnverifiedRemoteInstallerScan.cs:506-515 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 14 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 14 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (44–48 lines × 2) · ×1
  • Duplicated block (44–48 lines × 2) engine/src/Core/Languages/CSharp/CSharpCloneTokenizer.cs:96 — engine/src/Core/Languages/CSharp/CSharpCloneTokenizer.cs:96-143 | engine/src/Core/Languages/Vb/Clones/VbCloneTokenizer.cs:110-153 — 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 `engine/src/Core/Languages/CSharp/CSharpCloneTokenizer.cs:96` 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 (27–29 lines × 2) · ×1
  • Duplicated block (27–29 lines × 2) engine/src/Core/Roslyn/CodeModel/RoslynMethodBody.cs:286 — engine/src/Core/Roslyn/CodeModel/RoslynMethodBody.cs:286-312 | engine/src/Core/Roslyn/CodeModel/RoslynVbMethodBody.cs:196-224 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/Core/Roslyn/CodeModel/RoslynMethodBody.cs:286` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (24–27 lines × 2) · ×1
  • Duplicated block (24–27 lines × 2) engine/src/Core/Roslyn/CodeModel/RoslynProvider.cs:303 — engine/src/Core/Roslyn/CodeModel/RoslynProvider.cs:303-326 | engine/src/Core/SourceCensus/RoslynTypeWalk.cs:25-51 — 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 `engine/src/Core/Roslyn/CodeModel/RoslynProvider.cs:303` 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 (24–29 lines × 2) · ×1
  • Duplicated block (24–29 lines × 2) tools/train/judge_verification.py:143 — tools/train/judge_verification.py:143-166 | tools/train/rehearse_verification.py:132-160 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (2–13 lines × 5) · ×1
  • Duplicated block (2–13 lines × 5) tools/multilang/agg_combined.py:118 — tools/multilang/agg_combined.py:118-119 | tools/multilang/agg_combined3.py:101-104 | tools/multilang/agg_combined4.py:112-124 | tools/multilang/agg_combined5.py:118-130 | tools/multilang/agg_combined6.py:129-141 — before extracting anything, compare `tools/multilang/agg_combined.py` and `tools/multilang/agg_combined3.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 8) · ×1
  • Duplicated block (6 lines × 8) tools/multilang/agg_combined.py:50 — tools/multilang/agg_combined.py:50-55 | tools/multilang/agg_combined3.py:61-66 | tools/multilang/agg_combined4.py:72-77 | tools/multilang/agg_combined5.py:77-82 | tools/multilang/agg_combined6.py:87-92 | tools/multilang/agg_holdout4.py:32-37 | tools/multilang/agg_holdout5.py:46-51 | tools/multilang/agg_holdout6.py:52-57 — before extracting anything, compare `tools/multilang/agg_combined.py` and `tools/multilang/agg_combined3.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (3–5 lines × 5) · ×1
  • Duplicated block (3–5 lines × 5) tools/train/dimension-routing.py:141 — tools/train/dimension-routing.py:141-143 | tools/train/judge-calibration.py:590-593 | tools/train/run-arms.py:34-38 | tools/train/seeded_draw.py:29-31 | tools/train/sidecarlib.py:163-167 — 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 all 5 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) engine/sidecars/rust-frontend/src/collect.rs:68 — engine/sidecars/rust-frontend/src/collect.rs:68-75 | engine/sidecars/rust-frontend/src/collect.rs:86-92 | engine/sidecars/rust-frontend/src/collect.rs:98-105 — 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 · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:534 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:534-669 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:1240-1402 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2760-2915 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2932-3077 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3092-3247 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3261-3408 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3423-3571 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3601-3776 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3798-3974 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:4003-4182 — These 10 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 10 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 10 times.
D4 · Code Duplication · Duplicated block (3–43 lines × 11) · ×1
  • Duplicated block (3–43 lines × 11) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2877 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2877-2914 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3035-3075 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3205-3246 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3369-3407 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3528-3570 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3709-3737 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3773-3776 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3917-3947 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3971-3973 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:4127-4156 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:4179-4181 — all 11 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 `engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2877` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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–29 lines × 8) · ×1
  • Duplicated block (11–29 lines × 8) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2863 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2863-2873 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3009-3031 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3173-3201 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3345-3365 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3505-3524 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3683-3705 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3891-3913 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:4106-4123 — all 8 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 `engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3891` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2863` calls `UnmeasuredAsync` and `engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3173` does not — after which the two agree again for 5 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 (25–27 lines × 8) · ×1
  • Duplicated block (25–27 lines × 8) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2813 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2813-2839 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2985-3009 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3147-3173 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3319-3345 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3479-3505 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3659-3683 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3853-3877 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:4056-4081 — all 8 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 `engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2813` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15–21 lines × 9) · ×1
  • Duplicated block (15–21 lines × 9) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:1332 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:1332-1352 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2864-2881 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3021-3039 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3192-3209 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3356-3373 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3515-3532 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3693-3713 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3904-3921 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:4117-4131 — all 9 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 `engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:1332` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3287 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3287-3306 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3449-3466 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3627-3644 — 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 `engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3287` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×1
  • Duplicated block (16 lines × 5) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2787 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2787-2802 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2958-2973 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3118-3134 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3823-3840 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:4028-4044 — 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 `engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2787` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8–14 lines × 10) · ×1
  • Duplicated block (8–14 lines × 10) engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:585 — engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:585-598 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:1332-1345 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:2864-2874 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3021-3032 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3192-3202 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3356-3366 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3515-3525 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3693-3706 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:3904-3914 | engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:4117-4124 — all 10 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 `engine/src/Scanner/Testing/D11/TestReliabilityAnalyzer.cs:1332` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) engine/sidecars/python-frontend/selftest/check_compound_annotations_are_copied.py:106 — engine/sidecars/python-frontend/selftest/check_compound_annotations_are_copied.py:106-114 | engine/sidecars/python-frontend/selftest/check_field_annotation_resolves.py:79-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D5 · Coupling · Unstable project CodeHealth.Scanner.Complexity.Shared · ×1
  • Unstable project CodeHealth.Scanner.Complexity.Shared engine/src/Scanner/Complexity/Complexity.Shared/CodeHealth.Scanner.Complexity.Shared.csproj:1 — CodeHealth.Scanner.Complexity.Shared has instability 0.82 with 2 dependents.
D5 · Coupling · Unstable project CodeHealth.Core.Languages.Vb.CodeShape · ×1
  • Unstable project CodeHealth.Core.Languages.Vb.CodeShape engine/src/Core/Languages/Vb/CodeShape/CodeHealth.Core.Languages.Vb.CodeShape.csproj:1 — CodeHealth.Core.Languages.Vb.CodeShape has instability 0.83 with 1 dependents.
P12 · CI test-gate honesty · CI test gate excludes suites by filter · ×1
  • CI test gate excludes suites by filter .github/workflows/build.yml:932 — `dotnet test engine/tests/CodeHealth.Tests.Concepts/CodeHealth.Tests.Concepts.csproj -c Release -m:1 /p:UseSharedCompilation=false --filte…` filters with `Category=ConceptSuiteShape` — 6 test(s) it drops — run by no other gate before merge (categories ConceptSuite; e.g. ConceptSuiteTests.Variant_holds_on_the_engines_sarif, ScanEnvironmentTests.An_unconfigured_suite_scan_takes_the_bench_s_slots_and_caps). Run what it drops in another job before merge (a complementary filter), or remove the filter.
P12 · CI test-gate honesty · Test sources removed from compilation · ×1
  • Test sources removed from compilation engine/tests/CodeHealth.Tests.Concepts/suites/ci-test-gate-integrity/csharp/repo/tests/Beacon.UnitTests/Beacon.UnitTests.csproj:15 — `<Compile Remove="Charts/**" />` in a test project removes 1 file(s) that declare tests (`engine/tests/CodeHealth.Tests.Concepts/suites/ci-test-gate-integrity/csharp/repo/tests/Beacon.UnitTests/Charts/ChartFeeTests.cs`) — they are never built, so no gate runs them. Delete the tests or bring them back into the build.
P12 · CI test-gate honesty · Test project never run by CI · ×1
  • Test project never run by CI engine/tests/CodeHealth.Tests.Fixtures/CodeHealth.Tests.Fixtures.csproj:1 — `engine/tests/CodeHealth.Tests.Fixtures/CodeHealth.Tests.Fixtures.csproj` declares 1 test(s), but no CI command runs it — it is not in the solution the pipeline tests and no step names it, so its tests gate nothing. Add it to the solution (or a test step), or delete it.
R10 · Code Duplication · Duplicated block with local edits (48 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (48 matched lines × 2 locations) tools/localdev/ui/credential-health-smoke.mjs:13 — tools/localdev/ui/credential-health-smoke.mjs:13 · tools/localdev/ui/forge-parity-smoke.mjs:16 — the two spans are one implementation copied and then locally edited — 423 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 (10 lines × 2 locations) · ×1
  • Duplicated block (10 lines × 2 locations) tools/localdev/ui/a11y-gate.mjs:275 — tools/localdev/ui/a11y-gate.mjs:275 · tools/localdev/ui/timing-gate.mjs:139 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×1
  • Duplicated block (8 lines × 2 locations) engine/sidecars/tsjs-frontend/idempotency-facts.mjs:65 — engine/sidecars/tsjs-frontend/idempotency-facts.mjs:65 · engine/sidecars/tsjs-frontend/idempotency-facts.mjs:97 — 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 (7 lines × 2 locations) · ×1
  • Duplicated block (7 lines × 2 locations) tools/localdev/ui/band-classes-smoke.mjs:159 — tools/localdev/ui/band-classes-smoke.mjs:159 · tools/localdev/ui/login-theme-smoke.mjs:40 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (7 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (7 matched lines × 2 locations) tools/localdev/ui/capture-public.mjs:18 — tools/localdev/ui/capture-public.mjs:18 · tools/localdev/ui/preprod-login.mjs:13 — the two spans are one implementation copied and then locally edited — 52 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 (6 lines × 2 locations) · ×1
  • Duplicated block (6 lines × 2 locations) tools/localdev/ui/a11y-gate.mjs:58 — tools/localdev/ui/a11y-gate.mjs:58 · tools/localdev/ui/timing-gate.mjs:69 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (5 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (5 matched lines × 2 locations) engine/sidecars/tsjs-frontend/source-set.mjs:172 — engine/sidecars/tsjs-frontend/source-set.mjs:172 · engine/sidecars/tsjs-frontend/source-set.mjs:191 — the two spans are one implementation copied and then locally edited — 55 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 (5 lines × 2 locations) · ×1
  • Duplicated block (5 lines × 2 locations) tools/localdev/ui/a11y-gate.mjs:230 — tools/localdev/ui/a11y-gate.mjs:230 · tools/localdev/ui/timing-gate.mjs:106 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R11 · Import Boundaries · Boundary violation [package · ×1
  • Boundary violation [package:relative-cross-package] tools/localdev/ui/lib/cli.mjs:40 — tools/localdev/ui/lib/cli.mjs:40 reaches into another package with a relative path (../../../../engine/docker/analyzer/render/is-program.mjs) — import the package by name instead.
R2 · Cyclomatic Complexity · Complex function moduleOfExpression (cyclomatic 19, cognitive 19) · ×1
  • Complex function moduleOfExpression (cyclomatic 19, cognitive 19) engine/sidecars/tsjs-frontend/idempotency-facts.mjs:52 — moduleOfExpression has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 presenceTested (cyclomatic 19, cognitive 17) · ×1
  • Complex function presenceTested (cyclomatic 19, cognitive 17) engine/sidecars/tsjs-frontend/idempotency-facts.mjs:189 — presenceTested has cyclomatic complexity 19 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function recommend (cyclomatic 16, cognitive 16) · ×1
  • Complex function recommend (cyclomatic 16, cognitive 16) engine/tests/CodeHealth.Tests.Concepts/suites/knowledge-freshness/typescript/history/src/apiary/hive-inspection.v1.ts:25 — recommend has cyclomatic complexity 16 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.
R2 · Cyclomatic Complexity · Complex function handlerExcerptOf (cyclomatic 13, cognitive 10) · ×1
  • Complex function handlerExcerptOf (cyclomatic 13, cognitive 10) engine/sidecars/tsjs-frontend/idempotency-facts.mjs:216 — handlerExcerptOf has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function moduleOfDeclaration (cyclomatic 12, cognitive 9) · ×1
  • Complex function moduleOfDeclaration (cyclomatic 12, cognitive 9) engine/sidecars/tsjs-frontend/idempotency-facts.mjs:76 — moduleOfDeclaration has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
X1 · Async correctness · Sync-over-async (deadlock risk) through `Task.WaitAll` · ×1
  • Sync-over-async (deadlock risk) through `Task.WaitAll` engine/src/CodeHealth.Cli/ToolVersionProbe.cs:65 — `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead.
X1 · Async correctness · Blocking `File.WriteAllText` inside an `async` method · ×1
  • Blocking `File.WriteAllText` inside an `async` method engine/src/Scanner/BuildDependent/D39/ProductBuildEntry.cs:67 — `File.WriteAllText` blocks the thread on I/O while `File.WriteAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
X1 · Async correctness · Blocking `StreamReader.ReadLine` inside an `async` method · ×1
  • Blocking `StreamReader.ReadLine` inside an `async` method engine/src/Scanner/Security/D28/Scanners/PrivateKeyBlobHistoryScan.cs:481 — `StreamReader.ReadLine` blocks the thread on I/O while `StreamReader.ReadLineAsync` exists to wait without one — inside a method that is already `async`, await the twin.
X1 · Async correctness · Blocking `StreamWriter.Write` inside an `async` method · ×1
  • Blocking `StreamWriter.Write` inside an `async` method engine/src/Scanner/Security/D28/SecretsHistoryAnalyzer.cs:2421 — `StreamWriter.Write` blocks the thread on I/O while `StreamWriter.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
X1 · Async correctness · Blocking `StreamWriter.WriteLine` inside an `async` method · ×1
  • Blocking `StreamWriter.WriteLine` inside an `async` method engine/tools/narration-budget-eval/Program.cs:140 — `StreamWriter.WriteLine` blocks the thread on I/O while `StreamWriter.WriteLineAsync` exists to wait without one — inside a method that is already `async`, await the twin.
X1 · Async correctness · Blocking `ItemRun.Baseline` inside an `async` method · ×1
  • Blocking `ItemRun.Baseline` inside an `async` method tools/qwen-poc/ItemRun.cs:117 — `ItemRun.Baseline` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
X1 · Async correctness · Blocking `ItemRun.Conclude` inside an `async` method · ×1
  • Blocking `ItemRun.Conclude` inside an `async` method tools/qwen-poc/ItemRun.cs:131 — `ItemRun.Conclude` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
X1 · Async correctness · Blocking `ItemRun.MeasureReproduction` inside an `async` method · ×1
  • Blocking `ItemRun.MeasureReproduction` inside an `async` method tools/qwen-poc/ItemRun.cs:372 — `ItemRun.MeasureReproduction` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
X1 · Async correctness · Blocking `ItemRun.BuildAndMeasure` inside an `async` method · ×1
  • Blocking `ItemRun.BuildAndMeasure` inside an `async` method tools/qwen-poc/ItemRun.cs:1205 — `ItemRun.BuildAndMeasure` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
X1 · Async correctness · Blocking `ItemRun.RegressionCheck` inside an `async` method · ×1
  • Blocking `ItemRun.RegressionCheck` inside an `async` method tools/qwen-poc/ItemRun.cs:1206 — `ItemRun.RegressionCheck` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
X1 · Async correctness · Blocking `Repo.Reap` inside an `async` method · ×1
  • Blocking `Repo.Reap` inside an `async` method tools/qwen-poc/Program.cs:258 — `Repo.Reap` is a synchronous helper that blocks (`Thread.Sleep`): called from an `async` method it parks the thread exactly as the inline call would. Make the helper `async` and `await` it (`await Task.Delay`, `SemaphoreSlim.WaitAsync`, a `TaskCompletionSource` instead of the poll).
Minor — 344 finding(s)
D24 · Comment Value · redundant comment · ×47
  • redundant comment engine/src/CodeHealth.Llm.Abstractions/Validation/LlmFindingIntegrity.cs:627 — "An inline markdown link: `[text](href)`." repeats the code it sits on: 4 of its 5 words (markdown, link, text, href) are already in `[GeneratedRegex(@"\[(?<text>[^\]\n]{0,200})\]\((?<href>[^)\s]{1,300})")]`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/CodeHealth.Reporting/Changelog/VersionBoundaryDetector.cs:123 — "HEAD (newest commit); "" when history is empty." repeats the code it sits on: 4 of its 5 words (head, commit, history, empty) are already in `private static string Head(GitHistory history) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Core/Architecture/Topology/Extractors/SystemdUnitExtractor.cs:494 — "A cluster of boolean short flags: -d, -it, -dit, -P, -q." repeats the code it sits on: 4 of its 5 words (cluster, boolean, short, dit) are already in `[GeneratedRegex(@"^-[ditPq]+$", RegexOptions.CultureInvariant)]`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Core/CodeShape/LineBasedGodClassDetector.cs:457 — "Per-method own-field touch sets." repeats the code it sits on: 4 of its 4 words (method, field, touch, sets) are already in `var touched = methods.Select(m => OwnFieldsTouched(m, ownFields)).ToList();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Core/Frontend/FrontendManifestParsing.cs:438 — "exports: string => { "." : value }." repeats the code it sits on: 3 of its 3 words (exports, string, value) are already in `if (exports.ValueKind == JsonValueKind.String)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Core/Frontend/JsStringConstants.cs:220 — "Every prefix with every value, capped at MaxValuesPerName." repeats the code it sits on: 5 of its 6 words (prefix, value, max, values, name) are already in `accumulated = [.. accumulated.SelectMany(prefix => values.Select(value => prefix + value)).Take(MaxValuesPerName)];`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Core/Frontend/ModuleSyntaxScanner.cs:1224 — "module.exports.NAME = …" repeats the code it sits on: 3 of its 3 words (module, exports, name) are already in `if (k + 1 < tokens.Count && tokens[k].IsPunct(".") && IsBindingName(tokens[k + 1]))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Core/Languages/Go/Domain/GoDomainConventions.cs:807 — "An own-member assignment to one of the struct's event-slice fields (`o.events = append(o.events, …)`)." repeats the code it sits on: 7 of its 8 words (member, assignment, event, slice, fields, events, append) are already in `private static bool AppendsToEventSlice(Nm.IMethodBody body, HashSet<string> eventSliceFields) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Core/Languages/Go/Domain/GoDomainConventions.cs:3043 — "The `<Other>` of an `<Other>ID`/`<Other>Id` field name; null for a bare own id (`ID`) or any other name." repeats the code it sits on: 4 of its 5 words (id, field, name, null) are already in `private static string? ReferencedConceptName(string fieldName) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Core/Languages/Python/Domain/PythonDomainConventions.cs:433 — "An identity on the type or any base: an `id`/`*_id` field or property, or one typed as a `*Id`." repeats the code it sits on: 6 of its 7 words (identity, type, base, id, field, property) are already in `private static bool HasIdentityInChain(Nm.ICodeType type)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Core/Languages/Python/Security/PythonPackageReachability.cs:54 — "`import a.b`, `import a.b as c, d` — every module of the statement." repeats the code it sits on: 3 of its 3 words (import, module, statement) are already in `private static readonly Regex ImportStatement =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Scanner/Compliance/Compliance.Prework/ForeignAccessControlScan.cs:225 — "A name that is itself a gate: a Next.js auth middleware named in middleware.ts, or a policy engine invoked." repeats the code it sits on: 10 of its 11 words (name, gate, next, js, auth, middleware, named, policy, engine, invoked) are already in `private void ReadNamedGate(JsToken tok, string name, bool invoked)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.ElixirDataProtection.cs:275 — "A cipher that encrypts: Cloak's vault and ciphers, Plug.Crypto's message encryptor, Erlang's :crypto block and AEAD calls, Kcl/Salty libsodium boxes, Fernet, Ex …" repeats the code it sits on: 16 of its 19 words (cipher, encrypts, cloak, vault, ciphers, plug, crypto, message, encryptor, block, aead, kcl, salty, boxes, fernet, ex) are already in `[GeneratedRegex(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.NodeTransport.cs:69 — "http.createServer" repeats the code it sits on: 3 of its 3 words (http, create, server) are already in `public readonly Dictionary<string, NodeServerKind> HttpNamespaces = new(StringComparer.Ordinal); // http.createServer`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Ruby.cs:405 — "`private def name`" repeats the code it sits on: 3 of its 3 words (private, def, name) are already in `if (defAt > 0 && t[defAt - 1].IsName && t[defAt - 1].Text is "private" or "protected")`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/src/Scanner/ModelAware/PF3/NeutralSyncOverAsync.FSharp.cs:113 — "The blocking calls in one block, and the offset of the first of them." repeats the code it sits on: 4 of its 5 words (blocking, calls, block, first) are already in `private static (List<string> Calls, int First) FSharpBlockingCalls(string block)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/tests/CodeHealth.Tests.Unit/Changelog/SlottedNarrationTests.cs:917 — "An entry's (commit, file) pairs: its files that each of its commits actually touched, frozen commits aside." repeats the code it sits on: 8 of its 10 words (entry, commit, file, pairs, files, commits, touched, frozen) are already in `private static HashSet<(string Sha, string File)> Pairs(IEnumerable<ChangeEntry> entries, ChangelogWindow window)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/tests/CodeHealth.Tests.Unit/Classification/ConcatenatedGeneratorBundleTests.cs:135 — "GUARD: a missing file fails closed." repeats the code it sits on: 4 of its 5 words (missing, file, fails, closed) are already in `[Fact]`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/tests/CodeHealth.Tests.Unit/Cli/DomainModelCompositionTests.cs:16 — "── The domain model is the sidecar models alone ONLY when Roslyn loaded nothing ──" repeats the code it sits on: 8 of its 9 words (domain, model, sidecar, models, alone, only, roslyn, loaded) are already in `[Fact]`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/tests/CodeHealth.Tests.Unit/CodeShape/GodClassJsTestPathTests.cs:105 — "scaladoc doc-resource" repeats the code it sits on: 3 of its 3 words (scaladoc, doc, resource) are already in `WriteOversizedJs(root, "src/scaladoc/scala/tools/nsc/doc/html/resource/lib/index.js"); // scaladoc doc-resource`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/tests/CodeHealth.Tests.Unit/Compliance/C4ScalaDataRetentionTests.cs:122 — "eikek/sharry, modules/backend/src/main/scala/sharry/backend/job/PeriodicCleanup.scala, reduced." repeats the code it sits on: 9 of its 11 words (sharry, modules, backend, src, main, scala, job, periodic, cleanup) are already in `File_("modules/backend/src/main/scala/sharry/backend/job/PeriodicCleanup.scala", """`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/tests/CodeHealth.Tests.Unit/Dimensions/Security/DockerfileLatestTagShapeTests.cs:34 — "── GUARD: a genuinely untagged REGISTRY base keeps the row ──" repeats the code it sits on: 6 of its 7 words (genuinely, untagged, registry, base, keeps, row) are already in `[Fact]`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/tests/CodeHealth.Tests.Unit/Dimensions/Security/SecretNoiseFilterRound7Tests.cs:234 — "base64 of a real-looking credential" repeats the code it sits on: 4 of its 5 words (base, 64, real, credential) are already in `const string b64 = "c3VwZXItc2VjcmV0LWRiLXBhc3N3b3JkLXZhbHVlLTk5"; // base64 of a real-looking credential`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/tests/CodeHealth.Tests.Unit/Dimensions/Security/SemgrepClaimRecheckAmbientDigestTests.cs:141 — "GUARD: an unreadable file fails closed." repeats the code it sits on: 4 of its 5 words (unreadable, file, fails, closed) are already in `[Fact]`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment engine/tests/CodeHealth.Tests.Unit/Dimensions/Security/SemgrepClaimRecheckRandomFilenameTests.cs:120 — "GUARD: an unreadable file fails closed." repeats the code it sits on: 4 of its 5 words (unreadable, file, fails, closed) are already in `[Fact]`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • + 22 more in this group — see findings.md.
DM2 · Strongly-typed ids · Primitive id on a domain type · ×40
  • Primitive id on a domain type: CustomerContactSaved.OwnerOrgId src/Kennel.Core/AccessGrants/Domain/Events/CustomerContactEvents.cs:25 — `CustomerContactSaved.OwnerOrgId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: CustomerContactSaved.ContactId src/Kennel.Core/AccessGrants/Domain/Events/CustomerContactEvents.cs:25 — `CustomerContactSaved.ContactId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: CustomerContactSaved.VatId src/Kennel.Core/AccessGrants/Domain/Events/CustomerContactEvents.cs:25 — `CustomerContactSaved.VatId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: IncomingGrantDecided.GranteeOrgId src/Kennel.Core/AccessGrants/Domain/Events/IncomingGrantFacts.cs:10 — `IncomingGrantDecided.GranteeOrgId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: IncomingGrantDecided.GrantId src/Kennel.Core/AccessGrants/Domain/Events/IncomingGrantFacts.cs:10 — `IncomingGrantDecided.GrantId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: PersonalChannelSaved.ChannelId src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:27 — `PersonalChannelSaved.ChannelId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: PersonalChannelRemoved.ChannelId src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:34 — `PersonalChannelRemoved.ChannelId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: PersonalNotificationRuleSaved.RuleId src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:40 — `PersonalNotificationRuleSaved.RuleId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: PersonalNotificationRuleSaved.ChannelId src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:40 — `PersonalNotificationRuleSaved.ChannelId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: PersonalNotificationRuleRemoved.RuleId src/Kennel.Core/Accounts/Domain/Events/UserEvents.cs:48 — `PersonalNotificationRuleRemoved.RuleId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: UserFeedbackSubmitted.FeedbackId src/Kennel.Core/Accounts/Domain/Events/UserFeedbackFacts.cs:13 — `UserFeedbackSubmitted.FeedbackId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: UserFeedbackResolved.FeedbackId src/Kennel.Core/Accounts/Domain/Events/UserFeedbackFacts.cs:17 — `UserFeedbackResolved.FeedbackId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayEntitlementBought.EntitlementId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:34 — `AssayEntitlementBought.EntitlementId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayChargeRecorded.ChargeLineId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:41 — `AssayChargeRecorded.ChargeLineId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayChargeRecorded.SourceId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:41 — `AssayChargeRecorded.SourceId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayBalanceSettled.StripeSessionId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:47 — `AssayBalanceSettled.StripeSessionId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayReportOrderAwaitingPayment.OrderId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:54 — `AssayReportOrderAwaitingPayment.OrderId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayReportOrderAwaitingPayment.ReportTypeKey src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:54 — `AssayReportOrderAwaitingPayment.ReportTypeKey` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayReportOrderAwaitingPayment.DeliveryId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:54 — `AssayReportOrderAwaitingPayment.DeliveryId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayReportOrderAwaitingPayment.ProductId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:54 — `AssayReportOrderAwaitingPayment.ProductId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayReportOrderPaid.OrderId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:58 — `AssayReportOrderPaid.OrderId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayReportOrderPaid.StripeSessionId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:58 — `AssayReportOrderPaid.StripeSessionId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayReportOrderBuilt.OrderId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:61 — `AssayReportOrderBuilt.OrderId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: AssayReportOrderBuilt.ReportId src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:61 — `AssayReportOrderBuilt.ReportId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • Primitive id on a domain type: SubscriptionCouponApplied.SubscriptionId src/Kennel.Core/Billing/Domain/Events/BillingPlanFacts.cs:13 — `SubscriptionCouponApplied.SubscriptionId` is a raw `Guid` — give it a strongly-typed id: a dedicated single-field type wrapping the `Guid`, in whatever form your language spells that.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×32
  • Silent fallback default in catch engine/src/CodeHealth.Core/Dimensions/FindingIntegrityGate.cs:175 — `LineCount` swallows `IOException` into `return -1;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/CodeHealth.Toolchain/Git/FileUniverse.cs:386 — `SubmoduleFiles` swallows `IOException` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/BuildDependent/D18/SolutionShape/DuplicateProjects.cs:87 — `CompilesSourcesOf` swallows `Exception` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/GitMining/D35/ChangeCouplingAnalyzer.cs:2940 — `FileExistsAtHead` swallows `Exception` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/GitMining/GitMining.Shared/GitMiningSourceFiles.cs:963 — `HasOwnTests` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/GitMining/GitMining.Shared/GitMiningSourceFiles.cs:1204 — `SafeLength` swallows `IOException` into `return 0;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:4146 — `IsPublishableCargoPackage` swallows `IOException` into `return true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:4377 — `FileOrDirExists` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:4456 — `RootMatch` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:5714 — `HasSbomFile` swallows `Exception` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Docs/D19/DocumentationTree.cs:190 — `IsLink` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Docs/D19/DocumentationTree.cs:204 — `SafeEnumerate` swallows `IOException` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Docs/D19/LicenceEvidence.cs:274 — `JsonHasString` swallows `JsonException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Docs/D19/LicenceEvidence.cs:288 — `ReadSafe` swallows `IOException` into `return "";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Maturity/M2/ArchitectureDocsAnalyzer.cs:311 — `ContainsDiagram` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Maturity/M2/ArchitectureDocsAnalyzer.cs:580 — `IsGraphvizDiagram` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:1323 — `HasCoLocatedGoTests` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:1665 — `HasNoTestSurface` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Maturity/M3/FolderStructureAnalyzer.cs:2567 — `TopLevelCodeDirCount` swallows `IOException` into `return 0;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Maturity/M4/DocInventory.cs:357 — `IsLink` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Maturity/Maturity.Prework/MaturityPrework.cs:32 — `ReadFile` swallows `IOException` into `return "";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.NodeTransport.cs:666 — `IsTlsProxyConfiguration` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.RubyServer.cs:118 — `ReadDirectory` swallows `IOException` and sets `gemspecs = [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:6117 — `SafeEnumerateRazorMarkup` swallows `Exception` into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:6131 — `SafeReadAllText` swallows `Exception` into `return "";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • + 7 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate engine/src/Scanner/Complexity/D1/CyclomaticComplexityAnalyzer.cs:75 — `!ComplexityScoring.IsNonAuthoredSidecarPath(m.FilePath, context.TargetPath, templateProjects) && !upstream.IsVendored(m.FilePath, context.Ta…` appears character-identically in 2 files — engine/src/Scanner/Complexity/D1/CyclomaticComplexityAnalyzer.cs, engine/src/Scanner/Complexity/D2/CognitiveComplexityAnalyzer.cs. 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 engine/src/Core/Languages/Swift/Domain/SwiftDomainConventions.cs:1152 — `!ConformsToEventContract(type) || type.UnionCases.Count < 3` appears character-identically in 2 files — engine/src/Core/Languages/Dart/Domain/DartDomainConventions.cs, engine/src/Core/Languages/Swift/Domain/SwiftDomainConventions.cs. 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 engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.PublishTrigger.cs:103 — `!Directory.Exists(root) || ciFiles.Count == 0` appears character-identically in 2 files — engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.PublishTrigger.cs, engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.ReleaseTrigger.cs. 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 engine/src/Core/Frontend/FrontendBundlerConfigRefs.cs:1422 — `!File.Exists(full) || FrontendWorkspaceWalk.ReadConfigText(full) is not { Length: > 0 } text` appears character-identically in 2 files — engine/src/Core/Frontend/FrontendBundlerConfigRefs.cs, engine/src/Core/Frontend/FrontendManifestEntryPoints.cs. 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 engine/src/Scanner/Security/Shared/Scanners/NpmLockGraph.cs:159 — `!File.Exists(lockPath) || new FileInfo(lockPath).Length > MaxLockBytes` appears character-identically in 2 files — engine/src/Core/Dependencies/CargoManifestHygiene.cs, engine/src/Scanner/Security/Shared/Scanners/NpmLockGraph.cs. 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 engine/src/Core/Dependencies/DeclaredRuntimeReader.cs:238 — `!File.Exists(path) || TryRead(path) is not { } text` appears character-identically in 2 files — engine/src/Core/Dependencies/DeclaredRuntimeReader.GoJvmRuby.cs, engine/src/Core/Dependencies/DeclaredRuntimeReader.cs. 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 engine/src/Core/Architecture/Topology/RepoTopologyScanner.cs:167 — `!File.Exists(path) || new FileInfo(path).Length > MaxFileBytes` appears character-identically in 2 files — engine/src/Core/Architecture/Topology/RepoTopologyScanner.cs, engine/src/Core/Readiness/VacuousFormatGate.cs. 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 engine/src/Core/Manifests/UniModulesModuleGraph.cs:241 — `!File.Exists(path) || new FileInfo(path).Length > MaxManifestBytes` appears character-identically in 2 files — engine/src/Core/Manifests/UniModulesModuleGraph.cs, engine/src/Core/Manifests/UnityModuleGraph.cs. 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 engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs:147 — `!Is(previous, "}") && !Is(previous, ";")` appears character-identically in 2 files — engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Kotlin.cs, engine/src/Scanner/Defects/X22/ForeignReleaseGuardScan.Scala.cs. 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 engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:5434 — `!IsInsideCheckout(full, rootFull) || !File.Exists(full)` appears character-identically in 2 files — engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.PackagingReach.cs, engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs. 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 engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.cs:1059 — `!IsMemberLevel(cls, p) || !_t[p].IsWord("constructor") || !At(p + 1, "(") || _match[p + 1] <= p + 1` appears character-identically in 2 files — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.cs, engine/src/Scanner/Defects/X25/ForeignInertKnobScan.cs. 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 engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs:96 — `!IsName(t[p]) || p + 2 >= t.Count || !t[p + 1].IsPunct("(") || shape.Match[p + 1] <= p` appears character-identically in 2 files — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Dart.cs, engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Python.cs. 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 engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs:121 — `!IsName(t[p]) || p < 1 || !IsDot(t[p - 1])` appears character-identically in 2 files — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Kotlin.cs, engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Scala.cs. 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 engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs:423 — `!IsName(t[p]) || p < 1 || !IsDot(t[p - 1]) || p + 1 >= t.Count || !t[p + 1].IsPunct("(") || shape.Match[p + 1] <= p` appears character-identically in 2 files — engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Java.cs, engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.cs. 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 engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.cs:149 — `!MinifiedJsHeuristics.LooksMinified(raw) && !MinifiedJsHeuristics.LooksBundled(raw)` appears character-identically in 5 files — engine/src/Scanner/Compliance/Compliance.Prework/ForeignComplianceScan.cs, engine/src/Scanner/Defects/X15/ForeignUntrustedLengthScan.cs, engine/src/Scanner/Defects/X2/ForeignCancellationScan.cs, engine/src/Scanner/Defects/X24/UntrustedMarkupScan.TypeScript.cs. 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 engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs:5382 — `!RepoPathScope.IsBuildOutputPath(f) && !RepoPathScope.IsVendoredTree(f)` appears character-identically in 4 files — engine/src/Core/ExplicitDebt/RoslynExplicitDebtCollector.cs, engine/src/Core/ExplicitDebt/YamlDisabledConfigScanner.cs, engine/src/Core/Languages/Dart/Readiness/DartAnalyzerExclusions.cs, engine/src/Core/Readiness/PublishedPackageLockfiles.cs. 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 engine/src/Core/ExplicitDebt/MarkupTaskCommentScanner.cs:145 — `!RepoPathScope.IsBuildOutputPath(path) && !RepoPathScope.IsVendoredTree(path) && !RepoPathScope.IsExcludedTree(path) && !generated.IsGenerat…` appears character-identically in 2 files — engine/src/Core/ExplicitDebt/MarkupTaskCommentScanner.cs, engine/src/Core/ExplicitDebt/SourceCommentTaskScanner.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Kennel.Watchdog.Core/Repositories/Pages/RepoFindings/RepoFindingsDocument.cs:216 — `!RunTriggers.Invisible.Contains(q.Trigger) && whose(q)` appears character-identically in 2 files — src/Kennel.Watchdog.Core/Repositories/Pages/RepoFindings/RepoFindingsDocument.cs, src/Kennel.Watchdog.Core/Repositories/Pages/RepoHub/RepoHubDocument.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Kennel.Watchdog.Core/Reporting/Pages/RepoChangelog/RepoChangelogDocument.cs:291 — `!RunTriggers.Invisible.Contains(r.Trigger) && ScanVisibility.VisibleTo(r.OwnerOrgId, viewerKey)` appears character-identically in 2 files — src/Kennel.Watchdog.Core/Reporting/Pages/RepoChangelog/RepoChangelogDocument.cs, src/Kennel.Watchdog.Core/Repositories/Pages/RepoProgress/RepoProgressDocument.cs. 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 engine/src/Core/Dependencies/CargoVersion.cs:47 — `!TryParse(candidate, out var a) || !TryParse(current, out var b)` appears character-identically in 4 files — engine/src/Core/Dependencies/CargoVersion.cs, engine/src/Core/Dependencies/ComposerVersion.cs, engine/src/Core/Dependencies/PubVersion.cs, engine/src/Core/Languages/Python/Dependencies/PythonVersion.cs. 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 engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs:499 — `!_declared.Contains(type) && _imports.Means(package, type)` appears character-identically in 2 files — engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Kotlin.cs, engine/src/Scanner/Defects/X18/ForeignDisposalDutyScan.Scala.cs. 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 engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs:747 — `!_t[k].IsWord("try") || k + 1 >= _t.Count || !_t[k + 1].IsPunct("{") || _match[k + 1] < 0` appears character-identically in 2 files — engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Java.cs, engine/src/Scanner/Defects/X19/ForeignScopedGlobalMutationScan.Php.cs. 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 engine/src/Core/Languages/CSharp/CSharpBranchExtractor.cs:315 — `!binary.IsKind(SyntaxKind.LogicalAndExpression) && !binary.IsKind(SyntaxKind.LogicalOrExpression)` appears character-identically in 2 files — engine/src/Core/ComplexityRoslyn/CognitiveComplexityCalculator.cs, engine/src/Core/Languages/CSharp/CSharpBranchExtractor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Kennel.Core/Scans/ReadModel/ReportLintVerdict.cs:42 — `!bundleFiles.TryGetValue(BundleFileName, out var json) || json.Length == 0` appears character-identically in 3 files — src/Kennel.Core/Scans/ReadModel/ReportLintVerdict.cs, src/Kennel.Core/Scans/ReadModel/RunLlmCallWriter.cs, src/Kennel.Core/Scans/ReadModel/RunResourceSampleWriter.cs. 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 engine/src/Core/Markup/ScriptMarkupBuffer.cs:171 — `!char.IsAsciiLetterOrDigit(c) && c != '-' && c != '_'` appears character-identically in 4 files — engine/src/Core/Markup/ScriptMarkupBuffer.cs, engine/src/Core/Markup/TemplMarkupProducer.cs, engine/src/Core/Markup/TemplateLanguageMarkupProducer.cs, engine/src/Core/Markup/TemplateMaskText.cs. 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.
IC1 · Incompleteness & stubs · Placeholder data left in code · ×24
  • Placeholder data left in code engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1021 — A placeholder value ("Over images with a STATIC non-empty alt …") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1039 — A placeholder value ("Over native <a href> with STATIC text an…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1045 — A placeholder value ("Over headings (h1–h6), <label>/<legend> …") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:143 — A placeholder value ("Markup scan (WCAG/EN-gated, C# first: Ra…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:146 — A placeholder value ("Markup scan (WCAG/EN-gated, C# first: Ra…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:147 — A placeholder value ("Markup scan (WCAG/EN-gated, C# first: Ra…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Dart.cs:39 — A placeholder value ("Unreviewed-generation residue in this re…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.FSharp.cs:30 — A placeholder value ("Unreviewed-generation residue in this re…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Scala.cs:38 — A placeholder value ("Unreviewed-generation residue in this re…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:46 — A placeholder value ("john doe") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:46 — A placeholder value ("jane doe") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:46 — A placeholder value ("john smith") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:46 — A placeholder value ("foo bar") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/Incompleteness/IC1/IncompletenessAnalyzer.cs:46 — A placeholder value ("lorem ipsum") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/LlmJudgedLanguage/LA2/AltTextQualityAnalyzer.cs:31 — A placeholder value ("Image alt text that is provably not a te…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/LlmJudgedLanguage/LA2/AltTextQualityAnalyzer.cs:151 — A placeholder value ("is lorem ipsum") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/LlmJudgedLanguage/LA5/LinkTextQualityAnalyzer.cs:33 — A placeholder value ("Links whose purpose cannot be determined…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:31 — A placeholder value ("Headings, labels and button names that a…") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:172 — A placeholder value ("is lorem ipsum") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupText.cs:275 — A placeholder value ("lorem ipsum") is still in shipped code — sample/mock data that was never replaced with the real thing.
  • Placeholder data left in code src/Kennel.Admin.Core/Admin/Services/PartnerDevSeeder.cs:44 — A placeholder e-mail address ("nok@siamsoftware.example") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration.
  • Placeholder data left in code src/Kennel.Assay.Core/Profiles/Ui/ProfilesDevDataSeeder.cs:106 — A placeholder e-mail address ("buyer@globex.example") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration.
  • Placeholder data left in code src/Kennel.Core/Accounts/Services/AccountsDevSeeder.cs:32 — A placeholder e-mail address ("mia@acme.test") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration.
  • Placeholder data left in code src/Kennel.Core/Billing/Services/BillingDevSeeder.cs:204 — A placeholder e-mail address ("nok@siamsoftware.example") is still in shipped code — its domain is reserved for documentation, so anything sent here is undeliverable by construction. Replace it with the real address, or take it from configuration.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×19
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/SecurityPosture/D36/SupplyChainProvenanceAnalyzer.cs:4768 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/Docs/D19/DocumentationShape.cs:981 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/Docs/D19/MarkupDocument.cs:1060 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/Compliance/S1/ForeignWebSecurityScan.ElixirServerControls.cs:43 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/Readiness/P12/CiTestGateSites.cs:623 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/Readiness/P12/DotNetTestInventory.cs:144 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/Readiness/P12/DotNetTestInventory.cs:511 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/Security/Shared/Scanners/RenovateRuleRecheck.cs:38 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/Security/Shared/Scanners/RenovateRuleRecheck.cs:41 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Core/ExplicitDebt/ApplicationScope.cs:143 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupRepositoryFacts.cs:235 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Core/Manifests/CsprojReferenceGraph.cs:226 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Core/Manifests/CsprojReferenceGraph.cs:302 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Core/Manifests/CsprojReferenceGraph.cs:457 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Core/Manifests/CsprojReferenceGraph.cs:539 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Core/Manifests/CsprojReferenceGraph.cs:544 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Core/Manifests/GoModuleGraph.cs:626 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Core/Manifests/MavenModuleGraph.cs:217 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
  • Hand-rolled JSON/XML parsing via regex engine/src/Scanner/Security/Shared.CSharp/EndpointAuthorizationScan.cs:676 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This project already references a real parser; use it here too.
GD1 · Unfinished & placeholder code · Placeholder literal left in code · ×17
  • Placeholder literal left in code engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1021 — A placeholder string ("Over images with a STATIC non-empty alt …") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1039 — A placeholder string ("Over native <a href> with STATIC text an…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/CodeHealth.Cli/Commands/ScoringSpecModel.cs:1045 — A placeholder string ("Over headings (h1–h6), <label>/<legend> …") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:143 — A placeholder string ("Markup scan (WCAG/EN-gated, C# first: Ra…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:146 — A placeholder string ("Markup scan (WCAG/EN-gated, C# first: Ra…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/CodeHealth.Reporting/Dimensions/DimensionMethods.cs:147 — A placeholder string ("Markup scan (WCAG/EN-gated, C# first: Ra…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Scanner/LlmJudgedLanguage/LA2/AltTextQualityAnalyzer.cs:31 — A placeholder string ("Image alt text that is provably not a te…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Scanner/LlmJudgedLanguage/LA2/AltTextQualityAnalyzer.cs:151 — A placeholder string ("is lorem ipsum") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Scanner/LlmJudgedLanguage/LA5/LinkTextQualityAnalyzer.cs:33 — A placeholder string ("Links whose purpose cannot be determined…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:31 — A placeholder string ("Headings, labels and button names that a…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Scanner/LlmJudgedLanguage/LA6/HeadingLabelQualityAnalyzer.cs:172 — A placeholder string ("is lorem ipsum") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Dart.cs:39 — A placeholder string ("Unreviewed-generation residue in this re…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.FSharp.cs:30 — A placeholder string ("Unreviewed-generation residue in this re…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Scanner/Incompleteness/GD1/GenerationDebtAnalyzer.Scala.cs:38 — A placeholder string ("Unreviewed-generation residue in this re…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Core/Security/NativeSecretScanner.cs:2335 — A placeholder string ("changeme") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:501 — A placeholder string ("changeme") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code engine/src/Scanner/LlmJudgedLanguage/LlmJudgedLanguage.Shared/MarkupText.cs:275 — A placeholder string ("lorem ipsum") is still in shipped code — typical of generated boilerplate that was never filled in.
D27 · Navigability · Pass-through layer · ×9
  • Pass-through layer engine/src/Core/Languages/Java/JavaDomainConventions.cs:752 — JavaConventions: all 7 public methods forward their arguments unchanged to JavaDomainConventions and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call JavaDomainConventions directly, or give the layer a job.
  • Pass-through layer engine/src/Core/Languages/Ts/TsDomainConventions.cs:332 — TsConventions: all 7 public methods forward their arguments unchanged to TsDomainConventions and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call TsDomainConventions directly, or give the layer a job.
  • Pass-through layer engine/src/Core/Languages/Erlang/Domain/ErlangDomainConventions.cs:591 — ErlangConventions: all 6 public methods forward their arguments unchanged to ErlangDomainConventions and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call ErlangDomainConventions directly, or give the layer a job.
  • Pass-through layer engine/src/Core/Languages/Go/Domain/GoDomainConventions.cs:3145 — GoConventions: all 9 public methods forward their arguments unchanged to GoDomainConventions and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call GoDomainConventions directly, or give the layer a job.
  • Pass-through layer engine/src/Core/Languages/Python/Domain/PythonDomainConventions.cs:821 — PythonConventions: all 5 public methods forward their arguments unchanged to PythonDomainConventions and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call PythonDomainConventions directly, or give the layer a job.
  • Pass-through layer engine/src/Core/Languages/Rust/Domain/RustDomainConventions.cs:1360 — RustConventions: all 9 public methods forward their arguments unchanged to RustDomainConventions and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call RustDomainConventions directly, or give the layer a job.
  • Pass-through layer engine/src/Core/Languages/Swift/Domain/SwiftDomainConventions.cs:1254 — SwiftConventions: all 9 public methods forward their arguments unchanged to SwiftDomainConventions and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call SwiftDomainConventions directly, or give the layer a job.
  • Pass-through layer engine/src/Core/Languages/FSharp/Domain/FSharpDomainConventions.cs:172 — FSharpConventions: all 5 public methods forward their arguments unchanged to FSharpDomainConventions and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call FSharpDomainConventions directly, or give the layer a job.
  • Pass-through layer engine/src/Core/Languages/Dart/Domain/DartDomainConventions.cs:1147 — DartConventions: all 9 public methods forward their arguments unchanged to DartDomainConventions and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call DartDomainConventions directly, or give the layer a job.
ED3 · Event naming · Event not named in past tense · ×8
  • Event not named in past tense: AssayReportOrderAwaitingPayment src/Kennel.Core/Billing/Domain/Events/AssayBillingFacts.cs:53 — `AssayReportOrderAwaitingPayment` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear.
  • Event not named in past tense: PartnerLoginBound src/Kennel.Core/Billing/Domain/Events/PartnerFacts.cs:37 — `PartnerLoginBound` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear.
  • Event not named in past tense: ConformanceDeclarationBegun src/Kennel.Core/Compliance/Domain/Events/ComplianceFacts.cs:22 — `ConformanceDeclarationBegun` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear.
  • Event not named in past tense: FindingShown src/Kennel.Watchdog.Core/Agents/Domain/Events/FindingEvents.cs:52 — `FindingShown` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear.
  • Event not named in past tense: CommunityTagVoteCast src/Kennel.Watchdog.Core/Gallery/Domain/Events/GalleryFacts.cs:15 — `CommunityTagVoteCast` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear.
  • Event not named in past tense: TeamRoleAdjustmentReset src/Kennel.Watchdog.Core/Teams/Domain/Events/TeamEvents.cs:61 — `TeamRoleAdjustmentReset` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear.
  • Event not named in past tense: EngagementBarBound src/Kennel.Assay.Core/Governance/Domain/Events/EngagementEvents.cs:50 — `EngagementBarBound` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear.
  • Event not named in past tense: StaffLoginBound src/Kennel.Admin.Core/Admin/Domain/Events/AdminOpsFacts.cs:51 — `StaffLoginBound` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear.
P2 · Observability · Console output used as the logging channel · ×8
  • Console output used as the logging channel engine/src/CodeHealth.Cli/CliExceptionHandler.cs:44 — `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 44 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel engine/src/CodeHealth.Cli/CliExceptionHandler.cs:52 — `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 52 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel engine/src/CodeHealth.Cli/CliExceptionHandler.cs:60 — `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 60 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel engine/src/CodeHealth.Cli/CliExceptionHandler.cs:65 — `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 65 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel engine/src/CodeHealth.Cli/CliExceptionHandler.cs:70 — `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 70 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel engine/src/CodeHealth.Cli/CliExceptionHandler.cs:71 — `engine/src/CodeHealth.Cli/CliExceptionHandler.cs` reports through `Console.Write…` at line 71 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs:565 — `src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs` reports through `Console.Write…` at line 565 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
  • Console output used as the logging channel src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs:570 — `src/Kennel.Core/LanguageTraining/Services/ProgrammeCycleService.cs` reports through `Console.Write…` at line 570 although other files in its project log through a logger. Console lines carry no level, category or structured properties and never reach the log pipeline or its exporters.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×7
  • Silent fallback default on parse failure engine/src/CodeHealth.Reporting/Distillation/DistillChecks.cs:314 — `IdNumber` falls back to `int.MaxValue` when `int.TryParse(new string([.. id.Skip(1).TakeWhile(char.IsDigit)]), out var n)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure engine/src/CodeHealth.CodeModel.Jvm/Builder.cs:645 — `ParseAccessibility` falls back to `Accessibility.NotApplicable` when `Enum.TryParse<Accessibility>(a, ignoreCase: false, out var v)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure engine/src/CodeHealth.CodeModel.Jvm/Builder.cs:673 — `ParseSpecial` falls back to `SpecialKind.None` when `Enum.TryParse<SpecialKind>(s, ignoreCase: false, out var v)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure engine/src/CodeHealth.CodeModel.Jvm/Builder.cs:676 — `ParseBranchKind` falls back to `BranchKind.If` when `Enum.TryParse<BranchKind>(kind, ignoreCase: false, out var v)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure engine/src/CodeHealth.CodeModel.Jvm/Builder.cs:679 — `ParseLiteralKind` falls back to `LiteralKind.Other` when `Enum.TryParse<LiteralKind>(kind, ignoreCase: false, out var v)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure engine/src/CodeHealth.CodeModel.Jvm/Builder.cs:682 — `ParseTokenKind` falls back to `TokenKind.Other` when `Enum.TryParse<TokenKind>(kind, ignoreCase: false, out var v)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure engine/src/CodeHealth.CodeModel.Jvm/JvmProvider.cs:1005 — `ParseOutputKind` falls back to `OutputKind.Library` when `Enum.TryParse<OutputKind>(kind, ignoreCase: true, out var v)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
X9 · Subsumed condition operand · Subsumed condition operand · ×7
  • Subsumed condition operand engine/src/Scanner/Maturity/M4/DocClaimChecks.cs:825 — `words.Count > 0` can never decide this `&&` — every value satisfying `words.Count > 1` also satisfies `words.Count > 0`, so the `&&` chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Scala.cs:184 — `import.EndsWith(".Logger", StringComparison.Ordinal)` can never decide this `||` — every value satisfying `import.EndsWith(".Logger", StringComparison.Ordinal)` also satisfies `import.Contains("Logg", StringComparison.Ordinal)`, 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.
  • Subsumed condition operand engine/src/Scanner/Defects/X23/ForeignDiagnosticMaterialisationScan.Scala.cs:184 — `import.EndsWith(".Logging", StringComparison.Ordinal)` can never decide this `||` — every value satisfying `import.EndsWith(".Logging", StringComparison.Ordinal)` also satisfies `import.Contains("Logg", StringComparison.Ordinal)`, 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.
  • Subsumed condition operand engine/src/Scanner/Defects/X17/ForeignDocumentWalkScan.Kotlin.cs:831 — `prev >= 0` can never decide this `&&` — every value satisfying `prev >= 1` also satisfies `prev >= 0`, so the `&&` chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand engine/src/Scanner/Security/D29/Scanners/RouteAuthorizationScan.cs:741 — `before >= 0` can never decide this `&&` — every value satisfying `before >= 1` also satisfies `before >= 0`, so the `&&` chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand engine/src/Core/Security/NativeSecretScanner.HardcodedPassword.cs:232 — `line.Contains("@$\"", StringComparison.Ordinal)` can never decide this `||` — every value satisfying `line.Contains("@$\"", StringComparison.Ordinal)` also satisfies `line.Contains("$\"", StringComparison.Ordinal)`, 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.
  • Subsumed condition operand engine/src/Core/Languages/Scala/Testing/ScalaTestCensus.cs:428 — `rel.Contains("test/", StringComparison.Ordinal)` can never decide this `||` — every value satisfying `rel.Contains("test/", StringComparison.Ordinal)` also satisfies `rel.Contains("/test/", StringComparison.Ordinal)`, 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.
AX6 · Interface segregation · Fat interface · ×6
  • Fat interface: ICallSite (23 members) engine/src/CodeHealth.Core/CodeModel/ICallSite.cs:5 — `ICallSite` declares 23 members: `InvokedMemberName`, `ResolvedOwnerType`, `ResolvedOwnerNamespace`, `IsResolved`, `IsObjectCreation`, `CalleeResolution`, `IsProducedResult`, `ArgumentTypes`, `ReceiverIsDeclaredMemberOfContainingType`, `ReceiverMemberName`, `ReceiverIsMethodLocalBuffer`, `ReceiverIsImplicitSelfCall`, `InAsyncFunction`, `ViaEnclosingInstance`, `InCriticalSection`, `ReceiverIsSelf`, `ReceiverIsPackageVariable`, `InHandlerLiteral`, `RouteHandlerLine`, `ReceiverIsCaptured`, `ReceiverModule`, `GatedOn`, `GatedOnFalse`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: ICodeType (83 members) engine/src/CodeHealth.Core/CodeModel/ICodeType.cs:5 — `ICodeType` declares 83 members: `Kind`, `IsRecord`, `IsAbstract`, `IsSealed`, `IsStatic`, `IsValueType`, `IsGenericType`, `Name`, `Namespace`, `AssemblyName`, `ProjectName`, `Accessibility`, `ExportedBy`, `IsDocumentedNonPublic`, `TypeParameters`, `BaseType`, `HasMeaningfulBase`, `DirectInterfaces`, `AllInterfaces`, `AllInterfaceRefs`, `Special`, `Location`, `IsGenerated`, `Members`, `UnionCases`, `Attributes`, `EmbeddedTypes`, `UnderlyingType`, `PackageTypes`, `Language`, `IsSingleton`, `IsMixin`, `MixinNames`, `FileImports`, `DerivesClause`, `RecoveryFoldCount`, `RecoveryFoldCalls`, `ConstructionCalls`, `CommandCalls`, `BypassConstructions`, and 43 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: IMethodBody (21 members) engine/src/CodeHealth.Core/CodeModel/IMethodBody.cs:9 — `IMethodBody` declares 21 members: `Calls`, `Assignments`, `Increments`, `GlobalWrites`, `Catches`, `IsAsync`, `ReturnsVoid`, `IsProgramOnly`, `RejectsWhenAlreadyPresent`, `RejectsArgumentAlreadyPresent`, `AnswersArgumentAlreadyPresent`, `HandlerExcerpt`, `ReturnsThis`, `ReferencedIdentifiers`, `MemberAccesses`, `Decisions`, `Literals`, `Branches`, `LogicalLineCount`, `RawText`, `StrippedText`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: IGitProviderClient (21 members) src/Kennel.Core/Repositories/Providers/IGitProviderClient.cs:168 — `IGitProviderClient` declares 21 members: `Provider`, `ListRepositoriesAsync`, `ListRepositoriesAsync`, `GetRepositoryAsync`, `LookupPublicRepositoryAsync`, `CreateCloneTokenAsync`, `ResolveAndMintCloneTokenAsync`, `AppInstallUrlAsync`, `ListInstallationsAsync`, `GetInstallationAccountLoginAsync`, `ListUserInstallationIdsAsync`, `ExchangeOAuthCodeAsync`, `CanExchangeOAuthCode`, `ValidateAccessAsync`, `GetAuthenticatedAccountLoginAsync`, `RefreshOAuthTokenAsync`, `GetPermissionLevelAsync`, `ListCollaboratorsAsync`, `UpsertMarkerIssueAsync`, `HasCodeScanningReadPermissionAsync`, `GetLatestCodeScanningSarifAsync`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 21 declarations carry 20 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 20 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: IFinishedRun (18 members) src/Kennel.Admin.Core/Admin/Services/FinishedRunFold.cs:56 — `IFinishedRun` declares 18 members: `Id`, `RunId`, `RepositoryId`, `Repository`, `StateStatus`, `Trigger`, `RequestedAt`, `StateFinishedAt`, `StateMeasuredLoc`, `TextGeneration`, `Reason`, `TimingsStatus`, `TimingsFinishedAt`, `WallClockMs`, `TimingsMeasuredLoc`, `Status`, `FinishedAt`, `MeasuredLoc`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: IOldDbReader (61 members) src/Kennel.Migration/Source/IOldDbReader.Agents.cs:9 — `IOldDbReader` declares 61 members: `ReadRepositoryAgentKeysAsync`, `ReadAdminAgentKeysAsync`, `ReadFindingDisputesAsync`, `ReadAdvisoryFeedbacksAsync`, `ReadDetectorGapsAsync`, `ReadSuppressionsAsync`, `ReadAgentClaimsAsync`, `ReadDimensionFeedbackAsync`, `ReadRepositoryAgentSettingsAsync`, `ReadAgentRepositoryEventsAsync`, `ReadExternalRebuttalsAsync`, `ReadCalibrationTicketsAsync`, `ReadSarifIntegrationsAsync`, `ReadSarifComparisonsAsync`, `ReadOrgBrandThemesAsync`, `ReadCommunityTagsAsync`, `ReadCommunityTagVotesAsync`, `ReadTagsAsync`, `ReadProductsAsync`, `ReadProductRepositoriesAsync`, `ReadProductDependenciesAsync`, `ReadProfilesAsync`, `ReadProfileSharesAsync`, `ReadSchedulesAsync`, `ReadThreatModelReviewsAsync`, `ReadUsageLinesAsync`, `ReadConformanceAssessmentsAsync`, `ReadEvidenceAttachmentsAsync`, `ReadRepositoryComplianceSettingsAsync`, `ReadComplianceAttestationsAsync`, `ReadNis2GovernanceAttestationsAsync`, `ReadComplianceContextFieldsAsync`, `ReadNis2ProductProfilesAsync`, `ReadContractsAsync`, `ReadDeliveriesAsync`, `ReadDeliveryItemsAsync`, `ReadDeliveryDeclarationsAsync`, `ReadDeliveryAccessKeysAsync`, `ReadPricingSettingsAsync`, `ReadPricingModulesAsync`, and 21 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
IC1 · Incompleteness & stubs · Commented-out code · ×6
  • Commented-out code engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:1688 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code engine/src/Scanner/Compliance/Compliance.Prework/CompliancePrework.cs:1689 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code engine/src/Scanner/Defects/Defects.Shared/CSharpCards.cs:378 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code engine/src/Scanner/Defects/Defects.Shared/CSharpCards.cs:380 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code engine/src/Scanner/Defects/Defects.Shared/CSharpCards.cs:382 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code engine/src/Scanner/Defects/X5/NullableReferenceTypesAnalyzer.cs:659 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
D12 · Dependency Hygiene · Outdated (npm) · ×3
  • Outdated (npm): mkdirp engine/tests/CodeHealth.Tests.Concepts/suites/vulnerable-dependency/typescript/repo/packages/api/package.json:14 — mkdirp 0.5.5 → 3.0.1 available.
  • Outdated (npm): tough-cookie — tough-cookie 2.5.0 → 6.0.2 available.
  • Outdated (npm): uuid engine/tests/CodeHealth.Tests.Concepts/suites/deprecated-dependency/typescript/repo/package.json:21 — uuid 11.1.1 → 14.0.3 available.
D12 · Dependency Hygiene · Outdated · ×2
  • Outdated: System.Resources.Extensions engine/Directory.Packages.props:24 — System.Resources.Extensions 6.0.0 → 10.0.14 available (referenced by CodeHealth.Toolchain).
  • Outdated: coverlet.collector engine/Directory.Packages.props:135 — coverlet.collector 6.0.4 → 10.1.0 available (referenced by CodeHealth.Tests.Unit).
DM5 · Encapsulated state · Mutable entity · ×2
  • Mutable entity: User src/Kennel.Core/Accounts/Domain/User.cs:19 — `User` exposes publicly writable state (Focus, StartPage, OnboardingState, CurrentOrganizationId, CurrentTeamId).
  • Mutable entity: ConformanceAssessment src/Kennel.Core/Compliance/Conformance/Domain/ConformanceAssessment.cs:78 — `ConformanceAssessment` exposes publicly writable state (ScopeStatement).
DM9 · Scattered domain decisions · Rule about [Kind, OwnerUserId] decided in 2 places · ×2
  • Rule about [Kind, OwnerUserId] decided in 2 places — Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesDocument's [Kind, OwnerUserId] are judged in Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesReader.ReplayedRows, Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesReader.StoredRows — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Rule about [Kind, OwnerUserId] decided in 2 places — Kennel.Assay.DecisionReports.Pages.AssayReports.AssayReportsDocument's [Kind, OwnerUserId] are judged in Kennel.Assay.DecisionReports.Pages.AssayReports.AssayReportsReader.ReplayedRows, Kennel.Assay.DecisionReports.Pages.AssayReports.AssayReportsReader.StoredRows — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
R7 · Dead Code · Unused module-local declaration 'ClientSession' · ×2
  • Unused module-local declaration 'ClientSession' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:18 — 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.
  • Unused module-local declaration 'ClientSession' engine/rulesets/semgrep-fixtures/watchdog-unbound-identifier-assigned-js.js:20 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'Registry' · ×2
  • Unused module-local declaration 'Registry' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:56 — 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.
  • Unused module-local declaration 'Registry' engine/rulesets/semgrep-fixtures/watchdog-unbound-identifier-assigned-js.js:51 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'Remediated' · ×2
  • Unused module-local declaration 'Remediated' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:98 — 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.
  • Unused module-local declaration 'Remediated' engine/rulesets/semgrep-fixtures/watchdog-unbound-identifier-assigned-js.js:63 — 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.
D20 · ADR Quality · ADR superseded but its status says otherwise · ×1
  • ADR superseded but its status says otherwise docs/adr/0002-event-sourcing-scope.md:1 — docs/adr/0002-event-sourcing-scope.md:1 says "Accepted", but docs/adr/0026-the-ui-reads-view-models-only.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 8 of 384 project(s) overshoot their size bounds, lowering Project Cohesion to 9.6/10. The most over is `Kennel.Core` (129900 LoC, 2153 public types across 203 namespaces). Review these for cohesion — split a project that spans unrelated responsibilities.
D26 · Project Cohesion · Split CodeHealth.Core · ×1
  • Split CodeHealth.Core engine/src/CodeHealth.Core/CodeHealth.Core.csproj:1 — `CodeHealth.Core` overshoots its size bounds (12816 LoC, 205 public types across 8 namespaces). These parts reach the rest of the project only through its shared core (`CodeModel`, `Configuration`, `Ids`), so they are the cleanest seams: `CodeHealth.Core.Text` (8 types in 3 files): 0 of 83 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times. Extract each into its own project.
D26 · Project Cohesion · Split CodeHealth.Reporting · ×1
  • Split CodeHealth.Reporting engine/src/CodeHealth.Reporting/CodeHealth.Reporting.csproj:1 — `CodeHealth.Reporting` overshoots its size bounds (23394 LoC, 227 public types across 24 namespaces). These parts reach the rest of the project only through its shared core (`(root)`, `Brand`, `Briefing`, `Dimensions`, `Findings`, `Fingerprints`, `Svg`), so they are the cleanest seams: `CodeHealth.Reporting.Distillation` (33 types in 10 files): 0 of 432 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times; `CodeHealth.Reporting.Architecture` (22 types in 6 files): 0 of 72 of its type references cross into a sibling namespace, and the rest of the project uses it 1 times and it uses the rest 0 times. Extract each into its own project.
D26 · Project Cohesion · Split Kennel.Core · ×1
  • Split Kennel.Core src/Kennel.Core/Kennel.Core.csproj:1 — `Kennel.Core` overshoots its size bounds (129900 LoC, 2153 public types across 203 namespaces). These parts reach the rest of the project only through its shared core (`Accounts`, `Deliveries`, `LanguageTraining`, `Licensing`, `Metrics`, `Questionnaires`, `Runtime`, `Scheduling`), so they are the cleanest seams: `Kennel.Core.Compliance` (227 types in 102 files): 456 of 5249 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 690 times; `Kennel.Core.LanguageSupport` (14 types in 11 files): 0 of 288 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times; `Kennel.Core.Onboarding` (10 types in 6 files): 7 of 106 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 45 times. Extract each into its own project.
D26 · Project Cohesion · Split Kennel.Watchdog.Core · ×1
  • Split Kennel.Watchdog.Core src/Kennel.Watchdog.Core/Kennel.Watchdog.Core.csproj:1 — `Kennel.Watchdog.Core` overshoots its size bounds (87820 LoC, 1405 public types across 147 namespaces). These parts reach the rest of the project only through its shared core (`Agents`, `Publishing`, `Scheduling`, `Teams`, `Trackers`), so they are the cleanest seams: `Kennel.Watchdog.PublicGallery` (73 types in 48 files): 36 of 814 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 36 times; `Kennel.Watchdog.Evidence` (29 types in 12 files): 0 of 453 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times; `Kennel.Watchdog.Customers` (27 types in 11 files): 0 of 364 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times. Extract each into its own project.
D26 · Project Cohesion · Split Kennel.Assay.Core · ×1
  • Split Kennel.Assay.Core src/Kennel.Assay.Core/Kennel.Assay.Core.csproj:1 — `Kennel.Assay.Core` overshoots its size bounds (30647 LoC, 423 public types across 47 namespaces). These parts reach the rest of the project only through its shared core (`Profiles`), so they are the cleanest seams: `Kennel.Assay.Billing` (16 types in 6 files): 0 of 235 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times; `Kennel.Assay.Compliance` (11 types in 5 files): 0 of 130 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times; `Kennel.Assay.AccessGrants` (7 types in 4 files): 0 of 49 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times. Extract each into its own project.
D26 · Project Cohesion · Split Kennel.Infrastructure · ×1
  • Split Kennel.Infrastructure src/Kennel.Infrastructure/Kennel.Infrastructure.csproj:1 — `Kennel.Infrastructure` overshoots its size bounds (8263 LoC, 72 public types across 14 namespaces). These parts reach the rest of the project only through its shared core (`(root)`, `Auth`, `BackgroundServices`, `EventStore`, `Projections`, `Reconcilers`), so they are the cleanest seams: `Kennel.Infrastructure.GitProviders` (14 types in 11 files): 0 of 64 of its type references cross into a sibling namespace, and the rest of the project uses it 1 times and it uses the rest 0 times; `Kennel.Infrastructure.CaiRegistry` (8 types in 7 files): 0 of 30 of its type references cross into a sibling namespace, and the rest of the project uses it 1 times and it uses the rest 0 times; `Kennel.Infrastructure.Reporting` (8 types in 7 files): 0 of 33 of its type references cross into a sibling namespace, and the rest of the project uses it 1 times and it uses the rest 0 times. Extract each into its own project.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D39 · IL Efficiency · IL efficiency · ×1
  • IL efficiency: 720 authored method(s) exceed the IL budget engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:987 — 720 of 62723 first-party methods compile to oversized IL bodies (> 250 instructions); worst: CodeHealth.Reporting.Briefing.ExecutiveBrief.Input @ engine/src/CodeHealth.Reporting/Briefing/ExecutiveBrief.cs:987, 1340 IL instructions; that pulled this dimension to 9.8/10. These bodies are far past the JIT's inline budget, so splitting them does not make them inlinable — what moves the number is emitting less: collapsing LINQ chains and closures on hot paths, and interpolation built eagerly where it is only sometimes used.
DM9 · Scattered domain decisions · Rule about [Kind, Line] decided in 2 places · ×1
  • Rule about [Kind, Line] decided in 2 places — CodeHealth.Core.JsLexing.JsToken's [Kind, Line] are judged in CodeHealth.Core.ModelAware.ScriptFunctions, CodeHealth.Core.ModelAware.ScriptFunctions.ScalaWalker — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Kind, Text] decided in 4 places · ×1
  • Rule about [Kind, Text] decided in 4 places — CodeHealth.Core.JsLexing.JsToken's [Kind, Text] are judged in CodeHealth.Core.ModelAware.ForeignDisposalDutyScan, CodeHealth.Core.ModelAware.ForeignDisposalDutyScan.PhpShape, CodeHealth.Core.ModelAware.ForeignDisposalDutyScan.RubyDisposalShape, CodeHealth.Core.ModelAware.ForeignDisposalDutyScan.Shape — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Kind, Value] decided in 2 places · ×1
  • Rule about [Kind, Value] decided in 2 places — CodeHealth.Core.JsLexing.JsToken's [Kind, Value] are judged in CodeHealth.Core.ModelAware.ForeignInertKnobScan, CodeHealth.Core.ModelAware.ForeignInertKnobScan.Shape — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [ParamsClose, ParamsOpen] decided in 2 places · ×1
  • Rule about [ParamsClose, ParamsOpen] decided in 2 places — CodeHealth.Core.ModelAware.ForeignInertKnobScan.CtorSpan's [ParamsClose, ParamsOpen] are judged in CodeHealth.Core.ModelAware.ForeignInertKnobScan, CodeHealth.Core.ModelAware.ForeignInertKnobScan.Shape — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Key, Kind] decided in 2 places · ×1
  • Rule about [Key, Kind] decided in 2 places — Kennel.Core.Billing.Domain.FreePeriodClaim's [Key, Kind] are judged in Kennel.Core.Billing.Partners.FreePeriodEligibility, Kennel.Core.Billing.ScanCredit — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Id, VatId] decided in 2 places · ×1
  • Rule about [Id, VatId] decided in 2 places — Kennel.Core.Billing.Domain.Organization's [Id, VatId] are judged in Kennel.Core.Billing.OrgManagementService, Kennel.Core.Billing.Partners.FreePeriodEligibility — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [SignedByUserId, SignerEmail] decided in 2 places · ×1
  • Rule about [SignedByUserId, SignerEmail] decided in 2 places — Kennel.Core.Compliance.Contracts.Domain.Delivery's [SignedByUserId, SignerEmail] are judged in Kennel.Core.Compliance.Privacy.ContractEmailsErasureStep, Kennel.Core.Compliance.Privacy.ContractEmailsExportStep — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Arm, CycleId] decided in 2 places · ×1
  • Rule about [Arm, CycleId] decided in 2 places — Kennel.Core.LanguageTraining.Domain.VerificationRun's [Arm, CycleId] are judged in Kennel.Core.LanguageTraining.Application.NoiseRatesBackfill, Kennel.Core.Repositories.Services.RepoExpectedNoiseReader — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Kind, UserId] decided in 2 places · ×1
  • Rule about [Kind, UserId] decided in 2 places — Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesDocument's [Kind, UserId] are judged in Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesReader.ReplayedRows, Kennel.Core.Portfolios.Pages.ProductRepositories.ProductRepositoriesReader.StoredRows — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [RepositoryId, RunId] decided in 2 places · ×1
  • Rule about [RepositoryId, RunId] decided in 2 places — Kennel.Core.Metrics.Domain.MetricPoint's [RepositoryId, RunId] are judged in Kennel.Watchdog.PublicGallery.PublicReportEndpoints, Kennel.Watchdog.PublicGallery.PublicReportLinkSource — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [InReplyTo, Verdict] decided in 2 places · ×1
  • Rule about [InReplyTo, Verdict] decided in 2 places — Kennel.Watchdog.Agents.Domain.DisclosureReply's [InReplyTo, Verdict] are judged in Kennel.Watchdog.Agents.Services.DisclosureKindPrecision, Kennel.Watchdog.Agents.Services.SecurityDisclosureNotifier — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [ResolvedAt, Status] decided in 2 places · ×1
  • Rule about [ResolvedAt, Status] decided in 2 places — Kennel.Watchdog.Agents.ReadModels.DisputeFact's [ResolvedAt, Status] are judged in Kennel.Watchdog.Agents.ReadModels.FindingStateFold, Kennel.Watchdog.Agents.ReadModels.RepoFindingsReadModel — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Kind, LastCommitAt, SupersededBy] decided in 2 places · ×1
  • Rule about [Kind, LastCommitAt, SupersededBy] decided in 2 places — Kennel.Watchdog.Reporting.Persistence.ChangelogEntryRow's [Kind, LastCommitAt, SupersededBy] are judged in Kennel.Watchdog.Reporting.Pages.RepoChangelog.RepoChangelogDocument, Kennel.Watchdog.Reporting.Persistence.ChangelogEntryStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Kind, SupersededBy] decided in 2 places · ×1
  • Rule about [Kind, SupersededBy] decided in 2 places — Kennel.Watchdog.Reporting.Persistence.ChangelogEntryRow's [Kind, SupersededBy] are judged in Kennel.Watchdog.Reporting.Pages.RepoChangelog.RepoChangelogDocument, Kennel.Watchdog.Reporting.Persistence.ChangelogEntryStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [End, Start] decided in 3 places · ×1
  • Rule about [End, Start] decided in 3 places — Kennel.Watchdog.Teams.Domain.Sprint's [End, Start] are judged in Kennel.Watchdog.Reporting.Pages.RepoDocuments.RepoDocumentsDocument, Kennel.Watchdog.Teams.Pages.TeamHub.TeamHubDocument, Kennel.Watchdog.Teams.Pages.TeamsOverview.TeamsOverviewDocument — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [ArchivedAt, OrganizationId] decided in 2 places · ×1
  • Rule about [ArchivedAt, OrganizationId] decided in 2 places — Kennel.Watchdog.Teams.Persistence.TeamRow's [ArchivedAt, OrganizationId] are judged in Kennel.Watchdog.Teams.OrgTeamDirectory, Kennel.Watchdog.Teams.TeamStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [ArchivedAt, Id, OrganizationId] decided in 2 places · ×1
  • Rule about [ArchivedAt, Id, OrganizationId] decided in 2 places — Kennel.Watchdog.Teams.Persistence.TeamRow's [ArchivedAt, Id, OrganizationId] are judged in Kennel.Watchdog.Teams.OrgTeamDirectory, Kennel.Watchdog.Teams.TeamStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Id, OrganizationId] decided in 2 places · ×1
  • Rule about [Id, OrganizationId] decided in 2 places — Kennel.Watchdog.Teams.Persistence.TeamRow's [Id, OrganizationId] are judged in Kennel.Watchdog.Teams.RepoTeamDirectory, Kennel.Watchdog.Teams.TeamStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [ConnectionId, Project, TeamId] decided in 2 places · ×1
  • Rule about [ConnectionId, Project, TeamId] decided in 2 places — Kennel.Watchdog.Trackers.Persistence.TrackerTargetRow's [ConnectionId, Project, TeamId] are judged in Kennel.Watchdog.Trackers.Application.TrackerSyncBackfill, Kennel.Watchdog.Trackers.Application.TrackerTicketsBackfill — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [ConnectionId, Project, TeamId] decided in 3 places · ×1
  • Rule about [ConnectionId, Project, TeamId] decided in 3 places — Kennel.Watchdog.Trackers.Persistence.TrackerTicketRow's [ConnectionId, Project, TeamId] are judged in Kennel.Watchdog.Trackers.Application.TrackerSyncBackfill, Kennel.Watchdog.Trackers.Application.TrackerTicketsBackfill, Kennel.Watchdog.Trackers.TrackerBoards — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Altitude, ScopeId] decided in 3 places · ×1
  • Rule about [Altitude, ScopeId] decided in 3 places — Kennel.Assay.Governance.Domain.GovernanceBinding's [Altitude, ScopeId] are judged in Kennel.Assay.Governance.Pages.AssayEligibility.AssayEligibilityDocument, Kennel.Assay.Governance.Pages.AssaySuppliers.AssaySuppliersDocument, Kennel.Assay.Governance.Queries.ProductObligationsQueries — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [NoCriticalCve, NoSecretsInHistory] decided in 2 places · ×1
  • Rule about [NoCriticalCve, NoSecretsInHistory] decided in 2 places — Kennel.Assay.Governance.Domain.GovernanceControl's [NoCriticalCve, NoSecretsInHistory] are judged in Kennel.Assay.Governance.Domain.GovernancePosture, Kennel.Assay.Governance.Pages.AssayGovernance.AssayGovernanceDocument — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [GroupKey, Status] decided in 2 places · ×1
  • Rule about [GroupKey, Status] decided in 2 places — Kennel.Watchdog.Agents.Domain.DetectorGap's [GroupKey, Status] are judged in Kennel.Admin.Services.DetectorGapPromotionService, Kennel.Admin.Services.MaintainerQaService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [Concept, Language] decided in 2 places · ×1
  • Rule about [Concept, Language] decided in 2 places — Kennel.Improve.Orchestrator.Model.PackageKey's [Concept, Language] are judged in Kennel.Improve.Orchestrator.Gates.ShellGate, Kennel.Improve.Orchestrator.Gates.TurnGate — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
ES3 · PII in the event store · PII in event · ×1
  • PII in event: ContractOpened src/Kennel.Core/Compliance/Domain/Events/ContractFacts.cs:13 — Persisted event carries personal data (BuyerEmail: email, name token "email" (en)) — crypto-shredding detected (per-subject key `EmailProtectionKey`, destroyed on erasure); verify it covers these fields.
M4 · Documentation accuracy · README/code drift · ×1
  • README/code drift docs/multilang/fsharp-stageB.md:324 — docs/multilang/fsharp-stageB.md names Dapper 141, but the manifest declares `Dapper` 2.1.35. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
P12 · CI test-gate honesty · Sleep-based test synchronization · ×1
  • Sleep-based test synchronization — 144 Task.Delay/Thread.Sleep call(s) in test code synchronize with background work by sleeping — a known flakiness precursor on slow runners. Prefer polling with a deadline or completion signals.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 68/250 service-like projects use logging (pure contract/DTO projects are excluded — they have nothing to log). Of those 250, 16 ship a process this repository operates; the rest are libraries their consumer hosts, where the logging decision belongs to the host.
R7 · Dead Code · Unused module-local declaration 'Dispatcher' · ×1
  • Unused module-local declaration 'Dispatcher' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:31 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'Session' · ×1
  • Unused module-local declaration 'Session' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:43 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'Walker' · ×1
  • Unused module-local declaration 'Walker' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:68 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'Cache' · ×1
  • Unused module-local declaration 'Cache' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:79 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'Derived' · ×1
  • Unused module-local declaration 'Derived' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:109 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'Formatter' · ×1
  • Unused module-local declaration 'Formatter' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:118 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'NewCommand' · ×1
  • Unused module-local declaration 'NewCommand' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:132 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'Scene' · ×1
  • Unused module-local declaration 'Scene' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:142 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'GeneratorService' · ×1
  • Unused module-local declaration 'GeneratorService' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:155 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'TimeoutManager' · ×1
  • Unused module-local declaration 'TimeoutManager' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:168 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'Plain' · ×1
  • Unused module-local declaration 'Plain' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:181 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'handlers' · ×1
  • Unused module-local declaration 'handlers' engine/rulesets/semgrep-fixtures/watchdog-class-method-called-as-bare-identifier-js.js:188 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'getExpressSessionMiddleware' · ×1
  • Unused module-local declaration 'getExpressSessionMiddleware' engine/rulesets/semgrep-fixtures/watchdog-hardcoded-cookie-signing-secret-ts.js:146 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'buildScopedSession' · ×1
  • Unused module-local declaration 'buildScopedSession' engine/rulesets/semgrep-fixtures/watchdog-hardcoded-cookie-signing-secret-ts.js:179 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'signTokens' · ×1
  • Unused module-local declaration 'signTokens' engine/rulesets/semgrep-fixtures/watchdog-hardcoded-cookie-signing-secret-ts.js:198 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'buildSessionFromEnv' · ×1
  • Unused module-local declaration 'buildSessionFromEnv' engine/rulesets/semgrep-fixtures/watchdog-hardcoded-cookie-signing-secret-ts.js:202 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'rebound' · ×1
  • Unused module-local declaration 'rebound' engine/rulesets/semgrep-fixtures/watchdog-hardcoded-cookie-signing-secret-ts.js:212 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'propertyWritten' · ×1
  • Unused module-local declaration 'propertyWritten' engine/rulesets/semgrep-fixtures/watchdog-hardcoded-cookie-signing-secret-ts.js:222 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'assigned' · ×1
  • Unused module-local declaration 'assigned' engine/rulesets/semgrep-fixtures/watchdog-hardcoded-cookie-signing-secret-ts.js:231 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'rawQuery' · ×1
  • Unused module-local declaration 'rawQuery' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:24 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'rawQueryReplica' · ×1
  • Unused module-local declaration 'rawQueryReplica' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:31 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'setSearchPath' · ×1
  • Unused module-local declaration 'setSearchPath' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:38 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'backfill' · ×1
  • Unused module-local declaration 'backfill' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:46 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'updateSurvey' · ×1
  • Unused module-local declaration 'updateSurvey' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:54 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'safeTagged' · ×1
  • Unused module-local declaration 'safeTagged' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:67 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'safeExecute' · ×1
  • Unused module-local declaration 'safeExecute' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:72 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'probe' · ×1
  • Unused module-local declaration 'probe' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:78 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'probeDoubleQuoted' · ×1
  • Unused module-local declaration 'probeDoubleQuoted' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:85 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'findMany' · ×1
  • Unused module-local declaration 'findMany' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:91 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'wrapper' · ×1
  • Unused module-local declaration 'wrapper' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:97 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'knexRaw' · ×1
  • Unused module-local declaration 'knexRaw' engine/rulesets/semgrep-fixtures/watchdog-prisma-raw-query-unsafe-api-ts.ts:103 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'IndexedWrite' · ×1
  • Unused module-local declaration 'IndexedWrite' engine/rulesets/semgrep-fixtures/watchdog-unbound-identifier-assigned-js.js:35 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'Nested' · ×1
  • Unused module-local declaration 'Nested' engine/rulesets/semgrep-fixtures/watchdog-unbound-identifier-assigned-js.js:43 — 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.
X2 · Cancellation propagation · Not all async methods take a CancellationToken · ×1
  • Not all async methods take a CancellationToken — Only 7619/7764 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
X5 · Nullable reference types · Null-forgiving operator (`!`) suppressions reduce the NRT score · ×1
  • Null-forgiving operator (`!`) suppressions reduce the NRT score — ~0.4 `!` suppressions per 1k syntax nodes — 2282 suppression(s) across the 6482136 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.
X7 · Silent fallback defaults · Silent fallback default on unknown code · ×1
  • Silent fallback default on unknown code engine/src/Scanner/ArchitectureModel/AX1/SpringBeans.cs:292 — `ScopeName` maps every unrecognised code to `Scope.Other`, one of the real values, with no log or throw — a malformed or new code silently reads as a known one. Throw on the unknown code, or log it. If that member is the correct answer for any other code, say so in a comment on the member and the row stops firing.
Minor — 190 finding(s)
D24 · Comment Value · doc comments repeat the names · ×67
  • doc comments repeat the names engine/src/CodeHealth.Core/CodeModel/CodeToken.cs:23 — 0 of 172 documented parameters and 3 of 1082 summaries in `CodeHealth.Core` only repeat the member or parameter name (e.g. "A string literal." for `StringLiteral`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Accessibility/RuntimeAccessibilityEvidence.cs:73 — 1 of 20 documented parameters and 0 of 23 summaries in `CodeHealth.Core.Accessibility` only repeat the member or parameter name (e.g. "How many surfaces were rendered." for `SurfacesRendered`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Api/AndroidLibraryPublication.cs:268 — 0 of 30 documented parameters and 1 of 206 summaries in `CodeHealth.Core.Api` only repeat the member or parameter name (e.g. ", , and the form." for `ApplyFromForm`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Architecture/BoundaryCouplingDetector.cs:17 — 0 of 41 documented parameters and 1 of 232 summaries in `CodeHealth.Core.Architecture` only repeat the member or parameter name (e.g. "One boundary finding." for `BoundaryCouplingFinding`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Classification/SourceClassifier.cs:3984 — 0 of 49 documented parameters and 3 of 493 summaries in `CodeHealth.Core.Classification` only repeat the member or parameter name (e.g. "Python: , and ." for `PythonMarkerVerdict`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/CodeShape/PolyglotConditionScanner.cs:395 — 0 of 71 documented parameters and 2 of 440 summaries in `CodeHealth.Core.CodeShape` only repeat the member or parameter name (e.g. "Blanks and returns ." for `BlankSpan`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Compliance/PersonalDataEvidence.cs:106 — 1 of 27 documented parameters and 1 of 82 summaries in `CodeHealth.Core.Compliance` only repeat the member or parameter name (e.g. "X3: a constant or a static." for `IsConstantOrStatic`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Dependencies/CratesCurrencyCollector.cs:150 — 2 of 418 documented parameters and 3 of 1003 summaries in `CodeHealth.Core.Dependencies` only repeat the member or parameter name (e.g. "The crate." for `CrateName`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Frontend/FrontendDeadCode.cs:1789 — 0 of 125 documented parameters and 8 of 1472 summaries in `CodeHealth.Core.Frontend` only repeat the member or parameter name (e.g. "The barrel that re-exports out of , if one does." for `ReExportingBarrelOf`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Languages/Ruby/Dependencies/BundlerManifestHygiene.cs:860 — 2 of 47 documented parameters and 1 of 122 summaries in `CodeHealth.Core.Languages.Ruby.Dependencies` only repeat the member or parameter name (e.g. "The manifest's text." for `manifestText`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Markup/BuilderDslMarkupProducer.cs:68 — 0 of 37 documented parameters and 3 of 540 summaries in `CodeHealth.Core.Markup` only repeat the member or parameter name (e.g. "kotlinx.html ( ): ." for `KotlinxHtml`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/MarkupOutput/MarkupContexts.cs:71 — 0 of 2 documented parameters and 1 of 18 summaries in `CodeHealth.Core.MarkupOutput` only repeat the member or parameter name (e.g. "Whether a value of is safe in ." for `IsSafe`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/ModelAware/ModelAwareLlmJudge.cs:280 — 1 of 20 documented parameters and 0 of 223 summaries in `CodeHealth.Core.ModelAware` only repeat the member or parameter name (e.g. "The kind from ." for `kind`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Naming/Dominance.cs:12 — 1 of 44 documented parameters and 3 of 98 summaries in `CodeHealth.Core.Naming` only repeat the member or parameter name (e.g. "One project." for `Project`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Orchestration/DimensionProgress.cs:16 — 1 of 13 documented parameters and 0 of 17 summaries in `CodeHealth.Core.Orchestration` only repeat the member or parameter name (e.g. "Its current phase." for `Phase`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/Roslyn/CodeModel/RoslynMembers.cs:24 — 1 of 20 documented parameters and 1 of 131 summaries in `CodeHealth.Core.Roslyn` only repeat the member or parameter name (e.g. "C# optional (a default value or )." for `IsOptional`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/RuntimeBoot/ContainerHardeningParser.cs:19 — 1 of 41 documented parameters and 0 of 141 summaries in `CodeHealth.Core.RuntimeBoot` only repeat the member or parameter name (e.g. "Whether the root filesystem is read-only." for `ReadOnlyRootFilesystem`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Core/TestContracts/JvmTestReliabilityCollector.cs:313 — 0 of 23 documented parameters and 2 of 174 summaries in `CodeHealth.Core.TestContracts` only repeat the member or parameter name (e.g. "One invocation of over ." for `JvmInvocation`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/CodeHealth.Llm.ClaudeCli/Process/ClaudeCliInvocation.cs:5 — 1 of 4 documented parameters and 0 of 14 summaries in `CodeHealth.Llm.ClaudeCli` only repeat the member or parameter name (e.g. "User prompt." for `UserPrompt`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/CodeHealth.Llm.CopilotCli/CopilotCliOptions.cs:8 — 0 of 0 documented parameters and 1 of 13 summaries in `CodeHealth.Llm.CopilotCli` only repeat the member or parameter name (e.g. "Path to the binary." for `BinaryPath`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/CodeHealth.Reporting/Architecture/NamespaceGraphJsonRenderer.cs:25 — 3 of 333 documented parameters and 3 of 1294 summaries in `CodeHealth.Reporting` only repeat the member or parameter name (e.g. "How many cycles." for `CycleCount`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Scanner/Accessibility/Accessibility.Prework/AccessibilityScan.cs:578 — 0 of 0 documented parameters and 2 of 141 summaries in `CodeHealth.Scanner.Accessibility.Prework` only repeat the member or parameter name (e.g. "Every option role any composite in can own." for `AllCompositeOptionRoles`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Scanner/AccessibilityRuntime/AccessibilityRuntime.Prework/PlaywrightNodeRenderer.cs:572 — 0 of 85 documented parameters and 1 of 231 summaries in `CodeHealth.Scanner.AccessibilityRuntime.Prework` only repeat the member or parameter name (e.g. "One line of : ." for `SdkLine`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Scanner/ArchitectureJudged/D22/ApiShapeRules.cs:8 — 1 of 12 documented parameters and 1 of 40 summaries in `CodeHealth.Scanner.ArchitectureJudged.D22` only repeat the member or parameter name (e.g. "The type." for `Type`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • doc comments repeat the names engine/src/Scanner/ArchitectureModel/AX1/GetXRegistrations.cs:57 — 0 of 0 documented parameters and 1 of 300 summaries in `CodeHealth.Scanner.ArchitectureModel.AX1` only repeat the member or parameter name (e.g. "/ : a new instance on every find." for `PerFind`). This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
  • + 42 more in this group — see findings.md.
D12 · Dependency Hygiene · Outdated · ×48
  • Outdated: Microsoft.Extensions.Configuration.Abstractions — Microsoft.Extensions.Configuration.Abstractions 10.0.8 → 10.0.14 available (referenced by CodeHealth.Core).
  • Outdated: Microsoft.Extensions.DependencyInjection.Abstractions — Microsoft.Extensions.DependencyInjection.Abstractions 10.0.8 → 10.0.14 available (referenced by CodeHealth.Core).
  • Outdated: Microsoft.Extensions.FileSystemGlobbing — Microsoft.Extensions.FileSystemGlobbing 10.0.8 → 10.0.14 available (referenced by CodeHealth.Core).
  • Outdated: Microsoft.Extensions.Logging.Abstractions — Microsoft.Extensions.Logging.Abstractions 10.0.8 → 10.0.14 available (referenced by CodeHealth.Core).
  • Outdated: YamlDotNet — YamlDotNet 18.0.0 → 18.1.0 available (referenced by CodeHealth.Core).
  • Outdated: LibGit2Sharp — LibGit2Sharp 0.31.0 → 0.32.0 available (referenced by CodeHealth.Toolchain).
  • Outdated: Microsoft.Build — Microsoft.Build 17.11.48 → 18.11.0 available (referenced by CodeHealth.Cli).
  • Outdated: Microsoft.Build.Framework — Microsoft.Build.Framework 17.11.48 → 18.11.0 available (referenced by CodeHealth.Cli).
  • Outdated: Microsoft.Build.Utilities.Core — Microsoft.Build.Utilities.Core 17.11.48 → 18.11.0 available (referenced by CodeHealth.Cli).
  • Outdated: Microsoft.Extensions.DependencyInjection — Microsoft.Extensions.DependencyInjection 10.0.8 → 10.0.14 available (referenced by CodeHealth.Cli).
  • Outdated: Microsoft.Extensions.Logging.Console — Microsoft.Extensions.Logging.Console 10.0.8 → 10.0.14 available (referenced by CodeHealth.Cli).
  • Outdated: Spectre.Console — Spectre.Console 0.55.0 → 0.57.2 available (referenced by CodeHealth.Cli).
  • Outdated: Spectre.Console.Cli — Spectre.Console.Cli 0.55.0 → 0.57.2 available (referenced by CodeHealth.Cli).
  • Outdated: Microsoft.NET.Test.Sdk — Microsoft.NET.Test.Sdk 18.5.1 → 18.11.0 available (referenced by CodeHealth.Tests.Unit).
  • Outdated: xunit.runner.visualstudio — xunit.runner.visualstudio 3.1.5 → 4.0.1 available (referenced by CodeHealth.Tests.Unit).
  • Outdated: Microsoft.CodeAnalysis.Analyzers — Microsoft.CodeAnalysis.Analyzers 3.11.0 → 5.9.0 available (referenced by CodeHealth.Analyzers).
  • Outdated: Microsoft.CodeAnalysis.CSharp — Microsoft.CodeAnalysis.CSharp 4.14.0 → 5.9.0 available (referenced by CodeHealth.Analyzers).
  • Outdated: Microsoft.Extensions.Logging — Microsoft.Extensions.Logging 10.0.8 → 10.0.14 available (referenced by CodeHealth.Tests.Integration).
  • Outdated: Microsoft.Extensions.Http — Microsoft.Extensions.Http 10.0.8 → 10.0.14 available (referenced by CodeHealth.Llm.OpenAiCompatible).
  • Outdated: Microsoft.Extensions.Options — Microsoft.Extensions.Options 10.0.8 → 10.0.14 available (referenced by CodeHealth.Llm.OpenAiCompatible).
  • Outdated: Microsoft.ML.Tokenizers — Microsoft.ML.Tokenizers 2.0.0 → 2.0.1 available (referenced by CodeHealth.Llm.OpenAiCompatible).
  • Outdated: FSharp.Compiler.Service — FSharp.Compiler.Service 43.10.109 → 43.12.403 available (referenced by CodeHealth.CodeModel.FSharp).
  • Outdated: Ionide.ProjInfo — Ionide.ProjInfo 0.74.2 → 0.75.3 available (referenced by CodeHealth.CodeModel.FSharp).
  • Outdated: Ionide.ProjInfo.FCS — Ionide.ProjInfo.FCS 0.74.2 → 0.75.3 available (referenced by CodeHealth.CodeModel.FSharp).
  • Outdated: Mono.Cecil — Mono.Cecil 0.11.5 → 0.11.6 available (referenced by CodeHealth.Scanner.BuildDependent.D39).
  • + 23 more in this group — see findings.md.
D12 · Dependency Hygiene · Outdated (npm) · ×33
  • Outdated (npm): @babel/runtime — @babel/runtime 7.29.10 → 8.0.8 available.
  • Outdated (npm): @ruby/prism — @ruby/prism 1.9.0 → 2.1.0 available.
  • Outdated (npm): ajv — ajv 6.15.0 → 8.20.0 available.
  • Outdated (npm): asynckit — asynckit 0.4.0 → 0.5.0 available.
  • Outdated (npm): axe-core — axe-core 4.10.2 → 4.14.0 available.
  • Outdated (npm): core-util-is — core-util-is 1.0.2 → 1.0.3 available.
  • Outdated (npm): dashdash — dashdash 1.14.1 → 2.0.0 available.
  • Outdated (npm): date-fns — date-fns 2.30.0 → 4.4.0 available.
  • Outdated (npm): dayjs — dayjs 1.11.13 → 1.11.23 available.
  • Outdated (npm): ecc-jsbn — ecc-jsbn 0.1.2 → 0.2.0 available.
  • Outdated (npm): extsprintf — extsprintf 1.3.0 → 1.4.1 available.
  • Outdated (npm): form-data — form-data 2.3.3 → 4.0.6 available.
  • Outdated (npm): fsevents — fsevents 2.3.2 → 2.3.3 available.
  • Outdated (npm): http-signature — http-signature 1.2.0 → 1.4.0 available.
  • Outdated (npm): jsbn — jsbn 0.1.1 → 1.1.0 available.
  • Outdated (npm): json-schema-traverse — json-schema-traverse 0.4.1 → 1.0.0 available.
  • Outdated (npm): jsonwebtoken — jsonwebtoken 8.5.1 → 9.0.3 available.
  • Outdated (npm): jsprim — jsprim 1.4.2 → 2.0.2 available.
  • Outdated (npm): jwa — jwa 1.4.2 → 2.0.1 available.
  • Outdated (npm): jws — jws 3.2.3 → 4.0.1 available.
  • Outdated (npm): mime-db — mime-db 1.52.0 → 1.54.0 available.
  • Outdated (npm): mime-types — mime-types 2.1.35 → 3.0.2 available.
  • Outdated (npm): minimist — minimist 1.2.5 → 1.2.8 available.
  • Outdated (npm): playwright — playwright 1.55.1 → 1.64.1 available.
  • Outdated (npm): playwright-core — playwright-core 1.55.1 → 1.64.1 available.
  • + 8 more in this group — see findings.md.
D5 · Coupling · Off the main sequence · ×13
  • Off the main sequence: CodeHealth.Core.ShapeContracts engine/src/Core/ShapeContracts/CodeHealth.Core.ShapeContracts.csproj:1 — CodeHealth.Core.ShapeContracts: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Core.CodeShapeContracts engine/src/Core/CodeShapeContracts/CodeHealth.Core.CodeShapeContracts.csproj:1 — CodeHealth.Core.CodeShapeContracts: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Scanner.Defects.Shared engine/src/Scanner/Defects/Defects.Shared/CodeHealth.Scanner.Defects.Shared.csproj:1 — CodeHealth.Scanner.Defects.Shared: abstractness 0.00, instability 0.09, distance 0.91 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Scanner.ModelAware.Shared engine/src/Scanner/ModelAware/ModelAware.Shared/CodeHealth.Scanner.ModelAware.Shared.csproj:1 — CodeHealth.Scanner.ModelAware.Shared: abstractness 0.00, instability 0.10, distance 0.90 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Core.ScanContracts engine/src/Core/ScanContracts/CodeHealth.Core.ScanContracts.csproj:1 — CodeHealth.Core.ScanContracts: abstractness 0.00, instability 0.11, distance 0.89 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Scanner.Frontend.Shared engine/src/Scanner/Frontend/Frontend.Shared/CodeHealth.Scanner.Frontend.Shared.csproj:1 — CodeHealth.Scanner.Frontend.Shared: abstractness 0.00, instability 0.14, distance 0.86 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Llm.Abstractions engine/src/CodeHealth.Llm.Abstractions/CodeHealth.Llm.Abstractions.csproj:1 — CodeHealth.Llm.Abstractions: abstractness 0.17, instability 0.00, distance 0.83 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Scanner.Readiness.Shared engine/src/Scanner/Readiness/Readiness.Shared/CodeHealth.Scanner.Readiness.Shared.csproj:1 — CodeHealth.Scanner.Readiness.Shared: abstractness 0.00, instability 0.20, distance 0.80 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Toolchain.RoslynContracts engine/src/CodeHealth.Toolchain.RoslynContracts/CodeHealth.Toolchain.RoslynContracts.csproj:1 — CodeHealth.Toolchain.RoslynContracts: abstractness 0.20, instability 0.00, distance 0.80 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Core.TestContracts engine/src/Core/TestContracts/CodeHealth.Core.TestContracts.csproj:1 — CodeHealth.Core.TestContracts: abstractness 0.08, instability 0.17, distance 0.75 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Core.DependencyContracts engine/src/Core/DependencyContracts/CodeHealth.Core.DependencyContracts.csproj:1 — CodeHealth.Core.DependencyContracts: abstractness 0.25, instability 0.00, distance 0.75 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Core.ArchitectureContracts engine/src/Core/ArchitectureContracts/CodeHealth.Core.ArchitectureContracts.csproj:1 — CodeHealth.Core.ArchitectureContracts: abstractness 0.00, instability 0.25, distance 0.75 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: CodeHealth.Scanner.Accessibility.Shared engine/src/Scanner/Accessibility/Accessibility.Shared/CodeHealth.Scanner.Accessibility.Shared.csproj:1 — CodeHealth.Scanner.Accessibility.Shared: abstractness 0.00, instability 0.27, distance 0.73 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
D23 · Boundary Type-Coupling · AccessGrants · ×1
  • AccessGrants: 10 contract type(s) expose producer-owned ids/enums — In AccessGrants, 10 contract type(s) (AccessGrantAccepted, AccessGrantIssued, AccessGrantRegistered, AccessGrantRegistryLinked, AccessGrantRegistryLinks, AccessGrantRevoked, AccessRequestResolved, AccessRequested, +2 more) expose strong-typed ids/value objects (AccessGrantId, AccessRequestId, RegistryGrantId, RegistryOrgId, UserId, VatId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Accounts · ×1
  • Accounts: 28 contract type(s) expose producer-owned ids/enums — In Accounts, 28 contract type(s) (AccountDeletionRequested, AccountDeletionWithdrawn, AccountErasureSubject, AccountExportSubject, CurrentUser, IChannelTest, ITeamReportSummary, ITermsAcceptance, +20 more) expose strong-typed ids/value objects (OrganizationId, TeamId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Admin · ×1
  • Admin: 1 contract type(s) expose producer-owned ids/enums — In Admin, 1 contract type(s) (UnconfiguredDetectorGapPublisher) expose strong-typed ids/value objects (IDetectorGapPublisher); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Agents · ×1
  • Agents: 24 contract type(s) expose producer-owned ids/enums — In Agents, 24 contract type(s) (AdvisoryFeedbackAcknowledged, AdvisoryFeedbackReported, AgentActivityRecorded, AgentMarkerIssueLinked, AgentOptInSet, AutomationKeyIssued, AutomationKeyRevoked, CauseDispositionDecided, +16 more) expose strong-typed ids/value objects (RepositoryId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Architecture · ×1
  • Architecture: 2 contract type(s) expose producer-owned ids/enums — In Architecture, 2 contract type(s) (ArchitectureFacts, ScanArchitectureRecorded) expose strong-typed ids/value objects (RepositoryId, ScanRunId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Billing · ×1
  • Billing: 55 contract type(s) expose producer-owned ids/enums — In Billing, 55 contract type(s) (AssayBalanceSettled, AssayBillingFacts, AssayBillingStreams, AssayChargeRecorded, AssayEntitlementBought, AssayReportOrderAwaitingPayment, AssayReportOrderBuilt, AssayReportOrderPaid, +47 more) expose strong-typed ids/value objects (IOrgSsoProvisioner, OrganizationId, RepositoryId, ScanRunId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Calibration · ×1
  • Calibration: 5 contract type(s) expose producer-owned ids/enums — In Calibration, 5 contract type(s) (CalibrationFacts, CalibrationTicketOpened, CalibrationTicketResolved, ExternalScannerIntegrationSet, ScannerComparisonRecorded) expose strong-typed ids/value objects (RepositoryId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Compliance · ×1
  • Compliance: 33 contract type(s) expose producer-owned ids/enums — In Compliance, 33 contract type(s) (ComplianceActivationPromptAcknowledged, ComplianceDeliveryMinter, ComplianceFacts, ComplianceFramework, ComplianceFrameworkModeSet, ComplianceScope, ConformanceControlAnswered, ConformanceDeclarationBegun, +25 more) expose strong-typed ids/value objects (FrameworkId, ProductId, ProfileId, RepositoryId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · DecisionReports · ×1
  • DecisionReports: 12 contract type(s) expose producer-owned ids/enums — In DecisionReports, 12 contract type(s) (DecisionReportAcceptanceBarRecorded, DecisionReportBuilt, DecisionReportContextRecorded, DecisionReportEvidenceFetched, DecisionReportFailed, DecisionReportRequested, DecisionReportSignedOff, IAcceptanceCriteriaBarReader, +4 more) expose strong-typed ids/value objects (DecisionReportId, PortfolioDecisionReportId, ProductId, RegistryDeliveryId, RegistryOrgId, SigningKeyId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Deliveries · ×1
  • Deliveries: 4 contract type(s) expose producer-owned ids/enums — In Deliveries, 4 contract type(s) (DeliveryAttributed, DeliveryMinted, DeliveryPublished, DeliverySigned) expose strong-typed ids/value objects (DeliveryId, RegistryDeliveryId, SigningKeyId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Gallery · ×1
  • Gallery: 4 contract type(s) expose producer-owned ids/enums — In Gallery, 4 contract type(s) (CommunityTagProposed, CommunityTagVetoSet, CommunityTagVoteCast, GalleryFacts) expose strong-typed ids/value objects (RepositoryId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Governance · ×1
  • Governance: 21 contract type(s) expose producer-owned ids/enums — In Governance, 21 contract type(s) (BarCompositionSet, BarDrafted, BarPublished, BarRetired, BarSuperseded, BindingCreated, BindingReasonAmended, BindingRepinnedToLatest, +13 more) expose strong-typed ids/value objects (BarId, BindingId, CustomerId, EngagementId, OrganizationId, ProductId, ProfileId, ScopeId, +1 more); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · IMessagePublisher · ×1
  • IMessagePublisher: 1 contract type(s) expose producer-owned ids/enums — In IMessagePublisher, 1 contract type(s) (IMessagePublisher) expose strong-typed ids/value objects (OrganizationId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · IPublishTargets · ×1
  • IPublishTargets: 1 contract type(s) expose producer-owned ids/enums — In IPublishTargets, 1 contract type(s) (IPublishTargets) expose strong-typed ids/value objects (OrganizationId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · ITeamChannelTest · ×1
  • ITeamChannelTest: 1 contract type(s) expose producer-owned ids/enums — In ITeamChannelTest, 1 contract type(s) (ITeamChannelTest) expose strong-typed ids/value objects (OrganizationId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Inbox · ×1
  • Inbox: 1 contract type(s) expose producer-owned ids/enums — In Inbox, 1 contract type(s) (IUserNotifications) expose strong-typed ids/value objects (RegistryOrgId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Ingestion · ×1
  • Ingestion: 10 contract type(s) expose producer-owned ids/enums — In Ingestion, 10 contract type(s) (ICapabilityGapRegistrar, IChangelogEntryIngestor, IChangelogFoldIngestor, IKnownNarrationsReader, IRunIngestor, IScanIngestedNotifier, IngestInput, IngestResult, +2 more) expose strong-typed ids/value objects (RepositoryId, ScanRunId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · LanguageTraining · ×1
  • LanguageTraining: 1 contract type(s) expose producer-owned ids/enums — In LanguageTraining, 1 contract type(s) (VerificationRunsWiped) expose strong-typed ids/value objects (VerificationRunsWiped); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Metrics · ×1
  • Metrics: 18 contract type(s) expose producer-owned ids/enums — In Metrics, 18 contract type(s) (CorpusOrigins, ICorpusOriginSource, ICorpusPopulationSource, IFindingHistory, IMetricsReader, IMetricsWriter, ISurveySecuritySource, MetricPointRecord, +10 more) expose strong-typed ids/value objects (RepositoryId, ScanRunId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Portfolios · ×1
  • Portfolios: 9 contract type(s) expose producer-owned ids/enums — In Portfolios, 9 contract type(s) (IProductDirectory, ProductArchived, ProductCreated, ProductInfo, ProductQualityBarSet, ProductRenamed, ProductRepositoryAdded, ProductRepositoryRemoved, +1 more) expose strong-typed ids/value objects (OrganizationId, ProductId, ProfileId, RepositoryId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Profiles · ×1
  • Profiles: 11 contract type(s) expose producer-owned ids/enums — In Profiles, 11 contract type(s) (AcceptanceCriteriaArchived, AcceptanceCriteriaDefined, AcceptanceCriteriaDeleted, AcceptanceCriteriaPublished, AcceptanceCriteriaShareRemoved, AcceptanceCriteriaShared, AcceptanceCriteriaStreams, CompiledProfile, +3 more) expose strong-typed ids/value objects (ProfileId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Reporting · ×1
  • Reporting: 10 contract type(s) expose producer-owned ids/enums — In Reporting, 10 contract type(s) (ChangelogDraftApproved, ChangelogFoldRecorded, DistillationFacts, DistillationRequested, ProductPublishTargetCleared, ProductPublishTargetSet, ProductReleaseApproved, ProductReleaseCut, +2 more) expose strong-typed ids/value objects (OrganizationId, ProductId, RepositoryId, ScanRunId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Repositories · ×1
  • Repositories: 60 contract type(s) expose producer-owned ids/enums — In Repositories, 60 contract type(s) (AdvisoryVisibilityChosen, ConnectionStreams, CorpusFacts, CorpusLanguageSet, CorpusRepositoryEnrolled, CorpusRotationSet, IAdvisoryVisibilityReader, IChangelogBaselineResolver, +52 more) expose strong-typed ids/value objects (ConnectionId, IEntraApplicationCredentials, OrganizationId, ProfileId, RepositoryId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Samples · ×1
  • Samples: 2 contract type(s) expose producer-owned ids/enums — In Samples, 2 contract type(s) (SampleRegistered, SampleRenamed) expose strong-typed ids/value objects (SampleId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Scans · ×1
  • Scans: 31 contract type(s) expose producer-owned ids/enums — In Scans, 31 contract type(s) (IDegradedRunRegistrar, IEnabledComplianceFrameworks, IRedeliverScanRuns, IRepoScheduleFactsReader, IRubricPinReader, IRunFootprintReader, IRunProgressReader, IRunTelemetryReader, +23 more) expose strong-typed ids/value objects (BundleKey, OrganizationId, RegistryOrgId, RepositoryId, ScanRunId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Scheduling · ×1
  • Scheduling: 25 contract type(s) expose producer-owned ids/enums — In Scheduling, 25 contract type(s) (CadenceFloor, EnqueueScan, FailedDispatchRow, IScanQueueReader, ISchedulePlacementActivator, IScheduleReader, InterruptedScanRow, QueueIssueRow, +17 more) expose strong-typed ids/value objects (RegistryOrgId, RepositoryId, ScanQueueEntryId, ScanRunId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Security · ×1
  • Security: 4 contract type(s) expose producer-owned ids/enums — In Security, 4 contract type(s) (IThreatModelStatusReader, SecurityFacts, ThreatModelDriftRecorded, ThreatModelReviewed) expose strong-typed ids/value objects (RepositoryId, ScanRunId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D23 · Boundary Type-Coupling · Teams · ×1
  • Teams: 24 contract type(s) expose producer-owned ids/enums — In Teams, 24 contract type(s) (ChangelogEntryRecorded, ChangelogEntrySuperseded, PublishTargetRemoved, PublishTargetSaved, ReportPublished, ReportPublishedStreams, RepositoryAssignedToTeam, RepositoryRemovedFromTeam, +16 more) expose strong-typed ids/value objects (OrganizationId, RepositoryId, ScanRunId, TeamId, UserId); a serialized contract could expose the underlying primitive instead. Advisory — a deliberate strong-ID style is fine.
D8 · Code Coverage · Coverage read from a committed report · ×1
  • Coverage read from a committed report — Line coverage 78.5% — read from a committed cobertura report (tools/train/backlog-sessions/01a092f6-f3c2-754f-b7f2-bd802ec4404a/specimen-cobertura-coverage.xml); the in-image collector couldn't run the suite (commonly external-service dependencies). A real measurement, but from a committed artifact rather than a fresh in-image run.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-915d88f165a04f21828b8744cdabb26f/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-915d88f165a04f21828b8744cdabb26f/tree.json --exit-code 0 --source .0—
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --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 engine/docs/methodology --exclude engine/tests/CodeHealth.Tests.Concepts/suites/documentation-accuracy/csharp/repo/docs/api --exclude engine/tests/CodeHealth.Tests.Concepts/suites/documentation-accuracy/typescript/repo/docs/api --exclude engine/tests/CodeHealth.Tests.Concepts/suites/documentation-quality/csharp/repo/docs/api --exclude engine/tests/CodeHealth.Tests.Concepts/suites/incomplete-implementation/csharp/repo/src/Kilnworks.Core/Generated --exclude engine/tests/CodeHealth.Tests.Concepts/suites/incomplete-implementation/typescript/repo/src/generated --exclude engine/tests/CodeHealth.Tests.Concepts/suites/knowledge-freshness/typescript/repo/src/generated --exclude engine/tests/CodeHealth.Tests.Concepts/suites/knowledge-freshness/typescript/repo/src/vendor --exclude engine/tests/CodeHealth.Tests.Concepts/suites/test-coverage/csharp/repo/src/Orchard.Harvest/Generated --exclude engine/tests/CodeHealth.Tests.Concepts/suites/unused-code/typescript/repo/apps/berth-portal/__registry__ --exclude src/Kennel.Assay.Core/Governance/Persistence/Migrations --exclude src/Kennel.Watchdog.Core/Trackers/Persistence/Migrations --exclude tools/train/backlog-sessions --exclude tools/train/sessions .20artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesdotnet—dotnet list engine/CodeHealth.sln package --vulnerable --include-transitive --format json1artifacts/raw/dotnet-vulnerable.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .3artifacts/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. semgrep could not parse 1425 file(s) — `deploy/schema-epoch-gate.cs`, `engine/sidecars/java-spoon/src/main/java/dev/canine/codehealth/java/Fallback.java`, `engine/sidecars/kotlin-frontend/src/main/kotlin/dev/canine/codehealth/kotlin/Tokenizer.kt`, `engine/sidecars/scala-frontend/src/main/scala/dev/canine/codehealth/scala/Discover.scala`, `engine/sidecars/scala-frontend/src/main/scala/dev/canine/codehealth/scala/Fallback.scala`, … (+1420 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a181f7-1982-7fca-8893-038c7182fff3 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Appendix C — Personal-data map

Every field, property and record parameter whose name is conventional personal data — 190 field(s) across 4 categories, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.

Email — 106 field(s)
  • PiiIdentity.Email engine/src/CodeHealth.Core/Dimensions/PiiIdentity.cs:18
  • CommitIdentityGraph._canonicalByEmail engine/src/CodeHealth.Toolchain/Git/CommitIdentityGraph.cs:46
  • GitHistoryCommit.Email engine/src/CodeHealth.Toolchain/Git/GitHistory.cs:77
  • BlameSegment.Email engine/src/CodeHealth.Toolchain/Git/IGitAccessor.cs:24
  • CommitInfo.Email engine/src/CodeHealth.Toolchain/Git/IGitAccessor.cs:37
  • MailmapIdentityMap._byEmail engine/src/CodeHealth.Toolchain/Git/MailmapIdentityMap.cs:15
  • MailmapIdentityMap._byNameAndEmail engine/src/CodeHealth.Toolchain/Git/MailmapIdentityMap.cs:16
  • DisclosurePolicyRules.PlaceholderEmailLocalParts engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyRules.cs:19
  • DisclosurePolicyRules.PlaceholderEmailDomainLabels engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyRules.cs:20
  • DisclosurePolicyRules.PlaceholderEmailTlds engine/src/Scanner/LlmJudgedLanguage/LA3/DisclosurePolicyRules.cs:21
  • StaffMemberRegistered.Email src/Kennel.Admin.Core/Admin/Domain/Events/AdminOpsFacts.cs:38
  • StaffMember.Email src/Kennel.Admin.Core/Admin/Domain/StaffMember.cs:24
  • AdminCustomer.Email src/Kennel.Admin.Core/Admin/Pages/AdminCustomers/AdminCustomersDocument.cs:213
  • AdminCustomerRow.Email src/Kennel.Admin.Core/Admin/Pages/AdminCustomers/AdminCustomersDocument.cs:418
  • AdminExamColleague.Email src/Kennel.Admin.Core/Admin/Pages/AdminExam/AdminExamDocument.cs:134
  • AdminExamRow.Email src/Kennel.Admin.Core/Admin/Pages/AdminExam/AdminExamDocument.cs:180
  • AdminFeedbackItem.SenderEmail src/Kennel.Admin.Core/Admin/Pages/AdminFeedback/AdminFeedbackDocument.cs:73
  • AdminPartnerCustomersMatch.OwnerEmail src/Kennel.Admin.Core/Admin/Pages/AdminPartnerCustomers/AdminPartnerCustomersDocument.cs:138
  • AdminPartnerHistorySettings.ContactEmail src/Kennel.Admin.Core/Admin/Pages/AdminPartnerHistory/AdminPartnerHistoryDocument.cs:102
  • AdminPartnerOverviewDocument.InvitedEmail src/Kennel.Admin.Core/Admin/Pages/AdminPartnerOverview/AdminPartnerOverviewDocument.cs:41
  • AdminPartnerSettingsDocument.ContactEmail src/Kennel.Admin.Core/Admin/Pages/AdminPartnerSettings/AdminPartnerSettingsDocument.cs:27
  • AdminPartnerSettingsDocument.LoginEmail src/Kennel.Admin.Core/Admin/Pages/AdminPartnerSettings/AdminPartnerSettingsDocument.cs:40
  • AdminPartnerSettingsDocument.InvitedEmail src/Kennel.Admin.Core/Admin/Pages/AdminPartnerSettings/AdminPartnerSettingsDocument.cs:47
  • AdminQuestionnairesPerson.Email src/Kennel.Admin.Core/Admin/Pages/AdminQuestionnaires/AdminQuestionnairesDocument.cs:266
  • AdminStaffColleague.Email src/Kennel.Admin.Core/Admin/Pages/AdminStaff/AdminStaffDocument.cs:82
  • AdminStaffLogin.Email src/Kennel.Admin.Core/Admin/Pages/AdminStaff/AdminStaffDocument.cs:108
  • TrainingCycleColleague.Email src/Kennel.Admin.Core/Admin/Pages/TrainingCycles/TrainingCyclesDocument.cs:194
  • StaffEntry.Email src/Kennel.Admin.Core/Admin/Services/AdminStaff.cs:21
  • StaffPerson.Email src/Kennel.Admin.Core/Admin/Services/AdminStaff.cs:43
  • AlertRecipient.Email src/Kennel.Admin.Core/Admin/Services/EstateAlert.cs:11
  • AlertResult.EmailsAccepted src/Kennel.Admin.Core/Admin/Services/EstateAlert.cs:18
  • PartnerDetailsForm.ContactEmail src/Kennel.Admin.Core/Admin/Services/PartnerConsoleService.cs:66
  • AcceptanceCriteriaShared.GranteeEmail src/Kennel.Assay.Core/Profiles/Domain/Events/AcceptanceCriteriaFacts.cs:46
  • ProfileShare.Email src/Kennel.Assay.Core/Profiles/Domain/ProfileShare.cs:25
  • AssayCriteriaShareLine.Email src/Kennel.Assay.Core/Profiles/Pages/AcceptanceCriteria/AssayCriteriaReader.cs:17
  • ProfileShareInput.Email src/Kennel.Assay.Core/Profiles/ProfilesModule.cs:478
  • ProfileShareRow.Email src/Kennel.Assay.Core/Profiles/Services/ProfileCatalogService.cs:34
  • ProfilesActor.Email src/Kennel.Assay.Core/Profiles/Ui/ProfilesUiSession.cs:36
  • AccessGrant.GranteeEmail src/Kennel.Core/AccessGrants/Domain/AccessGrant.cs:64
  • AccessRequest.RequesterEmail src/Kennel.Core/AccessGrants/Domain/AccessRequest.cs:47
  • + 66 more field(s) in this category.
Name — 74 field(s)
  • StaffMemberRegistered.FullName src/Kennel.Admin.Core/Admin/Domain/Events/AdminOpsFacts.cs:38
  • StaffMember.FullName src/Kennel.Admin.Core/Admin/Domain/StaffMember.cs:27
  • AdminCustomerRepository.FullName src/Kennel.Admin.Core/Admin/Pages/AdminCustomers/AdminCustomersDocument.cs:410
  • AdminExamColleague.FullName src/Kennel.Admin.Core/Admin/Pages/AdminExam/AdminExamDocument.cs:136
  • AdminExamRow.FullName src/Kennel.Admin.Core/Admin/Pages/AdminExam/AdminExamDocument.cs:180
  • AdminStaffColleague.FullName src/Kennel.Admin.Core/Admin/Pages/AdminStaff/AdminStaffDocument.cs:84
  • TrainingCycleColleague.FullName src/Kennel.Admin.Core/Admin/Pages/TrainingCycles/TrainingCyclesDocument.cs:196
  • StaffEntry.FullName src/Kennel.Admin.Core/Admin/Services/AdminStaff.cs:22
  • StaffPerson.FullName src/Kennel.Admin.Core/Admin/Services/AdminStaff.cs:44
  • ManifestRepo.FullName src/Kennel.Admin.Core/Admin/Services/CorpusOnboardingService.cs:274
  • OrgRepoOutcome.FullName src/Kennel.Admin.Core/Admin/Services/OrgEstateService.cs:65
  • AssayPlanVisibleRepository.FullName src/Kennel.Assay.Core/Billing/Pages/Plan/AssayPlanDocument.cs:262
  • AssayProductHead.MemberFullNames src/Kennel.Assay.Core/DecisionReports/Pages/AssayProductReports/AssayProductReportsDocument.cs:78
  • AssayProductMemberCard.FullName src/Kennel.Assay.Core/DecisionReports/Pages/AssayProductReports/AssayProductReportsReader.cs:14
  • AssayReportsDocument.FullName src/Kennel.Assay.Core/DecisionReports/Pages/AssayReports/AssayReportsDocument.cs:90
  • AssayReportsOwnedCard.FullName src/Kennel.Assay.Core/DecisionReports/Pages/AssayReports/AssayReportsReader.cs:20
  • GovernanceControl.FullName src/Kennel.Assay.Core/Governance/Domain/GovernancePosture.cs:46
  • AssayGovernanceDocument.FullName src/Kennel.Assay.Core/Governance/Pages/AssayGovernance/AssayGovernanceDocument.cs:64
  • AssayRepositoryChoice.FullName src/Kennel.Assay.Core/Governance/Pages/AssayGovernance/AssayGovernanceReader.cs:40
  • AssayRepository.FullName src/Kennel.Assay.Core/Governance/ReadModels/AssayOrgFold.cs:127
  • ShareableRepository.FullName src/Kennel.Core/AccessGrants/ReadModels/CustomersReadModel.cs:21
  • ScvsRequirement.FamilyName src/Kennel.Core/Compliance/Catalog/ScvsCatalog.cs:72
  • DeliveryItem.RepositoryFullName src/Kennel.Core/Compliance/Contracts/Domain/ContractModel.cs:297
  • ProductComplianceMember.FullName src/Kennel.Core/Compliance/Pages/ProductCompliance/ProductComplianceDocument.cs:90
  • RepoComplianceDocument.FullName src/Kennel.Core/Compliance/Pages/RepoCompliance/RepoComplianceDocument.cs:29
  • RunReviewerStated.FullName src/Kennel.Core/LanguageTraining/Domain/Events/ProgrammeFacts.cs:141
  • RunReviewer.FullName src/Kennel.Core/LanguageTraining/Domain/RunReviewer.cs:57
  • ReviewerRequest.FullName src/Kennel.Core/LanguageTraining/Services/RunReviewService.cs:12
  • PortfolioIdentity.FullName src/Kennel.Core/Portfolios/Aggregation/PortfolioAggregation.cs:34
  • PortfolioRepo.FullName src/Kennel.Core/Portfolios/Aggregation/PortfolioAggregation.cs:46
  • RepoCard.FullName src/Kennel.Core/Portfolios/Dashboard/RepoCard.cs:20
  • PortfolioRepository.FullName src/Kennel.Core/Portfolios/Pages/Portfolio/PortfolioDocument.cs:174
  • ProductDetailMember.FullName src/Kennel.Core/Portfolios/Pages/ProductDetail/ProductDetailDocument.cs:81
  • ProductDetailRow.FullName src/Kennel.Core/Portfolios/Pages/ProductDetail/ProductDetailDocument.cs:92
  • ProductRepositoriesDocument.FullName src/Kennel.Core/Portfolios/Pages/ProductRepositories/ProductRepositoriesDocument.cs:51
  • PickerRow.FullName src/Kennel.Core/Portfolios/Pages/ProductRepositories/ProductRepositoriesDocument.cs:176
  • ProductsRepository.FullName src/Kennel.Core/Portfolios/Pages/Products/ProductsDocument.cs:108
  • RepositoryInfo.FullName src/Kennel.Core/Repositories/Contracts/IRepositoryDirectory.cs:19
  • Repository.FullName src/Kennel.Core/Repositories/Domain/Repository.cs:44
  • FoundRepository.FullName src/Kennel.Core/Repositories/Pages/FindRepository/FindRepositoryDocument.cs:125
  • + 34 more field(s) in this category.
Government ID (SSN / passport / tax) — 5 field(s)
  • AdminPartnerHistorySettings.TaxId src/Kennel.Admin.Core/Admin/Pages/AdminPartnerHistory/AdminPartnerHistoryDocument.cs:104
  • AdminPartnerSettingsDocument.TaxId src/Kennel.Admin.Core/Admin/Pages/AdminPartnerSettings/AdminPartnerSettingsDocument.cs:29
  • PartnerDetailsForm.TaxId src/Kennel.Admin.Core/Admin/Services/PartnerConsoleService.cs:66
  • PartnerDetailsSet.TaxId src/Kennel.Core/Billing/Domain/Events/PartnerFacts.cs:46
  • Partner.TaxId src/Kennel.Core/Billing/Domain/Partner.cs:71
Phone — 5 field(s)
  • StaffMemberRegistered.Phone src/Kennel.Admin.Core/Admin/Domain/Events/AdminOpsFacts.cs:38
  • StaffMember.Phone src/Kennel.Admin.Core/Admin/Domain/StaffMember.cs:39
  • AdminStaffColleague.Phone src/Kennel.Admin.Core/Admin/Pages/AdminStaff/AdminStaffDocument.cs:92
  • StaffEntry.Phone src/Kennel.Admin.Core/Admin/Services/AdminStaff.cs:26
  • StaffPerson.Phone src/Kennel.Admin.Core/Admin/Services/AdminStaff.cs:48

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