Public report — SageFs, published 3 Oct 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.10.1 (frozen) · verify this survey Filed cd_71ab738ee6304300bdb7f829353bff0f Filed 3 October 2026, 01:35 UTC Public

WillEhrendreich/SageFs

Measured 3 October 2026, 01:22 UTC

52% Adequate
CriticalWeakAdequateStrongExemplary

Large · 193,062 LoC · 3 projects · rebuild ~3.3 person-years · weakest lens: Readiness (42%)

Findings by grade

649 critical 665 serious 19 minor 7 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
3 October 2026, 01:22 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

75/80dimensions tool-verifieddeterministic · confidence 1.0 · 5 LLM-assisted, advisory
1306findings with an exact file:lineof 1333 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
80/136dimensions across the health lenses193062 LoC · 3 projects — wide & deep
Chapters

Executive summary

Preview (pre-1.0). This repo hasn't declared a stable release, so it's judged against a relaxed, pre-production bar.

This large, critical asset scores 52%, indicating a system that functions but carries significant operational risk. With nearly 200,000 lines of production code and a rebuild cost of approximately €480,000, the business has substantial value tied up here. The primary concern is not the code’s structure, which is relatively sound, but its readiness for production. The system lacks the safety nets required to handle failures gracefully, meaning that while it works today, it is fragile under stress or during unexpected outages.

The most pressing issue is operational fragility. The system’s readiness score is low, reflecting a lack of tested disaster recovery procedures and insufficient test coverage for key modules. A backup configuration is not a recovery plan; without documented recovery time objectives and verified restore processes, a failure could lead to prolonged downtime and data loss. This gap exposes the business to severe reliability risks, as the team cannot guarantee service continuity in a crisis. The cost of this neglect is high, with every change potentially costing 12–28% more due to poor code quality, creating a compounding tax on development velocity.

Conversely, the architecture is strong, with clear boundaries and low complexity in the core logic. This structural integrity means that adding new features is not inherently difficult, provided the team can navigate the operational gaps. The code is largely straightforward, with minimal branching, which simplifies understanding for new engineers. However, this architectural strength is undermined by the lack of automated quality gates and incomplete documentation, which slows down onboarding and increases the likelihood of introducing defects.

The highest-leverage action is to document and test the disaster recovery procedure. This single step costs a small fraction of the annual drag caused by technical debt and pays for itself within months. It addresses the most critical risk to business continuity. Once this is in place, the team should focus on adding tests for unreached modules and integrating automated linting into the CI pipeline. These steps will stabilize the system and reduce the long-term cost of change. The picture is partial, as several areas like performance and security were not measured, but the current risks are clear enough to act on immediately.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Readiness 42% · 47% weightCode Health 49% · 26% weightSecurity 63% · 14% weightMaturity 78% · 8% weightArchitecture 87% · 4% weight

Raise Readiness 42 → 70 (the Healthy floor) ⇒ headline 52 → ~60.

Code composition — where the lines go
Business logic 2%Plumbing 2%Tests 97%
New since the last scan (100+)

338 finding(s) are new versus the previous scan (2026-09-17) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D1 · SessionManager.createWithAlarm (cyclomatic 190) SageFs.Core/SessionManager.fs
  • D1 · SageFsEffectHandler.execute (cyclomatic 142) SageFs/SageFsEffectHandler.fs
  • D1 · Cohort.decideRaw (cyclomatic 127) SageFs.Core/Cohort.fs
  • D1 · Program.run (cyclomatic 101) SageFs.FsiHost/Program.fs
  • D1 · DeltaChain.write (cyclomatic 86) SageFs.Core/Features/MetadataDelta/DeltaWriter.fs
  • D1 · GenericReload.reach (cyclomatic 80) SageFs.Core/Middleware/GenericReload.fs
  • D1 · ReflectionReadSim.runWith (cyclomatic 77) SageFs.Simulation/ReflectionReadSim.fs
  • D1 · MethodDiff.diff (cyclomatic 72) SageFs.Core/Features/MetadataDelta/MethodDiff.fs
  • D1 · WorkerHttpTransport.startServerWithShutdown (cyclomatic 72) SageFs.Host/WorkerHttpTransport.fs
  • D1 · DeltaRouteSim.step (cyclomatic 60) SageFs.Simulation/DeltaRouteSim.fs
  • D1 · ValueReadSim.runWith (cyclomatic 56) SageFs.Simulation/ValueReadSim.fs
  • D1 · TestCycleEffects.decideAfterTypeCheck (cyclomatic 55) SageFs.Core/Features/LiveTestingCycle.fs
  • D1 · CapabilitySim.step (cyclomatic 46) SageFs.Simulation/CapabilitySim.fs
  • D1 · IlCanon.canonicalize (cyclomatic 45) SageFs.Core/Features/MetadataDelta/IlCanon.fs
  • D1 · HotReloadCore.applyDetourPlan (cyclomatic 41) SageFs.Core/Middleware/HotReloadCore.fs
  • D1 · DaemonMode.createSessionOpsWithRecovery (cyclomatic 39) SageFs/DaemonMode.fs
  • D1 · WorkerStartup.await (cyclomatic 36) SageFs.Core/WorkerStartup.fs
  • D1 · FsiProtocol.readValue (cyclomatic 33) SageFs.FsiHost/FsiProtocol.fs
  • D1 · WorkerMain.handleMessage (cyclomatic 33) SageFs.Host/WorkerMain.fs
  • D1 · DashboardFragments.renderHotReloadPanelFull (cyclomatic 32) SageFs/DashboardFragments.fs
  • D1 · SgrModule.ofParams (cyclomatic 31) scripts/lemmings/ui/nvim/Ansi.fs
  • D1 · GuardSim.step (cyclomatic 30) SageFs.Simulation/GuardSim.fs
  • D1 · ValueReads.fateAt (cyclomatic 28) SageFs.Core/Middleware/ValueReads.fs
  • D1 · ProjectFSharpCoreIdentity.rewriteReferenceWith (cyclomatic 28) SageFs.Core/IsolatedFsiSession.fs
  • D1 · Evaluator.RunGuarded (cyclomatic 28) SageFs.Core/Features/MemberEvaluation.fs
  • D1 · McpStdioBridge.run (cyclomatic 28) SageFs/McpStdioBridge.fs
  • D1 · Ansi.tokenize (cyclomatic 28) scripts/lemmings/ui/nvim/Ansi.fs
  • D1 · Nvim.parseShellCommand (cyclomatic 27) scripts/lemmings/ui/nvim/Nvim.fs
  • D1 · onmessage (cyclomatic 27) SageFs/Resources/devreload.js
  • D1 · onmessage (cyclomatic 27) SageFs.Host/Resources/devreload.js
  • D1 · GenericReload.sharedStub (cyclomatic 26) SageFs.Core/Middleware/GenericReload.fs
  • D1 · IsolatedFsiSession.start (cyclomatic 26) SageFs.Core/IsolatedFsiSession.fs
  • D1 · FsiHostClient.start (cyclomatic 26) SageFs.Core/FsiHostClient.fs
  • D1 · TrunkFollow.step (cyclomatic 26) SageFs.Core/Features/TrunkFollow.fs
  • D1 · CoreEvidence.inspectProject (cyclomatic 26) SageFs.Core/CoreEvidence.fs
  • D1 · ReadyWaitSim.apply (cyclomatic 26) SageFs.Simulation/ReadyWaitSim.fs
  • D1 · DashboardFragments.renderLiveBindingsPanel (cyclomatic 26) SageFs/DashboardFragments.fs
  • D1 · IsolatedFsiSession.planHost (cyclomatic 25) SageFs.Core/IsolatedFsiSession.fs
  • D1 · SessionBuild.runBuildAsync (cyclomatic 25) SageFs.Core/SessionBuild.fs
  • D1 · ValueReads.decode (cyclomatic 24) SageFs.Core/Middleware/ValueReads.fs
  • D1 · LiveValueTree.walkWithin (cyclomatic 24) SageFs.Core/Features/LiveValueTree.fs
  • D1 · ShapeMigration.migrate (cyclomatic 24) SageFs.Core/ShapeMigration.fs
  • D1 · HygieneSim.applyOp (cyclomatic 24) SageFs.Simulation/HygieneSim.fs
  • D1 · NvimTour.parseLine (cyclomatic 24) scripts/lemmings/ui/nvim/NvimTour.fs
  • D1 · LiveTestCycleStateModule.handleFcsResult (cyclomatic 23) SageFs.Core/Features/LiveTestingCycle.fs
  • D1 · TweakTransaction.step (cyclomatic 23) SageFs.Core/Features/Tweak/TweakTransaction.fs
  • D1 · GuardReachability.walk (cyclomatic 23) SageFs.Core/Features/GuardReachability.fs
  • D1 · LiveValueTree.decode (cyclomatic 23) SageFs.Core/Features/LiveValueTree.fs
  • D1 · MachineProbeReader.storageOf (cyclomatic 23) SageFs.Core/MachineProfile.fs
  • D1 · Session.Save (cyclomatic 23) SageFs.Host/RunAppDelta.fs
  • D1 · TweakSim.step (cyclomatic 23) SageFs.Simulation/TweakSim.fs
  • D1 · TrunkFollowSim.runOp (cyclomatic 22) SageFs.Simulation/TrunkFollowSim.fs
  • D1 · WorkflowSwitchSim.step (cyclomatic 22) SageFs.Simulation/WorkflowSwitchSim.fs
  • D1 · HotReloadCore.handleNewAsmFromRepl (cyclomatic 21) SageFs.Core/Middleware/HotReloadCore.fs
  • D1 · ValueReadTracking.reflectionSitesOf (cyclomatic 21) SageFs.Core/Middleware/ValueReadTracking.fs
  • D1 · IlCanon.sameWithoutLooking (cyclomatic 21) SageFs.Core/Features/MetadataDelta/IlCanon.fs
  • D1 · PatchConfirmationSim.step (cyclomatic 21) SageFs.Simulation/PatchConfirmationSim.fs
  • D1 · McpCohortIntegration.setIntegrationRef (cyclomatic 21) SageFs/McpCohortIntegration.fs
  • D1 · ValueReadTracking.walk (cyclomatic 20) SageFs.Core/Middleware/ValueReadTracking.fs
  • D1 · EvalActorDecision.decide (cyclomatic 20) SageFs.Core/EvalActorDecision.fs
  • D1 · ReloadOutcomeModule.describe (cyclomatic 20) SageFs.Core/Features/ReloadOutcome.fs
  • D1 · LiveValueTree.classifyGetter (cyclomatic 20) SageFs.Core/Features/LiveValueTree.fs
  • D1 · HolderRewrite.classify (cyclomatic 20) SageFs.Core/HolderRewrite.fs
  • D1 · ExpectoExecutor.runReflectedBody (cyclomatic 19) SageFs.Core/Features/LiveTestingExecutors.fs
  • D1 · CoverageBitmapModule.narrowByLines (cyclomatic 19) SageFs.Core/Features/LiveTestingTypes.fs
  • D1 · ExpensiveWorkLease.requestCore (cyclomatic 19) SageFs.Core/ExpensiveWorkLease.fs
  • D1 · CompileOrderInsight.analyzeWithReferences (cyclomatic 19) SageFs.Core/CompileOrderInsight.fs
  • D1 · HolderRewriteSim.unsafeOf (cyclomatic 19) SageFs.Simulation/HolderRewriteSim.fs
  • D1 · SageFsTools.set_reflection_read_mode (cyclomatic 19) SageFs/McpTools.fs
  • D1 · HygieneEdge.removeWorktree (cyclomatic 19) SageFs/HygieneEdge.fs
  • D1 · HotReloadCore.getAllMethods (cyclomatic 18) SageFs.Core/Middleware/HotReloadCore.fs
  • D1 · SafeDirectoryWalk.walkFiles (cyclomatic 18) SageFs.Core/SafeDirectoryWalk.fs
  • D1 · MemoryShedSim.scenarioOf (cyclomatic 18) SageFs.Simulation/MemoryShedSim.fs
  • D1 · LiveCheckPumpSim.runOp (cyclomatic 18) SageFs.Simulation/LiveCheckPumpSim.fs
  • D1 · SageFsTools.send_fsharp_code (cyclomatic 18) SageFs/McpTools.fs
  • D1 · McpAnalysisViews.suggestRepairJson (cyclomatic 18) SageFs/McpAnalysisViews.fs
  • D1 · HygieneGather.readProcesses (cyclomatic 18) SageFs/HygieneGather.fs
  • D1 · LiveCheckPump.step (cyclomatic 17) SageFs.Core/Features/LiveCheckPump.fs
  • D1 · SideEffectClass.classify (cyclomatic 17) SageFs.Core/Features/Tweak/SideEffectClass.fs
  • D1 · FsiProtocol.writeValue (cyclomatic 17) SageFs.FsiHost/FsiProtocol.fs
  • D1 · HostAgent.afterEvalStep (cyclomatic 17) SageFs.Core/HostAgent.fs
  • D1 · RuntimeCompat.parseRuntimeRequirement (cyclomatic 17) SageFs.Core/RuntimeCompat.fs
  • D1 · AppRunner.resolveProjectAssembly (cyclomatic 17) SageFs.Host/AppRunner.fs
  • D1 · MemoryShedSim.step (cyclomatic 17) SageFs.Simulation/MemoryShedSim.fs
  • D1 · HotReloadCore.planGenericWork (cyclomatic 16) SageFs.Core/Middleware/HotReloadCore.fs
  • D1 · ValueReads.localUse (cyclomatic 16) SageFs.Core/Middleware/ValueReads.fs
  • D1 · CohortStatusText.render (cyclomatic 16) SageFs.Core/Features/CohortStatusText.fs
  • D1 · CoverageBitmapModule.coveringTestsByLine (cyclomatic 16) SageFs.Core/Features/LiveTestingTypes.fs
  • D1 · ReloadPlanning.planReload (cyclomatic 16) SageFs.Core/Features/ReloadPlanning.fs
  • D1 · GuardReachability.implementationsIn (cyclomatic 16) SageFs.Core/Features/GuardReachability.fs
  • D1 · SessionHealthModule.classify (cyclomatic 16) SageFs.Core/SessionHealth.fs
  • D1 · WorkerSpawn.startWorkerProcess (cyclomatic 16) SageFs.Core/WorkerSpawn.fs
  • D1 · Planner.stepOf (cyclomatic 16) SageFs.Core/WorkspaceHygiene.fs
  • D1 · Executor.operationsFor (cyclomatic 16) SageFs.Core/WorkspaceHygiene.fs
  • D1 · WorkerConfigModule.fromEnvironmentWith (cyclomatic 16) SageFs.Core/Args.fs
  • D1 · SourceStateSim.decideWith (cyclomatic 16) SageFs.Simulation/SourceStateSim.fs
  • D1 · WorkerReloadRelay.start (cyclomatic 16) SageFs/WorkerReloadRelay.fs
  • D1 · PanelVisibilityModule.decide (cyclomatic 16) SageFs/DashboardTypes.fs
  • D1 · TrunkFollowShell.move (cyclomatic 16) SageFs/TrunkFollowShell.fs
  • D1 · Answer.planRipple (cyclomatic 16) SageFs/McpAnalysis.fs

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €160,000–€790,000
Cost to rebuild€160,000–€790,000 (1.6–5.0 person-years (2,633–8,361 h), ~1–7 engineers)
Domain complexityHigh — harder problems cost more per line
Quality factor0.7× (at 52% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified for 185,840 line(s) outside the .NET model (the tier breakdown is a C#-only syntax walk)
Effort basisThe rebuild estimate prices 192,305 code lines. Comment-only lines count toward the 193,062-line size but are not build effort.

This codebase represents roughly ~3.3 person-years of build effort (about ~€480,000 to rebuild). Its weakest lens is Readiness at 42% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain High (×1.3) — desktop/game, vertical slice, high decision density × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
+10.4 pts · Medium effort · DR & Backup
2
Add tests that import the unreached modules (directly or through their public entry).
+10.4 pts · Medium effort · Test Coverage
3
Resolve the 2 NoWarnInCsproj finding(s) in Explicit Debt — start with Directory.Build.props (2).
+4.5 pts · Low effort · Explicit Debt

Diagnosis — what's actually going on

Value concentrated against a weak lens · High · Value at risk
This is a Large asset (~3.3 person-years to rebuild), and its weakest lens is Readiness at 42%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~3.3 person-years rebuild (193,062 LoC) · weakest lens: Readiness 42%
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
A velocity tax on every change · High · Economics
The code-quality signals (complexity, duplication, cohesion) average 3.1/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 12–28% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2 code quality: averaging 3.1/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 496.6–2979.7 engineer-days every year, paid as drag on the ~1,623,289 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 12–28% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 400,263 line(s) changed over a 90-day window ⇒ ~1,623,289/year · D1/D2 code quality: averaging 3.1/10 ⇒ a 12–28% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery). The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).

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 ctx:SageFs SageFs 1 project ctx:Core Core 1 project ctx:SageFs->ctx:Core ctx:Host Host 1 project ctx:SageFs->ctx:Host ctx:Gui Gui 1 project ctx:Gui->ctx:Core ctx:Host->ctx:Core ctx:Simulation Simulation 1 project ctx:Simulation->ctx:Core __more__ +7 more contexts

Architecture — module dependency matrix

Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

1088 modules, 1495 dependencies. 2 dependency cycles across 20 modules, marked above the diagonal.

Showing the 40 most-connected modules; 1048 more are not drawn.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 Cohort2 Features.CellDependencyGraph3 Features.FrictionTelemetryTypes4 Features.MetadataDelta5 Features.Tweak.TweakLog6 JupyterKernel7 MemberTable8 Middleware.ValueReads9 Utils10 WorkflowTypes11 WorkspaceHygiene12 Args13 Capability14 Features.FeatureHooks15 Features.LiveTesting16 Features.ObservedFrictionTypes17 Features.ReloadPlanning18 Features19 Features.Diagnostics20 Features.Verification21 HostAgent22 ProjectLoading23 SseWriter24 AppRun25 Features.ReloadOutcome26 FsiHost.FsiProtocol27 FsiSession28 WorkerProtocol29 SageFs30 Affordances31 FsiHostClient32 RestartPolicy33 AppState34 McpTools35 Server.DashboardTypes36 SessionManager37 Simulation.Scenario38 Server.DaemonMode39 Server.DashboardFragments40 Server.McpServer
1 Cohort
2 Features.CellDependencyGraph
3 Features.FrictionTelemetryTypes
4 Features.MetadataDelta
5 Features.Tweak.TweakLog
6 JupyterKernel
7 MemberTable
8 Middleware.ValueReads
9 Utils
10 WorkflowTypes
11 WorkspaceHygiene
12 Args123
13 Capability64
14 Features.FeatureHooks2
15 Features.LiveTesting4
16 Features.ObservedFrictionTypes5
17 Features.ReloadPlanning11
18 Features22
19 Features.Diagnostics2
20 Features.Verification1
21 HostAgent4115
22 ProjectLoading111
23 SseWriter8119
24 AppRun225
25 Features.ReloadOutcome11
26 FsiHost.FsiProtocol32163
27 FsiSession6451311
28 WorkerProtocol151248
29 SageFs11412333114
30 Affordances22
31 FsiHostClient32684
32 RestartPolicy1
33 AppState1151172
34 McpTools2111211124111
35 Server.DashboardTypes132225101
36 SessionManager222811112
37 Simulation.Scenario211
38 Server.DaemonMode1111269213
39 Server.DashboardFragments61223111513
40 Server.McpServer2132212462
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
SageFs.Cohort…s.CellDependencyGraph…rictionTelemetryTypes…eatures.MetadataDelta…atures.Tweak.TweakLogSageFs.JupyterKernelSageFs.MemberTable…Middleware.ValueReadsSageFs.UtilsSageFs.WorkflowTypes…geFs.WorkspaceHygieneSageFs.ArgsSageFs.Capability…Features.FeatureHooks….Features.LiveTesting…ObservedFrictionTypes…atures.ReloadPlanningSageFs.Features….Features.Diagnostics…Features.VerificationSageFs.HostAgentSageFs.ProjectLoadingSageFs.SseWriterSageFs.AppRun…eatures.ReloadOutcome…s.FsiHost.FsiProtocolSageFs.FsiSessionSageFs.WorkerProtocolSageFsSageFs.AffordancesSageFs.FsiHostClientSageFs.RestartPolicySageFs.AppStateSageFs.McpTools…Server.DashboardTypesSageFs.SessionManager…s.Simulation.Scenario…eFs.Server.DaemonMode…er.DashboardFragments…geFs.Server.McpServerSageFs.Cohort1…s.CellDependencyGraph2…rictionTelemetryTypes3…eatures.MetadataDelta4…atures.Tweak.TweakLog5SageFs.JupyterKernel6SageFs.MemberTable7…Middleware.ValueReads8SageFs.Utils9SageFs.WorkflowTypes10…geFs.WorkspaceHygiene11SageFs.Args12SageFs.Capability13…Features.FeatureHooks14….Features.LiveTesting15…ObservedFrictionTypes16…atures.ReloadPlanning17SageFs.Features18….Features.Diagnostics19…Features.Verification20SageFs.HostAgent21SageFs.ProjectLoading22SageFs.SseWriter23SageFs.AppRun24…eatures.ReloadOutcome25…s.FsiHost.FsiProtocol26SageFs.FsiSession27SageFs.WorkerProtocol28SageFs29SageFs.Affordances30SageFs.FsiHostClient31SageFs.RestartPolicy32SageFs.AppState33SageFs.McpTools34…Server.DashboardTypes35SageFs.SessionManager36…s.Simulation.Scenario37…eFs.Server.DaemonMode38…er.DashboardFragments39…geFs.Server.McpServer401236424511222141151118119225113216364513111512481141233311422326841115117221112111241111322251012228111122111111269213612231115132132212462+1048 more modules (most-connected shown)

At a glance — Code Health · 49% · Adequate · gated by D1, D2, R1 ·

At a glance — Architecture · 87% · Strong ·

At a glance — Maturity · 78% · Strong ·

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

At a glance — Security · 63% · Adequate · gated by D28, D36 ·

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
A02:2021 — Cryptographic Failures617High / Critical
A03:2021 — Injection16High / Critical
A06:2021 — Vulnerable & Outdated Components6High / Critical
A05:2021 — Security Misconfiguration1High / Critical

Roadmap

First, establish a tested disaster recovery plan by documenting RTO/RPO and restore procedures, as backups alone are insufficient. Next, improve reliability by adding tests for unreached modules, integrating linting into CI, migrating remaining JavaScript files to TypeScript, and fixing the twelve instances where exceptions are silently swallowed.

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

Do thisHelpsEffortDimension
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+10.4 ptsMediumDR & Backup
Add tests that import the unreached modules (directly or through their public entry).+10.4 ptsMediumTest Coverage
Resolve the 2 NoWarnInCsproj finding(s) in Explicit Debt — start with Directory.Build.props (2).+4.5 ptsLowExplicit Debt
Resolve the 4 EmptyCatchBlock finding(s) in Explicit Debt — start with DensityModeHelper.cs, InlineEvalAdornment.cs, InlineFailureAdornment.cs.+4.5 ptsLowExplicit Debt
Resolve the 7 WriteOnlyPrivateField finding(s) in Explicit Debt — start with LiveTestingCommands.cs (2), StatusBarManager.cs, HotReloadData.cs.+4.5 ptsLowExplicit Debt
Add eslint as package.json scripts and run them in CI.+8.7 ptsMediumTooling
Migrate the remaining .js/.jsx files to TypeScript.+7.0 ptsMediumType Safety
Swallowed exception (caught, then discarded)+6.9 ptsMediumException handling

File quality

Per-file score 0–10 — a quality signature. Of 186 files carrying findings, judged against the Preview bar: 2% slop · 6% mixed · 92% near-clean.

FileScoreBandWorst signal
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
sagefs-vs/SageFs.VisualStudio/StatusBar/StatusBarManager.cs5.4MixedExplicit Debt: WriteOnlyPrivateField
SageFs/Editor.fs5.7MixedCyclomatic Complexity: EditorUpdate.update (cyclomatic 83)
sagefs-vs/SageFs.VisualStudio.Editor/InlineEvalAdornment.cs5.8MixedExplicit Debt: EmptyCatchBlock
sagefs-vs/SageFs.VisualStudio.Editor/InlineFailureAdornment.cs5.8MixedExplicit Debt: EmptyCatchBlock
SageFs/DaemonClient.fs5.9MixedCyclomatic Complexity: DaemonClient.parseStateEvent (cyclomatic 19)
sagefs-vs/SageFs.VisualStudio/Commands/CellNavigationCommands.cs6.0MixedExplicit Debt: BarePragmaDisable repeated across 16 files
sagefs-vs/SageFs.VisualStudio/Commands/LiveTestingCommands.cs6.4MixedExplicit Debt: WriteOnlyPrivateField
Directory.Build.props6.4MixedExplicit Debt: NoWarnInCsproj
sagefs-vs/SageFs.VisualStudio/Services/TestDiagnosticsBridge.cs6.7MixedExplicit Debt: BarePragmaDisable
SageFs/DashboardFragments.fs7.0Near-cleanCyclomatic Complexity: DashboardFragments.renderSessionsForSession (cyclomatic 90)
SageFs/McpServer.fs7.0Near-cleanCyclomatic Complexity: McpServer.mapSessionRoutes (cyclomatic 84)
SageFs/Dashboard.fs7.0Near-cleanCyclomatic Complexity: Dashboard.createStreamHandler (cyclomatic 81)
SageFs.Core/Features/LiveValueTree.fs7.0Near-cleanCyclomatic Complexity: LiveValueTree.buildNode (cyclomatic 65)
SageFs/Mcp.fs7.0Near-cleanCyclomatic Complexity: McpTools.resolveSessionId (cyclomatic 31)
SageFs.Core/Features/LiveTestingTypes.fs7.0Near-cleanCyclomatic Complexity: TriviaNormalization.normalize (cyclomatic 30)

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

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

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

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

Could not be resolved — 7

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

Methodology & how to trust this report

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

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

What we checked — 80 dimensions across the health lenses
D1D2D3D5D7D9D10D13D14D15D17D19D20D21D24D26D28D29D30D31D34D35D36D43D44AX1AX10AX2AX3AX5AX6AX7AX8GD1IC1M1M2M3M4P1P10P3P4P5P6R1R10R2R3R4R5R6R7R8R9X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X32X4X5

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, 1306 of 1333 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 measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a0ff5b-3494-7eaf-b7dc-8086f931fc39.

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

Run transparency — what happened this run

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

  • D4 Code Duplication — not measured this run — 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. Code Duplication couldn't be assessed within its 11-minute budget on a solution this large — not included in this run.
  • D6 Cohesion (LCOM4) — 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's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • 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 142 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 898 test source file(s) (.fs, .ts) 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.
  • D11 Test Reliability — 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. Test reliability not scored — the test tier(s) ran but surfaced none of this repository's 142 test method(s) to the runner, so flakiness couldn't be exercised. This is an analysis-environment limitation, not a finding about the tests.
  • D12 Dependency Hygiene — 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 repository has NuGet-managed production source (.cs, .fs), whose `<PackageReference>` dependencies are exactly what this dimension assesses — but `dotnet list package` returned no packages, so there was nothing to assess. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED. This is a gap in the analysis run (restore or project-load failed), not a verdict about this repository. Dependencies declared for the other ecosystems present here (.fs, .lua, .ts) are not read yet either.
  • 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 scripts/lemmings/ui/nvim/Nvim.fs, SageFs/DashboardFragments.fs, SageFs/DashboardTypes.fs, SageFs/Dashboard.fs, SageFs.Core/SessionManager.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-contributor repository — bus factor is not applicable (1 contributor(s) across 3139 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so 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 36 deducted marker(s) and the 2.8/KLoC density on this row were taken over this repository's .NET projects ALONE: .fs (184,051 lines, 96% of production source) went unread, because every marker collector on this path is reached through a C# workspace. D17's marker collectors need a compiler we do not have for that language, so none of its nine marker kinds were read there. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
  • D22 Internal API Consistency — 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. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
  • D23 Boundary Type-Coupling — 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. At 200k LoC across three projects this is a large multi-module system that clearly needs explicit bounded contexts. Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D27 Navigability — evaluation did not complete — Navigability not included (check did not complete) — excluded from the score.
  • D28 Secrets (history) — 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. Secrets (history) ran out of its 6-minute budget before it had finished, so what it reports here is a floor rather than a complete count. The rows above are real and stand; what is not known is how many more there are. This is a limit of the analysis run, not a finding about this repository.
  • D30 Dependency Vulnerabilities — measured, with a gap in what it reached — 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. The solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan. 2 of 3 declared ecosystem(s) (npm,osv) WERE scanned and every vulnerability they reported is included in this result; nuget was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that nuget is free of known-vulnerable dependencies.
  • 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. `SageFs.Host/Resources/devreload.js`, `SageFs/Resources/devreload.js`, `sagefs-vs/SageFs.VisualStudio/Services/EvalCodeLensProvider.cs`, `sagefs-vs/SageFs.VisualStudio/Services/FSharpBufferChangedListener.cs` 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.
  • D39 IL Efficiency — 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. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
  • P1 CI/CD gates — 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 CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P2 Observability — 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. Observability was not assessed: this check recognises the logging, tracing/metrics and health-check idioms of .NET, the JVM, Go, Python, JavaScript/TypeScript, Rust, Ruby, PHP, Swift, Dart, Elixir and Erlang, and most of this repository's production source is in none of them. Absence of an idiom this check recognises is NOT evidence that this repo lacks structured logging. This is a gap in the analyzer, not a finding about this repository.
  • Package restore incomplete — third-party types were unresolved in part of the solution — NuGet restore did not complete for SageFs.Core/SageFs.Core.fsproj, SageFs.Simulation/SageFs.Simulation.fsproj, SageFs/SageFs.fsproj, SageFs.Host/SageFs.Host.fsproj, SageFs.Tests/SageFs.Tests.fsproj and 12 more, so those projects were analysed with framework references only: every check keyed on a third-party type saw an error type there and reported nothing. Findings on those projects are a lower bound; run `dotnet restore` on them and rescan.

Repo exclusion declarations: 1 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.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: 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.

The LLM boundary

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

Dimensions

D1 · Cyclomatic Complexity3.8 / 10Weak✓ 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 3.8 / 10 · rule-coverage 100% · ceiling Prevented

205 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was DaemonMode.run at 300. A further 42 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 DaemonClient.actionToApi at 53 — they are counted neither in the figure above nor in this dimension's score. 14 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: SageFs.Core/SageFsError.fs (SageFsErrorModule.toFields at 45), SageFs.Core/McpBridge.fs (McpBridge.decide at 30), SageFs.Core/Features/AutoCompletion.fs (CompletionKindModule.label at 25), SageFs/SseEvent.fs (SseEventModule.toJson at 21), SageFs.Core/Middleware/ComputationExpression.fs (ComputationExpression.rewriteParsedExpr at 19), and 9 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.

onmessage (cyclomatic 27) · ×2SageFs/Resources/devreload.js:158
devreload.renderErrorPanel (cyclomatic 24) · ×2SageFs.Host/Resources/devreload.js:57
DaemonMode.run (cyclomatic 300)SageFs/DaemonMode.fs:2116
SageFsUpdate.update (cyclomatic 260)SageFs/SageFsApp.fs:1121
WorkerMain.run (cyclomatic 231)SageFs.Host/WorkerMain.fs:561

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

What to do

  1. Bring the 7 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with DaemonMode.run (cyclomatic 300), SageFsUpdate.update (cyclomatic 260), WorkerMain.run (cyclomatic 231). — 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 7 together lifts Cyclomatic Complexity from 3.8 to about 5.1/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

249 method(s) exceeded the cognitive complexity threshold of 15; the worst was WorkerMain.run at 402.

onmessage (cognitive 39) · ×2SageFs/Resources/devreload.js:158
renderErrorPanel (cognitive 38) · ×2SageFs/Resources/devreload.js:57
BlockHelpers.CollectSemicolonBlocks (cognitive 16) · ×2sagefs-vs/SageFs.VisualStudio/Commands/CellNavigationCommands.cs:114
WorkerMain.run (cognitive 402)SageFs.Host/WorkerMain.fs:561
DaemonMode.run (cognitive 324)SageFs/DaemonMode.fs:2116

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

What to do

  1. Bring the 4 bodies over 240 down to 240 or less in Cognitive Complexity — start with WorkerMain.run (cognitive 402), DaemonMode.run (cognitive 324), SageFsUpdate.update (cognitive 289). — 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 4 together lifts Cognitive Complexity from 2.4 to about 3.3/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

45 god class(es) detected.

FileTooLong: SageFs/DaemonMode.fs · ×40SageFs/DaemonMode.fs
TooManyFunctions: SseWriter · ×4SageFs.Core/SseWriter.fs:1
TooManyMethods: SageFsToolsSageFs/McpTools.fs:720

What to do

  1. Resolve the 40 FileTooLong finding(s) in God Classes — start with DaemonMode.fs, Extension.fs, McpServer.fs. — One of this dimension's main actionable groups (40 warning-level).
  2. Resolve the 4 TooManyFunctions finding(s) in God Classes — start with SseWriter.fs, NvimOracle.fs, VscRun.fs. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 1 TooManyMethods finding(s) in God Classes — start with McpTools.fs. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D7 · Architectural Integrity8.0 / 10Strong✓ 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 8.0 / 10 · rule-coverage 100% · ceiling Prevented

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

What to do

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

Detailed fixes: d7_recommendation.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

142 test methods: 142 unit, 0 integration, 0 BDD, 0 e2e.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality10.0 / 10Exemplary✓ 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, no mocking-framework packages referenced (hand-written doubles or no mocking) across 142 tests. Measured on the C# suite only — at least 898 test source file(s) (.fs, .ts) went unread, so its test quality is unmeasured and is not in these counts.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 257 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 57 direct `PackageReference`(s), and 202 further package(s) were reached beyond them by closing the graph over the committed `packages.lock.json` and 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 Hotspots7.9 / 10Strong✓ 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 7.9 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: SageFs/DaemonMode.fs (123×300=36900); SageFs.Host/WorkerMain.fs (70×231=16170); SageFs.Core/SessionManager.fs (74×190=14060) Repeated repair below the complexity floor: SageFs.Core/ActorCreation.fs (8 of 14 changes were fixes); SageFs.Core/FileWatcher.fs (8 of 10 changes were fixes); SageFs.Core/DaemonState.fs (5 of 9 changes were fixes)

Hotspot: SageFs/DaemonMode.fs · ×84SageFs/DaemonMode.fs:2116
Repeated repair: SageFs.Core/ActorCreation.fs · ×9SageFs.Core/ActorCreation.fs:97

What to do

  1. Resolve the 84 Hotspot finding(s) in Churn × Complexity Hotspots — start with Program.fs (2), devreload.js (2), DaemonMode.fs. — One of this dimension's main actionable groups (84 warning-level).
  2. Resolve the 9 Repeated repair finding(s) in Churn × Complexity Hotspots — start with ActorCreation.fs, FileWatcher.fs, DaemonState.fs. — One of this dimension's main actionable groups (9 warning-level).

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

D17 · Explicit Debt4.5 / 10Weak✓ 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 4.5 / 10 · rule-coverage 100% · ceiling Prevented

36 deducted debt markers + 0 dead symbols across 7222 LoC in the .NET projects (2.8/KLoC) → score 4.5. Measured on the .NET source only: .fs (96% of production source) was not read, and carries at least 0 uncounted task marker(s) in 0 file(s).

WriteOnlyPrivateField · ×7sagefs-vs/SageFs.VisualStudio/Commands/LiveTestingCommands.cs:123
EmptyCatchBlock · ×4sagefs-vs/SageFs.VisualStudio.Editor/DensityModeHelper.cs:61
NoWarnInCsproj · ×2Directory.Build.props:28
BarePragmaDisable · ×7sagefs-vs/SageFs.VisualStudio.Editor/CellHighlightAdornment.cs:22
BarePragmaDisable repeated across 16 filessagefs-vs/SageFs.VisualStudio/Commands/CellNavigationCommands.cs:11

What to do

  1. Resolve the 7 WriteOnlyPrivateField finding(s) in Explicit Debt — start with LiveTestingCommands.cs (2), StatusBarManager.cs, HotReloadData.cs. — One of this dimension's main actionable groups (7 issue-level).
  2. Resolve the 4 EmptyCatchBlock finding(s) in Explicit Debt — start with DensityModeHelper.cs, InlineEvalAdornment.cs, InlineFailureAdornment.cs. — One of this dimension's main actionable groups (4 issue-level).
  3. Resolve the 2 NoWarnInCsproj finding(s) in Explicit Debt — start with Directory.Build.props (2). — One of this dimension's main actionable groups (2 issue-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityExemplary◐ Sampled · advisory

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

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

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

The SageFs project is well documented across multiple READMEs and architecture/Docs markdown files. The root README gives an excellent overview (what it does, its MIT license, live testing dashboard) plus a clear roadmap and three work-flow modes with links to the Get Started doc. Each of the four docs directories (friction-receiver, sagefs-vs, sagefs-vscode, samples) is itself a focused README that documents what it contains rather than the repository; the root README's overview, installation, usage, contribution guidance, and license are all present and clear. The SageFs dashboard redesign directions document the aesthetic choices being made while the code lives on the daemon, which is consistent with the project's open-source ethos. The repository is well documented: the READMEs of each directory are focused and complete within their scope (e.g., koans, lemmings, live-testing fixtures), there are architecture/Docs markdown files for design, and XML-doc coverage is low (<2% of 86 documents). The SageFs.Tests/fixtures/LiveTesting/README.md is a generated cross-client contract anchor file that explains the fixture's shape and why it exists. A dedicated survey document (FEATURES_SURVEY.md) records the current module count and status of each feature, though it is stale and not a usage reference. This project is well documented with a strong README and architecture/decision documentation. The SageFs Feature Matrix (1309 words) gives an overview of the product surfaces, supported frameworks, and a detailed core-evaluation table plus session-management and live-testing sections; Live Testing Guide (2289 words) explains the internal design, test-discovery execution, coverage instrumentation, and the rough-stability note; Troubleshooting SageFs (6754 words) is an exhaustive guide covering editor health checks, daemon-startup failures, CLI installation, and a drift-avoidance loop; agents.md covers how AI agents interact with the REPL. The architecture-decisions document (1510 words) explains historical ADRs and current decisions like SSE-only reads and no interfaces. All four documents are well structured with clear headings and an outline of each section present in the visible text.

Documentation: contradicts the codedocs/FEATURES_SURVEY.md
XML-doc coverage: SageFs.VisualStudio · ×2sagefs-vs/SageFs.VisualStudio/SageFs.VisualStudio.csproj

✓ On the Gold path — maintain.

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

D20 · ADR QualityExemplary◐ Sampled · advisory

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

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

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

0 naming inconsistencies across 200 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D24 · Comment ValueExemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.

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

85 valuable / 0 redundant across 200 sampled comments.

✓ On the Gold path — maintain.

Detailed fixes: d24_recommendation.md.

D26 · Project Cohesion10.0 / 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 of 3 projects flagged as possibly oversized/incoherent.

✓ On the Gold path — maintain.

Detailed fixes: d26_recommendation.md.

D28 · Secrets (history)0.0 / 10Critical✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)7.6 / 10Adequategated by 14 critical findings✓ 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 7.6 / 10 · rule-coverage 100% · ceiling Documented

16 finding(s): 0 critical, 14 high, 2 medium, 0 low. 13 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 5 file(s) — `SageFs.Host/Resources/devreload.js` (line 23, line 24, line 40, …), `SageFs/Resources/devreload.js` (line 23, line 24, line 40, …), `sagefs-vs/SageFs.VisualStudio/Services/EvalCodeLensProvider.cs` (lines 32–36), `sagefs-vs/SageFs.VisualStudio/Services/FSharpBufferChangedListener.cs` (lines 23–27), `sagefs-vs/SageFs.VisualStudio/Services/TestCodeLensProvider.cs` (lines 28–32) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
  3. No action in Static Analysis (SAST) — all 13 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (13 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities7.1 / 10Adequategated by 4 critical findings✓ Tool-verified

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

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

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

6 finding(s): 0 critical, 4 high, 2 medium, 0 low. Partial dependency scan: 2 of 3 declared ecosystem(s) were scanned (npm,osv), and the findings above are real and complete for them. nuget was not scanned (nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan), so this is not the whole dependency surface and the result is reported at reduced confidence.

REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

REDACTED

What to do

  1. Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-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 646 of the 729 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 Coupling9.9 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: Editor.fs↔RenderPipeline.fs 90%; DaemonClient.fs↔Editor.fs 90%

Change coupling: Editor.fs ↔ RenderPipeline.fs · ×2SageFs/Editor.fs

What to do

  1. Resolve the 2 Change coupling finding(s) in Change Coupling — start with Editor.fs, DaemonClient.fs. — One of this dimension's main actionable groups (2 warning-level).

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

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

AX1 · Captive dependencies10.0 / 10Exemplary✓ 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.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does.

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

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.

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 segregation10.0 / 10Exemplary✓ Tool-verified

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

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

AX7 · Slice cohesion5.4 / 10Adequate✓ Tool-verified

Other · Architecture — Whether feature slices stay independent (no direct cross-slice references) — the discipline that makes vertical-slice architecture pay off.

Method: Roslyn scan (vertical-slice gated): feature slices resolved from namespaces (.Features.*, .Slices.*) or project names; cross-slice type references detected. Deterministic, traceable.

  • `LiveValuesReading` (slice 'LiveBindingsPane') depends on `LiveValueSnapshot` from slice 'LiveValueTree'. — SageFs.Core/Features/LiveBindingsPane.fs:20
  • `Hub` (slice 'LiveBindingsPane') depends on `State` from slice 'LiveBindingsAdaptive'. — SageFs.Core/Features/LiveBindingsPane.fs:159
  • `PaneView` (slice 'LiveBindingsPane') depends on `LiveValueSnapshot` from slice 'LiveValueTree'. — SageFs.Core/Features/LiveBindingsPane.fs:166
  • `ToolFrictionSummary` (slice 'FrictionTelemetry') depends on `ToolName` from slice 'FrictionTelemetryTypes'. — SageFs.Core/Features/FrictionTelemetry.fs:5
  • `TopBlockerSummary` (slice 'FrictionTelemetry') depends on `BlockerKind` from slice 'FrictionTelemetryTypes'. — SageFs.Core/Features/FrictionTelemetry.fs:12
  • `TransitionSummary` (slice 'FrictionTelemetry') depends on `ToolName` from slice 'FrictionTelemetryTypes'. — SageFs.Core/Features/FrictionTelemetry.fs:18
  • `FeedbackSummary` (slice 'FrictionTelemetry') depends on `ToolName` from slice 'FrictionTelemetryTypes'. — SageFs.Core/Features/FrictionTelemetry.fs:24
  • `ActionableToolReport` (slice 'FrictionTelemetry') depends on `ToolName` from slice 'FrictionTelemetryTypes'. — SageFs.Core/Features/FrictionTelemetry.fs:32
  • `FeaturePushState` (slice 'FeatureHooks') depends on `Store` from slice 'EvalStore'. — SageFs.Core/Features/FeatureHooks.fs:5
  • `FeaturePushStateModule` (slice 'FeatureHooks') depends on `BindingScopeSnapshot` from slice 'BindingExplorer'. — SageFs.Core/Features/FeatureHooks.fs:42
  • `Committed` (slice 'ManifestOwner') depends on `DaemonManifestState` from slice 'DaemonManifest'. — SageFs.Core/Features/ManifestOwner.fs:29
  • `DiagnosticEvent` (slice 'Events') depends on `DiagnosticSeverity` from slice 'Diagnostics'. — SageFs.Core/Features/Events.fs:20
  • `Pending` (slice 'KeptState') depends on `FileDecls` from slice 'ReloadPlanning'. — SageFs.Core/Features/KeptState.fs:10
  • `LedgerUsage` (slice 'CohortLedgerSqlite') depends on `OldestRow` from slice 'FrictionSqlite'. — SageFs/CohortLedger.fs:83

What to do

  • Keep slices independent: share cross-slice needs via an explicit contract/shared-kernel, not direct references between slices.
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.

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

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

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

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

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.

M1 · Documentation (README)7.3 / 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 an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 3 of 3 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation7.0 / 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 1) — reach 8 to raise the maturity tier; document significant decisions as they're made.
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

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

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

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

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

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

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

P1 · CI/CD gates8.5 / 10Exemplary✓ Tool-verified

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.

What to do

  • Run the test suite in CI via an explicit runner step (`dotnet test` for the toolchain this pipeline already uses) and gate merges on it.
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.

P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • `NoWarn` silences NU1902 — NuGet's vulnerability-audit warnings for moderate advisories. Suppressed advisories are still shipped; they are only invisible in the build log. Remove these codes from NoWarn and address or explicitly accept each advisory instead. — Directory.Build.props:28
  • No static application security testing detected. For this repository's stack, add `semgrep --config=auto` plus gitleaks for committed secrets (F# is not a CodeQL language and has no language-specific SAST engine) as a CI step. What was searched, so you can tell an absence from a miss: the 20057 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: `semgrep --config=auto` plus gitleaks for committed secrets (F# is not a CodeQL language and has no language-specific SAST engine) — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

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

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

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

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P5 · DR & Backup4.0 / 10Weak✓ 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

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
  • 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.

R1 · Type Safety1.8 / 10Critical✓ Tool-verified

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

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

  • 2 typed · 9 plain JS — the untyped files are SageFs.Host/Resources/devreload.js, SageFs/Resources/devreload.js, sagefs-vscode/esbuild.mjs, sagefs-vscode/src/LiveTestingListener.golden-tests.mjs, sagefs-vscode/src/SageFsClient.golden-tests.mjs, sagefs-vscode/src/http-helpers.golden-tests.mjs (+3 more).

What to do

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

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

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

  • SageFs.Host/Resources/devreload.js:1 · SageFs/Resources/devreload.js:1 — these 2 files are line-for-line copies of one another — 272 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — SageFs.Host/Resources/devreload.js:1
  • friction-receiver/src/index.ts:305 · friction-receiver/src/index.ts:329 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — friction-receiver/src/index.ts:305
  • friction-receiver/src/index.ts:132 · friction-receiver/src/index.ts:143 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — friction-receiver/src/index.ts:132
  • friction-receiver/src/index.ts:153 · friction-receiver/src/index.ts:161 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — friction-receiver/src/index.ts:153
  • sagefs-vscode/src/http-helpers.js:13 · sagefs-vscode/src/http-helpers.js:42 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sagefs-vscode/src/http-helpers.js:13
  • friction-receiver/src/index.ts:204 · friction-receiver/src/index.ts:210 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — friction-receiver/src/index.ts:204
  • sagefs-vscode/src/SageFsClient.golden-tests.mjs:59 · sagefs-vscode/src/SageFsClient.golden-tests.mjs:66 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sagefs-vscode/src/SageFsClient.golden-tests.mjs:59
  • sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:252 · sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:264 · sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:276 · sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:324 — 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. — sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:252
  • sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:260 · sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:284 · sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:290 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:260

What to do

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

  • renderErrorPanel has cyclomatic complexity 24 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — SageFs.Host/Resources/devreload.js:57, SageFs/Resources/devreload.js:57
  • onmessage has cyclomatic complexity 24 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — SageFs.Host/Resources/devreload.js:158, SageFs/Resources/devreload.js:158
  • fetch has cyclomatic complexity 20 and cognitive complexity 22; 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. — friction-receiver/src/index.ts:358
  • sanitizeReport has cyclomatic complexity 15 and cognitive complexity 14; 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. — friction-receiver/src/index.ts:183

What to do

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

  • 1 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: friction-receiver/src/index.ts (409).

What to do

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

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

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×8) — sagefs-vscode/src/LiveTestingListener.golden-tests.mjs, SageFs.Host/Resources/devreload.js, SageFs/Resources/devreload.js, …

What to do

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

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

What to do

  • Add eslint as package.json scripts and run them in CI.
R7 · Dead Code7.1 / 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.

  • 2 file(s) (~642 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package.
  • Unreachable from the 7 application, 1 tooling and 2 test entry point(s) detected in this repo. Gate removals on `npm run typecheck` — an undetected custom entry would make these reachable.
  • no import path from any entry point (7 application, 1 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×2) — sagefs-vscode/src/sse-helpers.js, sagefs-vscode/src/http-helpers.js

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency 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.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. 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. 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.6 / 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 92/98 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. (×6) — sagefs-vs/SageFs.VisualStudio/Services/ErrorListBridge.cs:76, sagefs-vs/SageFs.VisualStudio/Services/TestDiagnosticsBridge.cs:46, sagefs-vs/SageFs.VisualStudio/StatusBar/StatusBarManager.cs:127, …

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 unescaped10.0 / 10Exemplary○ Nothing flagged

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

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

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

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere. 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 guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X3 · Exception handling5.1 / 10Adequate✓ 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` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×8) — sagefs-vs/SageFs.VisualStudio/Commands/FailingTestNavigationCommands.cs:205, sagefs-vs/SageFs.VisualStudio/Commands/FailingTestNavigationCommands.cs:331, sagefs-vs/SageFs.VisualStudio/Commands/ToggleDensityModeCommand.cs:45, …
  • 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. (×4) — sagefs-vs/SageFs.VisualStudio/Commands/ToggleDensityModeCommand.cs:56, sagefs-vs/SageFs.VisualStudio.Editor/DensityModeHelper.cs:61, sagefs-vs/SageFs.VisualStudio.Editor/InlineEvalAdornment.cs:195, …

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. Deterministic.

X5 · Nullable reference types9.9 / 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 `linkedCts`: line 152 writes `linkedCts?.Dispose`, which says `linkedCts` can be null, but line 127 then dereferences it directly as `linkedCts.Token` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `linkedCts` truly cannot be null here, the `?.` is misleading. Settle it one way — test `linkedCts` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — sagefs-vs/SageFs.VisualStudio.Editor/Completions/SageFsCompletionSource.cs:127
  • ~0.2 `!` suppressions per 1k syntax nodes — 6 suppression(s) across the 36995 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 uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
  • Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.

Reference — by lens

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

LensScoreRatingImpact
Code Health49%Adequate — gated by D1, D2, R1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture87%StrongStrongest area.
Maturity78%StrongSolid.
Readiness42%Adequate — gated by R4, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security63%Adequate — gated by D28, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 4 check(s) recorded observations but carry no score

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

  • AXH1 Runtime security headers — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility (rendered) — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 52 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC7 A11y enforcement — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AX4 Dependency direction — not applicable to a vertical-slice architecture (the inward-dependency rule is for layered/clean styles)
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXA1 Runtime unauthenticated reachability — This run crawled public routes only — it had no logged-in session, so there is no authenticated surface to compare anonymous access against and nothing was measured. This is a statement about this run, not about your application: nothing here says access control is missing, and nothing here says it is present.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXI1 Runtime container hardening — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXS1 Runtime exposed surface — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D11 Test Reliability — Test runner surfaced no tests
  • D12 Dependency Hygiene — Dependency hygiene not measured — no packages were read
  • D16 Bus Factor — single-contributor repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution, but this repository's production source is mostly .fs, .lua, .ts, which the C#/VB workspace does not load — the projects that loaded are an immaterial minority, so solution shape was not assessed for this repository. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
  • D25 ADR Conformance — none of 1 ADRs are conformance-checkable — unverifiable.
  • D27 Navigability — Navigability not included (check did not complete)
  • D32 Data Compliance (PII/GDPR) — 4 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
  • D4 Code Duplication — Code Duplication not included (time budget)
  • 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.
  • D6 Cohesion (LCOM4) — D6 reads a CS/VB/GO/SCALA/SWIFT/DART/JAVA/PY/KT/TS/TSX/MTS/CTS/JS/JSX/MJS/CJS/PHP/RB/RS/ERL/EX/EXS class graph only — this repository's production source is .fs, .lua, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D8 Code Coverage — Coverage NOT MEASURED: `--collect:"XPlat Code Coverage"` names a data collector that ships in the `coverlet.collector` package, and this repository wires up none — no test project references it and no runsettings declares one. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment: without a collector, `--collect` produces nothing even from a suite that builds and passes. Add a `coverlet.collector` PackageReference to the test project(s) (or commit the Cobertura/OpenCover/lcov report your CI produces) and real coverage will be measured. It is excluded from the score rather than counted as a near-zero defect.
  • DM1 Domain Modelling — applicable but not scored (4 signals for this style, 3 needed — the count is met but a required primary signal is absent): 10 strongly-typed id(s); 947 value object(s); 354 domain event(s); its domain events are published by services or handlers — no domain entity raises one; a Domain/Aggregates/ValueObjects layer; a top-level samples/ tree: a library or framework whose examples are its consumers — these types are building blocks, not a domain
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P2 Observability — Observability was not assessed: this check recognises the logging, tracing/metrics and health-check idioms of .NET, the JVM, Go, Python, JavaScript/TypeScript, Rust, Ruby, PHP, Swift, Dart, Elixir and Erlang, and most of this repository's production source is in none of them. Absence of an idiom this check recognises is NOT evidence that this repo lacks structured logging. This is a gap in the analyzer, not a finding about this repository.
  • P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (Cobertura — `dotnet test --collect:"XPlat Code Coverage"` with a `coverlet.collector` PackageReference) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF2 Allocation hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF3 Async & latency hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 649 finding(s)
D28 · Secrets (history) · REDACTED · ×616
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 591 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · WriteOnlyPrivateField · ×7
  • WriteOnlyPrivateField sagefs-vs/SageFs.VisualStudio/Commands/LiveTestingCommands.cs:123 — private string[] PolicyLabels — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField sagefs-vs/SageFs.VisualStudio/Commands/LiveTestingCommands.cs:125 — private string[] CategoryLabels — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField sagefs-vs/SageFs.VisualStudio/StatusBar/StatusBarManager.cs:38 — private Timer? _vitalsTimer — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField sagefs-vs/SageFs.VisualStudio/ToolWindows/HotReloadData.cs:14 — private VisualStudioExtensibility extensibility — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField sagefs-vs/SageFs.VisualStudio/ToolWindows/LiveTestingData.cs:14 — private VisualStudioExtensibility extensibility — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField sagefs-vs/SageFs.VisualStudio/ToolWindows/SessionContextData.cs:14 — private VisualStudioExtensibility extensibility — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
  • WriteOnlyPrivateField sagefs-vs/SageFs.VisualStudio/ToolWindows/TypeExplorerData.cs:14 — private VisualStudioExtensibility extensibility — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
D17 · Explicit Debt · EmptyCatchBlock · ×4
  • EmptyCatchBlock sagefs-vs/SageFs.VisualStudio.Editor/DensityModeHelper.cs:61 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
  • EmptyCatchBlock sagefs-vs/SageFs.VisualStudio.Editor/InlineEvalAdornment.cs:195 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
  • EmptyCatchBlock sagefs-vs/SageFs.VisualStudio.Editor/InlineFailureAdornment.cs:201 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
  • EmptyCatchBlock sagefs-vs/SageFs.VisualStudio/Commands/ToggleDensityModeCommand.cs:56 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
D30 · Dependency Vulnerabilities · High CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · NoWarnInCsproj · ×2
  • NoWarnInCsproj Directory.Build.props:28 — NU1608 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
  • NoWarnInCsproj — known-vulnerability alert suppressed Directory.Build.props:28 — NU1902 — this is not a style rule being switched off: it is the dependency audit reporting that a package this project references has a KNOWN, already-published security vulnerability, and the entry deletes that report for the whole project — for this package and for every dependency the project takes from here on, including ones added long after whoever wrote the line has moved on. Nothing in the build will raise it again, so the next reader has no way to learn it was ever accepted. Upgrade the package to a version carrying the fix, or replace it, and drop the code from the list. Where the fix genuinely does not exist yet, keep the report and stop it FAILING the build — demote it to a warning without silencing it — and write down which advisory is being accepted and until when, so it is the acceptance that expires rather than the alert.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
P3 · Security & performance tooling · NuGet vulnerability audit suppressed via NoWarn · ×1
  • NuGet vulnerability audit suppressed via NoWarn Directory.Build.props:28 — `NoWarn` silences NU1902 — NuGet's vulnerability-audit warnings for moderate advisories. Suppressed advisories are still shipped; they are only invisible in the build log. Remove these codes from NoWarn and address or explicitly accept each advisory instead.
Serious — 665 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×84
  • Hotspot: SageFs/DaemonMode.fs SageFs/DaemonMode.fs:2116 — SageFs/DaemonMode.fs changed 123 times in last 90 days, max cyclomatic complexity 300 in DaemonMode.run at line 2116. 54 of those changes were fix/bug commits, and the other 69 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs/DaemonMode.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.
  • Hotspot: SageFs.Host/WorkerMain.fs SageFs.Host/WorkerMain.fs:561 — SageFs.Host/WorkerMain.fs changed 70 times in last 90 days, max cyclomatic complexity 231 in WorkerMain.run at line 561. 23 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Host/WorkerMain.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.
  • Hotspot: SageFs.Core/SessionManager.fs SageFs.Core/SessionManager.fs:434 — SageFs.Core/SessionManager.fs changed 74 times in last 90 days, max cyclomatic complexity 190 in SessionManager.createWithAlarm at line 434. 40 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/SessionManager.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.
  • Hotspot: SageFs/SageFsApp.fs SageFs/SageFsApp.fs:1121 — SageFs/SageFsApp.fs changed 47 times in last 90 days, max cyclomatic complexity 260 in SageFsUpdate.update at line 1121. 19 of those changes were fix/bug commits, and the other 28 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs/SageFsApp.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.
  • Hotspot: SageFs/Dashboard.fs SageFs/Dashboard.fs:1218 — SageFs/Dashboard.fs changed 100 times in last 90 days, max cyclomatic complexity 81 in Dashboard.createStreamHandler at line 1218. 38 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs/Dashboard.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.
  • Hotspot: SageFs/McpServer.fs SageFs/McpServer.fs:2800 — SageFs/McpServer.fs changed 95 times in last 90 days, max cyclomatic complexity 84 in McpServer.mapSessionRoutes at line 2800. 43 of those changes were fix/bug commits, and the other 52 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs/McpServer.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.
  • Hotspot: SageFs.Core/AppState.fs SageFs.Core/AppState.fs:1047 — SageFs.Core/AppState.fs changed 43 times in last 90 days, max cyclomatic complexity 168 in AppState.mkAppStateActor at line 1047. 20 of those changes were fix/bug commits, and the other 23 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/AppState.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.
  • Hotspot: SageFs/DashboardFragments.fs SageFs/DashboardFragments.fs:1519 — SageFs/DashboardFragments.fs changed 79 times in last 90 days, max cyclomatic complexity 90 in DashboardFragments.renderSessionsForSession at line 1519. 32 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs/DashboardFragments.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.
  • Hotspot: SageFs/DashboardTypes.fs SageFs/DashboardTypes.fs:1449 — SageFs/DashboardTypes.fs changed 64 times in last 90 days, max cyclomatic complexity 58 in DashboardTypes.parseEditorAction at line 1449. 18 of those changes were fix/bug commits, and the other 46 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs/DashboardTypes.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.
  • Hotspot: SageFs/Mcp.fs SageFs/Mcp.fs:418 — SageFs/Mcp.fs changed 117 times in last 90 days, max cyclomatic complexity 31 in McpTools.resolveSessionId at line 418. 51 of those changes were fix/bug commits, and the other 66 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs/Mcp.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.
  • Hotspot: SageFs/McpTools.fs SageFs/McpTools.fs:34 — SageFs/McpTools.fs changed 57 times in last 90 days, max cyclomatic complexity 43 in McpTools.blockerKindOf at line 34. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs/McpTools.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.
  • Hotspot: SageFs.Core/Cohort.fs SageFs.Core/Cohort.fs:853 — SageFs.Core/Cohort.fs changed 18 times in last 90 days, max cyclomatic complexity 127 in Cohort.decideRaw at line 853. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/Cohort.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.
  • Hotspot: SageFs.FsiHost/Program.fs SageFs.FsiHost/Program.fs:136 — SageFs.FsiHost/Program.fs changed 19 times in last 90 days, max cyclomatic complexity 101 in Program.run at line 136. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.FsiHost/Program.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.
  • Hotspot: SageFs.Host/WorkerHttpTransport.fs SageFs.Host/WorkerHttpTransport.fs:331 — SageFs.Host/WorkerHttpTransport.fs changed 24 times in last 90 days, max cyclomatic complexity 72 in WorkerHttpTransport.startServerWithShutdown at line 331. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Host/WorkerHttpTransport.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.
  • Hotspot: SageFs.Core/Features/ReloadPlanning.fs SageFs.Core/Features/ReloadPlanning.fs:906 — SageFs.Core/Features/ReloadPlanning.fs changed 28 times in last 90 days, max cyclomatic complexity 45 in ReloadPlanning.stripCommentsAndStrings at line 906. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/Features/ReloadPlanning.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.
  • Hotspot: SageFs.Core/SageFsError.fs SageFs.Core/SageFsError.fs:603 — SageFs.Core/SageFsError.fs changed 22 times in last 90 days, max cyclomatic complexity 45 in SageFsErrorModule.toFields at line 603. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/SageFsError.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.
  • Hotspot: SageFs.Core/Features/LiveTestingTypes.fs SageFs.Core/Features/LiveTestingTypes.fs:95 — SageFs.Core/Features/LiveTestingTypes.fs changed 28 times in last 90 days, max cyclomatic complexity 30 in TriviaNormalization.normalize at line 95. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/Features/LiveTestingTypes.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.
  • Hotspot: SageFs/Program.fs SageFs/Program.fs:118 — SageFs/Program.fs changed 24 times in last 90 days, max cyclomatic complexity 30 in CliCommandModule.parse at line 118. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs/Program.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.
  • Hotspot: SageFs.Core/Middleware/HotReloadCore.fs SageFs.Core/Middleware/HotReloadCore.fs:843 — SageFs.Core/Middleware/HotReloadCore.fs changed 16 times in last 90 days, max cyclomatic complexity 41 in HotReloadCore.applyDetourPlan at line 843. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/Middleware/HotReloadCore.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.
  • Hotspot: SageFs.Core/Features/LiveValueTree.fs SageFs.Core/Features/LiveValueTree.fs:542 — SageFs.Core/Features/LiveValueTree.fs changed 9 times in last 90 days, max cyclomatic complexity 65 in LiveValueTree.buildNode at line 542. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/Features/LiveValueTree.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.
  • Hotspot: SageFs/SageFsEffectHandler.fs SageFs/SageFsEffectHandler.fs:341 — SageFs/SageFsEffectHandler.fs changed 4 times in last 90 days, max cyclomatic complexity 142 in SageFsEffectHandler.execute at line 341. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs/SageFsEffectHandler.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.
  • Hotspot: SageFs.Core/Middleware/HotReloading.fs SageFs.Core/Middleware/HotReloading.fs:213 — SageFs.Core/Middleware/HotReloading.fs changed 19 times in last 90 days, max cyclomatic complexity 29 in HotReloading.hotReloadingMiddleware at line 213. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/Middleware/HotReloading.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.
  • Hotspot: SageFs.Core/ProjectLoading.fs SageFs.Core/ProjectLoading.fs:664 — SageFs.Core/ProjectLoading.fs changed 26 times in last 90 days, max cyclomatic complexity 21 in ProjectLoading.loadSolution at line 664. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/ProjectLoading.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.
  • Hotspot: SageFs.Core/Features/MetadataDelta/DeltaWriter.fs SageFs.Core/Features/MetadataDelta/DeltaWriter.fs:492 — SageFs.Core/Features/MetadataDelta/DeltaWriter.fs changed 6 times in last 90 days, max cyclomatic complexity 86 in DeltaChain.write at line 492. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/Features/MetadataDelta/DeltaWriter.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.
  • Hotspot: SageFs.FsiHost/FsiProtocol.fs SageFs.FsiHost/FsiProtocol.fs:335 — SageFs.FsiHost/FsiProtocol.fs changed 15 times in last 90 days, max cyclomatic complexity 33 in FsiProtocol.readValue at line 335. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.FsiHost/FsiProtocol.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.
  • + 59 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×40
  • FileTooLong: SageFs/DaemonMode.fs SageFs/DaemonMode.fs — FileTooLong — 3041 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 54 functions. The bar is 500 significant lines; this is 2541 over it, 6.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/Extension.fs sagefs-vscode/src/Extension.fs — FileTooLong — 2933 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 124 functions. The bar is 500 significant lines; this is 2433 over it, 5.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: SageFs/McpServer.fs SageFs/McpServer.fs — FileTooLong — 2917 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 78 functions. The bar is 500 significant lines; this is 2417 over it, 5.83× 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: Features/LiveTestingTypes.fs SageFs.Core/Features/LiveTestingTypes.fs — FileTooLong — 2890 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2390 over it, 5.78× 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: SageFs/DashboardFragments.fs SageFs/DashboardFragments.fs — FileTooLong — 2841 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 107 functions. The bar is 500 significant lines; this is 2341 over it, 5.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: SageFs/Mcp.fs SageFs/Mcp.fs — FileTooLong — 2346 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 115 functions. The bar is 500 significant lines; this is 1846 over it, 4.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: SageFs/Dashboard.fs SageFs/Dashboard.fs — FileTooLong — 2236 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 70 functions. The bar is 500 significant lines; this is 1736 over it, 4.47× 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: SageFs/McpTools.fs SageFs/McpTools.fs — FileTooLong — 2160 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1660 over it, 4.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: SageFs/SageFsApp.fs SageFs/SageFsApp.fs — FileTooLong — 2091 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1591 over it, 4.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: SageFs.Core/AppState.fs SageFs.Core/AppState.fs — FileTooLong — 1536 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1036 over it, 3.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: SageFs.Host/WorkerMain.fs SageFs.Host/WorkerMain.fs — FileTooLong — 1434 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 934 over it, 2.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: SageFs.Core/SessionManager.fs SageFs.Core/SessionManager.fs — FileTooLong — 1202 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 702 over it, 2.40× 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: Middleware/ValueReadTracking.fs SageFs.Core/Middleware/ValueReadTracking.fs — FileTooLong — 1198 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 36 functions. The bar is 500 significant lines; this is 698 over it, 2.40× 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: Middleware/HotReloadCore.fs SageFs.Core/Middleware/HotReloadCore.fs — FileTooLong — 1158 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 39 functions. The bar is 500 significant lines; this is 658 over it, 2.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Features/LiveTestingExecutors.fs SageFs.Core/Features/LiveTestingExecutors.fs — FileTooLong — 1105 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 605 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: SageFs/DashboardTypes.fs SageFs/DashboardTypes.fs — FileTooLong — 1044 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 544 over it, 2.09× 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: Features/ReloadPlanning.fs SageFs.Core/Features/ReloadPlanning.fs — FileTooLong — 963 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 62 functions. The bar is 500 significant lines; this is 463 over it, 1.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: nvim/Nvim.fs scripts/lemmings/ui/nvim/Nvim.fs — FileTooLong — 953 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 65 functions. The bar is 500 significant lines; this is 453 over it, 1.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: SageFs.Core/Cohort.fs SageFs.Core/Cohort.fs — FileTooLong — 929 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 429 over it, 1.86× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Features/LiveTestingCycle.fs SageFs.Core/Features/LiveTestingCycle.fs — FileTooLong — 928 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 428 over it, 1.86× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: SageFs/SageFsEffectHandler.fs SageFs/SageFsEffectHandler.fs — FileTooLong — 870 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 370 over it, 1.74× 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: SageFs.Core/WorkspaceHygiene.fs SageFs.Core/WorkspaceHygiene.fs — FileTooLong — 834 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 334 over it, 1.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: Features/LiveValueTree.fs SageFs.Core/Features/LiveValueTree.fs — FileTooLong — 773 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 31 functions. The bar is 500 significant lines; this is 273 over it, 1.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: MetadataDelta/DeltaWriter.fs SageFs.Core/Features/MetadataDelta/DeltaWriter.fs — FileTooLong — 771 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 271 over it, 1.54× 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: SageFs.Core/ProjectLoading.fs SageFs.Core/ProjectLoading.fs — FileTooLong — 756 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 256 over it, 1.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.
  • + 15 more in this group — see findings.md.
AX7 · Slice cohesion · Cross-slice coupling · ×14
  • Cross-slice coupling: LiveBindingsPane → LiveValueTree SageFs.Core/Features/LiveBindingsPane.fs:20 — `LiveValuesReading` (slice 'LiveBindingsPane') depends on `LiveValueSnapshot` from slice 'LiveValueTree'.
  • Cross-slice coupling: LiveBindingsPane → LiveBindingsAdaptive SageFs.Core/Features/LiveBindingsPane.fs:159 — `Hub` (slice 'LiveBindingsPane') depends on `State` from slice 'LiveBindingsAdaptive'.
  • Cross-slice coupling: LiveBindingsPane → LiveValueTree SageFs.Core/Features/LiveBindingsPane.fs:166 — `PaneView` (slice 'LiveBindingsPane') depends on `LiveValueSnapshot` from slice 'LiveValueTree'.
  • Cross-slice coupling: FrictionTelemetry → FrictionTelemetryTypes SageFs.Core/Features/FrictionTelemetry.fs:5 — `ToolFrictionSummary` (slice 'FrictionTelemetry') depends on `ToolName` from slice 'FrictionTelemetryTypes'.
  • Cross-slice coupling: FrictionTelemetry → FrictionTelemetryTypes SageFs.Core/Features/FrictionTelemetry.fs:12 — `TopBlockerSummary` (slice 'FrictionTelemetry') depends on `BlockerKind` from slice 'FrictionTelemetryTypes'.
  • Cross-slice coupling: FrictionTelemetry → FrictionTelemetryTypes SageFs.Core/Features/FrictionTelemetry.fs:18 — `TransitionSummary` (slice 'FrictionTelemetry') depends on `ToolName` from slice 'FrictionTelemetryTypes'.
  • Cross-slice coupling: FrictionTelemetry → FrictionTelemetryTypes SageFs.Core/Features/FrictionTelemetry.fs:24 — `FeedbackSummary` (slice 'FrictionTelemetry') depends on `ToolName` from slice 'FrictionTelemetryTypes'.
  • Cross-slice coupling: FrictionTelemetry → FrictionTelemetryTypes SageFs.Core/Features/FrictionTelemetry.fs:32 — `ActionableToolReport` (slice 'FrictionTelemetry') depends on `ToolName` from slice 'FrictionTelemetryTypes'.
  • Cross-slice coupling: FeatureHooks → EvalStore SageFs.Core/Features/FeatureHooks.fs:5 — `FeaturePushState` (slice 'FeatureHooks') depends on `Store` from slice 'EvalStore'.
  • Cross-slice coupling: FeatureHooks → BindingExplorer SageFs.Core/Features/FeatureHooks.fs:42 — `FeaturePushStateModule` (slice 'FeatureHooks') depends on `BindingScopeSnapshot` from slice 'BindingExplorer'.
  • Cross-slice coupling: ManifestOwner → DaemonManifest SageFs.Core/Features/ManifestOwner.fs:29 — `Committed` (slice 'ManifestOwner') depends on `DaemonManifestState` from slice 'DaemonManifest'.
  • Cross-slice coupling: Events → Diagnostics SageFs.Core/Features/Events.fs:20 — `DiagnosticEvent` (slice 'Events') depends on `DiagnosticSeverity` from slice 'Diagnostics'.
  • Cross-slice coupling: KeptState → ReloadPlanning SageFs.Core/Features/KeptState.fs:10 — `Pending` (slice 'KeptState') depends on `FileDecls` from slice 'ReloadPlanning'.
  • Cross-slice coupling: CohortLedgerSqlite → FrictionSqlite SageFs/CohortLedger.fs:83 — `LedgerUsage` (slice 'CohortLedgerSqlite') depends on `OldestRow` from slice 'FrictionSqlite'.
D15 · Churn × Complexity Hotspots · Repeated repair · ×9
  • Repeated repair: SageFs.Core/ActorCreation.fs SageFs.Core/ActorCreation.fs:97 — SageFs.Core/ActorCreation.fs changed 14 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ActorCreation.createActorImmediate at line 97), 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(isolation): a project's pins reach the host, or the session says what it could not do”; “fix(sessions): a session whose FSI host died on its own leaves Ready and says why”; “fix(fsi): stop rewriting `use` to `let`, which was silently dropping disposal”; “fix(isolated-fsi): resolve the project/host FSharp.Core identity mismatch (#141)”. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/ActorCreation.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: SageFs.Core/FileWatcher.fs SageFs.Core/FileWatcher.fs:157 — SageFs.Core/FileWatcher.fs changed 10 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is FileWatcher.watchableDirsCapped at line 157), 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(watcher): a watch root that is the home directory or above it is refused and reported”; “fix(file-watcher): report a watcher's Error events to ComponentWatch”; “fix(watcher): switch to one recursive watch per root, not one per directory”; “fix(watcher): stop the file watcher from silently starving on build-scratch dirs”. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/FileWatcher.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: SageFs.Core/DaemonState.fs SageFs.Core/DaemonState.fs:254 — SageFs.Core/DaemonState.fs changed 9 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 13 (its worst body is DaemonState.probeDaemonHttpAsync at line 254), 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(machine-tier): find the data directory without running DaemonState's initialiser, so the tier is settled before a wait is read”; “fix(logging): report the log file the sink is writing, not the one its date implies”; “fix(logging): bound the daemon log, honour SAGEFS_DATA_DIR, make the filters reach the file”; “fix(watcher): stop the file watcher from silently starving on build-scratch dirs”. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/DaemonState.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: SageFs.Core/ErrorMessages.fs SageFs.Core/ErrorMessages.fs:23 — SageFs.Core/ErrorMessages.fs 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 13 (its worst body is ErrorMessages.categorize at line 23), 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(live-testing): use the compiler's own FSI naming rule, not three string heuristics”; “fix(eval): don't send a module/namespace header to FSI as if it were code”; “fix(eval): runtime exceptions lead with type + message + the user's code line (roast UX-3)”; “fix(diagnostics): thread the FS error number through classification”. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/ErrorMessages.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: SageFs.Core/WarmupReplayCache.fs SageFs.Core/WarmupReplayCache.fs:278 — SageFs.Core/WarmupReplayCache.fs changed 6 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 WarmupReplayCache.ignoreGeneratedFile at line 278), 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(warmup): the cache ignores itself in git, so a new user's first git status stays clean”; “fix(dashboard,warmup): stop leaking ex.Message; write warmup cache atomically”; “fix(warmup): don't replay a source file's open of its own internal module”; “fix(cache): lossless failure-kind codec + content-aware warmup fingerprint”. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/WarmupReplayCache.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: SageFs.Core/Features/InputHashCoverage.fs SageFs.Core/Features/InputHashCoverage.fs:153 — SageFs.Core/Features/InputHashCoverage.fs 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 6 (its worst body is InputHashCoverage.trustBeyond at line 153), 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(cohort): a landing is verified against the files evaluated over the build, not coverage alone”; “fix(gate): a test's cache key sees the files coverage cannot, trustBeyond and seenFiles”; “fix(gate): a test whose coverage hit nothing has no cache key, so it is always run”; “fix(cohort): fold the daemon's own semantics version into the landing-cache key (roast-7 §7)”. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/Features/InputHashCoverage.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: SageFs.Simulation/TweakSimInvariants.fs SageFs.Simulation/TweakSimInvariants.fs:289 — SageFs.Simulation/TweakSimInvariants.fs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is TweakSimInvariants.whyKeptAgreesWithGroundTruthAfterMultipleRounds at line 289), 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(tweak): GREEN, whyKept sees across any number of compaction rounds”; “fix(tweak): GREEN, rollback resolves correctly across a compaction boundary”; “fix(tweak): GREEN, no Option or bool stands in for domain state anymore”; “fix(tweak): route every production error through a real type, not string”. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Simulation/TweakSimInvariants.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: SageFs.Core/ShadowCopy.fs SageFs.Core/ShadowCopy.fs:101 — SageFs.Core/ShadowCopy.fs 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 9 (its worst body is ShadowCopy.shadowCopyFile at line 101), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(daemon): drain deferred shadow deletes, and stay quiet when a non-Ready worker refuses a fetch”; “fix(daemon): make --ttl fail-safe and fix run_app's missing NuGet deps”; “fix(shadow): a hard reset sweeps only shadow copies whose owner is gone”; “fix(loading): robust project loading + warmup transparency + dashboard UX”. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/ShadowCopy.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: SageFs.Core/Features/Verification.fs SageFs.Core/Features/Verification.fs:358 — SageFs.Core/Features/Verification.fs 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 13 (its worst body is TargetedVerification.describeBlocker at line 358), 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(verification): let a blocked evidence outcome outrank the plan sentence”; “fix(cohort): fail fast on a terminal integration session, carrying the reason”; “fix(session): fold FaultReason/WorkerPid/WorkerPort into SessionLifecycleStatus”. 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-04..2026-10-02, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-04 14:48:47 -05:00' --until='2026-10-02 14:48:47 -05:00' --full-history --no-merges -- SageFs.Core/Features/Verification.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.
R4 · Test Coverage · No test reaches this file · ×8
  • No test reaches this file sagefs-vscode/src/LiveTestingListener.golden-tests.mjs — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file SageFs.Host/Resources/devreload.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file SageFs/Resources/devreload.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sagefs-vscode/src/SageFsClient.golden-tests.mjs — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sagefs-vscode/src/sse-helpers.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sagefs-vscode/src/http-helpers.golden-tests.mjs — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sagefs-vscode/src/http-helpers.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file sagefs-vscode/esbuild.mjs — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×8
  • Swallowed exception (caught, then discarded) sagefs-vs/SageFs.VisualStudio/Commands/FailingTestNavigationCommands.cs:205 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sagefs-vs/SageFs.VisualStudio/Commands/FailingTestNavigationCommands.cs:331 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sagefs-vs/SageFs.VisualStudio/Commands/ToggleDensityModeCommand.cs:45 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sagefs-vs/SageFs.VisualStudio.Editor/CellHighlightAdornment.cs:148 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sagefs-vs/SageFs.VisualStudio.Editor/Completions/SageFsCompletionSource.cs:267 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sagefs-vs/SageFs.VisualStudio.Editor/DensityModeHelper.cs:52 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sagefs-vs/SageFs.VisualStudio.Editor/InlineEvalAdornment.cs:185 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sagefs-vs/SageFs.VisualStudio.Editor/InlineFailureAdornment.cs:190 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D17 · Explicit Debt · BarePragmaDisable · ×7
  • BarePragmaDisable sagefs-vs/SageFs.VisualStudio.Editor/CellHighlightAdornment.cs:22 — #pragma warning disable CS0649 — 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 sagefs-vs/SageFs.VisualStudio.Editor/InlineEvalAdornment.cs:23 — #pragma warning disable CS0649 — 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 sagefs-vs/SageFs.VisualStudio.Editor/InlineFailureAdornment.cs:22 — #pragma warning disable CS0649 — 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 sagefs-vs/SageFs.VisualStudio/Services/ErrorListBridge.cs:14 — #pragma warning disable VSEXTPREVIEW_DIAGNOSTICS — 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 sagefs-vs/SageFs.VisualStudio/Services/TestDiagnosticsBridge.cs:15 — #pragma warning disable VSEXTPREVIEW_DIAGNOSTICS — 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 sagefs-vs/SageFs.VisualStudio/Services/EvalCodeLensProvider.cs:9 — #pragma warning disable VSEXTPREVIEW_CODELENS — 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 sagefs-vs/SageFs.VisualStudio/Services/TestCodeLensProvider.cs:10 — #pragma warning disable VSEXTPREVIEW_CODELENS — 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.
AXH1 · Runtime security headers · Runtime security header not set · ×6
  • Runtime security header not set: content-security-policy — The live app's responses did not include content-security-policy (restricts the sources a page may load — mitigates XSS/injection). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: strict-transport-security — The live app's responses did not include strict-transport-security (forces HTTPS on subsequent requests — mitigates downgrade/MITM). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: x-content-type-options — The live app's responses did not include x-content-type-options (stops MIME-sniffing (expects 'nosniff')). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: x-frame-options — The live app's responses did not include x-frame-options (blocks clickjacking via framing (or use CSP frame-ancestors)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: referrer-policy — The live app's responses did not include referrer-policy (limits referrer leakage to third parties). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: permissions-policy — The live app's responses did not include permissions-policy (restricts powerful browser features (camera, geolocation, …)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
D3 · God Classes · TooManyFunctions · ×4
  • TooManyFunctions: SseWriter SageFs.Core/SseWriter.fs:1 — TooManyFunctions — 47 functions. The bar is 30 functions; this is 17 over it, 1.57× 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: NvimOracle scripts/lemmings/ui/nvim/NvimOracle.fs:8 — TooManyFunctions — 41 functions. The bar is 30 functions; this is 11 over it, 1.37× 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: VscRun scripts/lemmings/LemRun/VscRun.fs:31 — TooManyFunctions — 36 functions. The bar is 30 functions; this is 6 over it, 1.20× 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: Cdp scripts/lemmings/ui/LemDrive/Cdp.fs:6 — TooManyFunctions — 32 functions. The bar is 30 functions; this is 2 over it, 1.07× 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×4
  • Swallowed exception (empty catch) sagefs-vs/SageFs.VisualStudio/Commands/ToggleDensityModeCommand.cs:56 — 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) sagefs-vs/SageFs.VisualStudio.Editor/DensityModeHelper.cs:61 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) sagefs-vs/SageFs.VisualStudio.Editor/InlineEvalAdornment.cs:195 — 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) sagefs-vs/SageFs.VisualStudio.Editor/InlineFailureAdornment.cs:201 — 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.
R10 · Code Duplication · Duplicated block (7 lines × 2 locations) · ×3
  • Duplicated block (7 lines × 2 locations) friction-receiver/src/index.ts:132 — friction-receiver/src/index.ts:132 · friction-receiver/src/index.ts:143 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (7 lines × 2 locations) friction-receiver/src/index.ts:153 — friction-receiver/src/index.ts:153 · friction-receiver/src/index.ts:161 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (7 lines × 2 locations) sagefs-vscode/src/http-helpers.js:13 — sagefs-vscode/src/http-helpers.js:13 · sagefs-vscode/src/http-helpers.js:42 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
D1 · Cyclomatic Complexity · onmessage (cyclomatic 27) · ×2
  • onmessage (cyclomatic 27) SageFs/Resources/devreload.js:158 — onmessage has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • onmessage (cyclomatic 27) SageFs.Host/Resources/devreload.js:158 — onmessage has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · devreload.renderErrorPanel (cyclomatic 24) · ×2
  • devreload.renderErrorPanel (cyclomatic 24) SageFs.Host/Resources/devreload.js:57 — devreload.renderErrorPanel 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.
  • devreload.renderErrorPanel (cyclomatic 24) SageFs/Resources/devreload.js:57 — devreload.renderErrorPanel 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.
D2 · Cognitive Complexity · onmessage (cognitive 39) · ×2
  • onmessage (cognitive 39) SageFs/Resources/devreload.js:158 — onmessage has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 6 (13 pts), boolean chains 7, error handling 2 (3 pts) (nesting depth added 12). Of this number, 32 points are the body's own statements and 7 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • onmessage (cognitive 39) SageFs.Host/Resources/devreload.js:158 — onmessage has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 6 (13 pts), boolean chains 7, error handling 2 (3 pts) (nesting depth added 12). Of this number, 32 points are the body's own statements and 7 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderErrorPanel (cognitive 38) · ×2
  • renderErrorPanel (cognitive 38) SageFs/Resources/devreload.js:57 — renderErrorPanel has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 10 (22 pts), boolean chains 6, if/else 5 (6 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • renderErrorPanel (cognitive 38) SageFs.Host/Resources/devreload.js:57 — renderErrorPanel has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 10 (22 pts), boolean chains 6, if/else 5 (6 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlockHelpers.CollectSemicolonBlocks (cognitive 16) · ×2
  • BlockHelpers.CollectSemicolonBlocks (cognitive 16) sagefs-vs/SageFs.VisualStudio/Commands/CellNavigationCommands.cs:114 — BlockHelpers.CollectSemicolonBlocks 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.
  • BlockHelpers.CollectSemicolonBlocks (cognitive 16) sagefs-vs/SageFs.VisualStudio.Editor/BlockHelpers.cs:134 — BlockHelpers.CollectSemicolonBlocks 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×2
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: Editor.fs ↔ RenderPipeline.fs SageFs/Editor.fs — `SageFs/Editor.fs` and `SageFs/RenderPipeline.fs` change together 90% of the time (9 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `78888e39` refactor(core): move the daemon Elm kernel + render stack into the da…; `b6f60134` feat(core): add SmartReset with soft-first/hard-escalation logic (at that commit the files were still `SageFs.Core/Editor.fs` and `SageFs.Core/RenderPipeline.fs`); `0a75de86` refactor(pattern-match): convert if/else to pattern matching in 9 lar… (at that commit the files were still `SageFs.Core/Editor.fs` and `SageFs.Core/RenderPipeline.fs`) — run `git show` on any of them.
  • Change coupling: DaemonClient.fs ↔ Editor.fs SageFs/DaemonClient.fs — `SageFs/DaemonClient.fs` and `SageFs/Editor.fs` change together 90% of the time (9 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `78888e39` refactor(core): move the daemon Elm kernel + render stack into the da…; `b6f60134` feat(core): add SmartReset with soft-first/hard-escalation logic (at that commit the files were still `SageFs.Core/DaemonClient.fs` and `SageFs.Core/Editor.fs`); `d78a2dde` fix(core): resolve remaining analyzer warnings (at that commit the files were still `SageFs.Core/DaemonClient.fs` and `SageFs.Core/Editor.fs`) — run `git show` on any of them.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×2
  • Duplicated block (6 lines × 2 locations) friction-receiver/src/index.ts:204 — friction-receiver/src/index.ts:204 · friction-receiver/src/index.ts:210 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
  • Duplicated block (6 lines × 2 locations) sagefs-vscode/src/SageFsClient.golden-tests.mjs:59 — sagefs-vscode/src/SageFsClient.golden-tests.mjs:59 · sagefs-vscode/src/SageFsClient.golden-tests.mjs:66 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function renderErrorPanel (cyclomatic 24, cognitive 38) · ×2
  • Complex function renderErrorPanel (cyclomatic 24, cognitive 38) SageFs.Host/Resources/devreload.js:57 — renderErrorPanel has cyclomatic complexity 24 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function renderErrorPanel (cyclomatic 24, cognitive 38) SageFs/Resources/devreload.js:57 — renderErrorPanel has cyclomatic complexity 24 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onmessage (cyclomatic 24, cognitive 32) · ×2
  • Complex function onmessage (cyclomatic 24, cognitive 32) SageFs.Host/Resources/devreload.js:158 — onmessage has cyclomatic complexity 24 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function onmessage (cyclomatic 24, cognitive 32) SageFs/Resources/devreload.js:158 — onmessage has cyclomatic complexity 24 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
AXR1 · Runtime accessibility (rendered) · WCAG 2.4.2 reproducibly failed in a rendered surface · ×1
  • WCAG 2.4.2 reproducibly failed in a rendered surface — axe-core rule(s) document-title failed on: html. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
AXR1 · Runtime accessibility (rendered) · WCAG 3.1.1 reproducibly failed in a rendered surface · ×1
  • WCAG 3.1.1 reproducibly failed in a rendered surface — axe-core rule(s) html-has-lang failed on: html. Runtime evidence (advisory — not scored); fix and re-scan to verify it clears.
D1 · Cyclomatic Complexity · DaemonMode.run (cyclomatic 300) · ×1
  • DaemonMode.run (cyclomatic 300) SageFs/DaemonMode.fs:2116 — DaemonMode.run has cyclomatic complexity 300 (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 · SageFsUpdate.update (cyclomatic 260) · ×1
  • SageFsUpdate.update (cyclomatic 260) SageFs/SageFsApp.fs:1121 — SageFsUpdate.update has cyclomatic complexity 260 (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 · WorkerMain.run (cyclomatic 231) · ×1
  • WorkerMain.run (cyclomatic 231) SageFs.Host/WorkerMain.fs:561 — WorkerMain.run has cyclomatic complexity 231 (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 · SessionManager.createWithAlarm (cyclomatic 190) · ×1
  • SessionManager.createWithAlarm (cyclomatic 190) SageFs.Core/SessionManager.fs:434 — SessionManager.createWithAlarm has cyclomatic complexity 190 (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 · AppState.mkAppStateActor (cyclomatic 168) · ×1
  • AppState.mkAppStateActor (cyclomatic 168) SageFs.Core/AppState.fs:1047 — AppState.mkAppStateActor has cyclomatic complexity 168 (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 · SageFsEffectHandler.execute (cyclomatic 142) · ×1
  • SageFsEffectHandler.execute (cyclomatic 142) SageFs/SageFsEffectHandler.fs:341 — SageFsEffectHandler.execute has cyclomatic complexity 142 (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 · Cohort.decideRaw (cyclomatic 127) · ×1
  • Cohort.decideRaw (cyclomatic 127) SageFs.Core/Cohort.fs:853 — Cohort.decideRaw has cyclomatic complexity 127 (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 · Program.run (cyclomatic 101) · ×1
  • Program.run (cyclomatic 101) SageFs.FsiHost/Program.fs:136 — Program.run has cyclomatic complexity 101 (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 · DashboardFragments.renderSessionsForSession (cyclomatic 90) · ×1
  • DashboardFragments.renderSessionsForSession (cyclomatic 90) SageFs/DashboardFragments.fs:1519 — DashboardFragments.renderSessionsForSession has cyclomatic complexity 90 (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 · DeltaChain.write (cyclomatic 86) · ×1
  • DeltaChain.write (cyclomatic 86) SageFs.Core/Features/MetadataDelta/DeltaWriter.fs:492 — DeltaChain.write has cyclomatic complexity 86 (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 · McpServer.mapSessionRoutes (cyclomatic 84) · ×1
  • McpServer.mapSessionRoutes (cyclomatic 84) SageFs/McpServer.fs:2800 — McpServer.mapSessionRoutes has cyclomatic complexity 84 (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 · EditorUpdate.update (cyclomatic 83) · ×1
  • EditorUpdate.update (cyclomatic 83) SageFs/Editor.fs:250 — EditorUpdate.update has cyclomatic complexity 83 (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 · Dashboard.createStreamHandler (cyclomatic 81) · ×1
  • Dashboard.createStreamHandler (cyclomatic 81) SageFs/Dashboard.fs:1218 — Dashboard.createStreamHandler has cyclomatic complexity 81 (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 · GenericReload.reach (cyclomatic 80) · ×1
  • GenericReload.reach (cyclomatic 80) SageFs.Core/Middleware/GenericReload.fs:193 — GenericReload.reach has cyclomatic complexity 80 (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 · ReflectionReadSim.runWith (cyclomatic 77) · ×1
  • ReflectionReadSim.runWith (cyclomatic 77) SageFs.Simulation/ReflectionReadSim.fs:172 — ReflectionReadSim.runWith has cyclomatic complexity 77 (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 · MethodDiff.diff (cyclomatic 72) · ×1
  • MethodDiff.diff (cyclomatic 72) SageFs.Core/Features/MetadataDelta/MethodDiff.fs:182 — MethodDiff.diff has cyclomatic complexity 72 (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 · WorkerHttpTransport.startServerWithShutdown (cyclomatic 72) · ×1
  • WorkerHttpTransport.startServerWithShutdown (cyclomatic 72) SageFs.Host/WorkerHttpTransport.fs:331 — WorkerHttpTransport.startServerWithShutdown has cyclomatic complexity 72 (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 · LiveValueTree.buildNode (cyclomatic 65) · ×1
  • LiveValueTree.buildNode (cyclomatic 65) SageFs.Core/Features/LiveValueTree.fs:542 — LiveValueTree.buildNode has cyclomatic complexity 65 (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 · McpServer.wireModelChangeHandlers (cyclomatic 62) · ×1
  • McpServer.wireModelChangeHandlers (cyclomatic 62) SageFs/McpServer.fs:1506 — McpServer.wireModelChangeHandlers has cyclomatic complexity 62 (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 · DeltaRouteSim.step (cyclomatic 60) · ×1
  • DeltaRouteSim.step (cyclomatic 60) SageFs.Simulation/DeltaRouteSim.fs:241 — DeltaRouteSim.step has cyclomatic complexity 60 (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 · ElmLoop.startWithCoalescerAndReducer (cyclomatic 59) · ×1
  • ElmLoop.startWithCoalescerAndReducer (cyclomatic 59) SageFs/ElmLoop.fs:75 — ElmLoop.startWithCoalescerAndReducer has cyclomatic complexity 59 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DashboardTypes.parseEditorAction (cyclomatic 58) · ×1
  • DashboardTypes.parseEditorAction (cyclomatic 58) SageFs/DashboardTypes.fs:1449 — DashboardTypes.parseEditorAction has cyclomatic complexity 58 (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 · ValueReadSim.runWith (cyclomatic 56) · ×1
  • ValueReadSim.runWith (cyclomatic 56) SageFs.Simulation/ValueReadSim.fs:302 — ValueReadSim.runWith has cyclomatic complexity 56 (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 · AppState.createFsiSession (cyclomatic 55) · ×1
  • AppState.createFsiSession (cyclomatic 55) SageFs.Core/AppState.fs:704 — AppState.createFsiSession has cyclomatic complexity 55 (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 · TestCycleEffects.decideAfterTypeCheck (cyclomatic 55) · ×1
  • TestCycleEffects.decideAfterTypeCheck (cyclomatic 55) SageFs.Core/Features/LiveTestingCycle.fs:76 — TestCycleEffects.decideAfterTypeCheck has cyclomatic complexity 55 (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 · Dashboard.createEndpoints (cyclomatic 48) · ×1
  • Dashboard.createEndpoints (cyclomatic 48) SageFs/Dashboard.fs:2995 — Dashboard.createEndpoints has cyclomatic complexity 48 (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 · Screen.drawWith (cyclomatic 47) · ×1
  • Screen.drawWith (cyclomatic 47) SageFs/Screen.fs:263 — Screen.drawWith has cyclomatic complexity 47 (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 · AppState.discoverWarmupReplayPlan (cyclomatic 46) · ×1
  • AppState.discoverWarmupReplayPlan (cyclomatic 46) SageFs.Core/AppState.fs:447 — AppState.discoverWarmupReplayPlan has cyclomatic complexity 46 (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 · CapabilitySim.step (cyclomatic 46) · ×1
  • CapabilitySim.step (cyclomatic 46) SageFs.Simulation/CapabilitySim.fs:223 — CapabilitySim.step has cyclomatic complexity 46 (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 · IlCanon.canonicalize (cyclomatic 45) · ×1
  • IlCanon.canonicalize (cyclomatic 45) SageFs.Core/Features/MetadataDelta/IlCanon.fs:226 — IlCanon.canonicalize has cyclomatic complexity 45 (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 · ReloadPlanning.stripCommentsAndStrings (cyclomatic 45) · ×1
  • ReloadPlanning.stripCommentsAndStrings (cyclomatic 45) SageFs.Core/Features/ReloadPlanning.fs:906 — ReloadPlanning.stripCommentsAndStrings has cyclomatic complexity 45 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · McpServer.mapLiveTestingRoutes (cyclomatic 45) · ×1
  • McpServer.mapLiveTestingRoutes (cyclomatic 45) SageFs/McpServer.fs:3325 — McpServer.mapLiveTestingRoutes has cyclomatic complexity 45 (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 · DaemonMode.resumePreviousSessions (cyclomatic 43) · ×1
  • DaemonMode.resumePreviousSessions (cyclomatic 43) SageFs/DaemonMode.fs:1673 — DaemonMode.resumePreviousSessions has cyclomatic complexity 43 (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 · Store.create (cyclomatic 43) · ×1
  • Store.create (cyclomatic 43) SageFs/FrictionSqlite.fs:250 — Store.create has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · McpServer.mapExecutionRoutes (cyclomatic 42) · ×1
  • McpServer.mapExecutionRoutes (cyclomatic 42) SageFs/McpServer.fs:2032 — McpServer.mapExecutionRoutes has cyclomatic complexity 42 (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 · HotReloadCore.applyDetourPlan (cyclomatic 41) · ×1
  • HotReloadCore.applyDetourPlan (cyclomatic 41) SageFs.Core/Middleware/HotReloadCore.fs:843 — HotReloadCore.applyDetourPlan has cyclomatic complexity 41 (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 · Dashboard.buildDashboardSnapshotWithSessions (cyclomatic 41) · ×1
  • Dashboard.buildDashboardSnapshotWithSessions (cyclomatic 41) SageFs/Dashboard.fs:866 — Dashboard.buildDashboardSnapshotWithSessions has cyclomatic complexity 41 (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 · McpAdapter.splitStatements (cyclomatic 40) · ×1
  • McpAdapter.splitStatements (cyclomatic 40) SageFs/McpAdapter.fs:282 — McpAdapter.splitStatements has cyclomatic complexity 40 (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 · DaemonMode.createSessionOpsWithRecovery (cyclomatic 39) · ×1
  • DaemonMode.createSessionOpsWithRecovery (cyclomatic 39) SageFs/DaemonMode.fs:516 — DaemonMode.createSessionOpsWithRecovery has cyclomatic complexity 39 (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 · ManifestReader.read (cyclomatic 37) · ×1
  • ManifestReader.read (cyclomatic 37) SageFs.Core/Features/ManifestPersistence.fs:125 — ManifestReader.read has cyclomatic complexity 37 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · WorkerStartup.await (cyclomatic 36) · ×1
  • WorkerStartup.await (cyclomatic 36) SageFs.Core/WorkerStartup.fs:37 — WorkerStartup.await has cyclomatic complexity 36 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · McpServer.createServerCaptureFilter (cyclomatic 36) · ×1
  • McpServer.createServerCaptureFilter (cyclomatic 36) SageFs/McpServer.fs:298 — McpServer.createServerCaptureFilter has cyclomatic complexity 36 (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 · SageFsRender.render (cyclomatic 35) · ×1
  • SageFsRender.render (cyclomatic 35) SageFs/SageFsApp.fs:2362 — SageFsRender.render 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 · PushEventModule.formatForLlm (cyclomatic 34) · ×1
  • PushEventModule.formatForLlm (cyclomatic 34) SageFs/McpPushNotifications.fs:95 — PushEventModule.formatForLlm has cyclomatic complexity 34 (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 · FsiProtocol.readValue (cyclomatic 33) · ×1
  • FsiProtocol.readValue (cyclomatic 33) SageFs.FsiHost/FsiProtocol.fs:335 — FsiProtocol.readValue has cyclomatic complexity 33 (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 · WorkerMain.handleMessage (cyclomatic 33) · ×1
  • WorkerMain.handleMessage (cyclomatic 33) SageFs.Host/WorkerMain.fs:175 — WorkerMain.handleMessage has cyclomatic complexity 33 (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 · DaemonMode.createElmRuntime (cyclomatic 33) · ×1
  • DaemonMode.createElmRuntime (cyclomatic 33) SageFs/DaemonMode.fs:1856 — DaemonMode.createElmRuntime has cyclomatic complexity 33 (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 · McpServer.wireSessionEventSubscription (cyclomatic 33) · ×1
  • McpServer.wireSessionEventSubscription (cyclomatic 33) SageFs/McpServer.fs:1160 — McpServer.wireSessionEventSubscription has cyclomatic complexity 33 (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 · DashboardFragments.renderHotReloadPanelFull (cyclomatic 32) · ×1
  • DashboardFragments.renderHotReloadPanelFull (cyclomatic 32) SageFs/DashboardFragments.fs:2496 — DashboardFragments.renderHotReloadPanelFull has cyclomatic complexity 32 (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 · McpTools.resolveSessionId (cyclomatic 31) · ×1
  • McpTools.resolveSessionId (cyclomatic 31) SageFs/Mcp.fs:418 — McpTools.resolveSessionId has cyclomatic complexity 31 (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 · FrameDiff.parsePositionedLines (cyclomatic 31) · ×1
  • FrameDiff.parsePositionedLines (cyclomatic 31) SageFs/TerminalUI.fs:218 — FrameDiff.parsePositionedLines has cyclomatic complexity 31 (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. This is NOT this file's highest cyclomatic complexity: TerminalInput.mapKeyWith (cyclomatic 36) 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 · SgrModule.ofParams (cyclomatic 31) · ×1
  • SgrModule.ofParams (cyclomatic 31) scripts/lemmings/ui/nvim/Ansi.fs:61 — SgrModule.ofParams has cyclomatic complexity 31 (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 · TriviaNormalization.normalize (cyclomatic 30) · ×1
  • TriviaNormalization.normalize (cyclomatic 30) SageFs.Core/Features/LiveTestingTypes.fs:95 — TriviaNormalization.normalize 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 · GuardSim.step (cyclomatic 30) · ×1
  • GuardSim.step (cyclomatic 30) SageFs.Simulation/GuardSim.fs:271 — GuardSim.step has cyclomatic complexity 30 (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 · CliCommandModule.parse (cyclomatic 30) · ×1
  • CliCommandModule.parse (cyclomatic 30) SageFs/Program.fs:118 — CliCommandModule.parse has cyclomatic complexity 30 (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 · KeyComboModule.tryParse (cyclomatic 30) · ×1
  • KeyComboModule.tryParse (cyclomatic 30) SageFs/RenderPipeline.fs:346 — KeyComboModule.tryParse has cyclomatic complexity 30 (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 · TestStateTracker.ProcessResultsBatch (cyclomatic 29) · ×1
  • TestStateTracker.ProcessResultsBatch (cyclomatic 29) sagefs-vs/SageFs.VisualStudio.Editor/TestStateTracker.cs:58 — TestStateTracker.ProcessResultsBatch 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 · HotReloading.hotReloadingMiddleware (cyclomatic 29) · ×1
  • HotReloading.hotReloadingMiddleware (cyclomatic 29) SageFs.Core/Middleware/HotReloading.fs:213 — HotReloading.hotReloadingMiddleware has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Program.main (cyclomatic 29) · ×1
  • Program.main (cyclomatic 29) SageFs/Program.fs:543 — Program.main has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · McpTools.evalSingleStatement (cyclomatic 29) · ×1
  • McpTools.evalSingleStatement (cyclomatic 29) SageFs/Mcp.fs:1029 — McpTools.evalSingleStatement has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ValueReads.fateAt (cyclomatic 28) · ×1
  • ValueReads.fateAt (cyclomatic 28) SageFs.Core/Middleware/ValueReads.fs:273 — ValueReads.fateAt has cyclomatic complexity 28 (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 · ProjectFSharpCoreIdentity.rewriteReferenceWith (cyclomatic 28) · ×1
  • ProjectFSharpCoreIdentity.rewriteReferenceWith (cyclomatic 28) SageFs.Core/IsolatedFsiSession.fs:317 — ProjectFSharpCoreIdentity.rewriteReferenceWith has cyclomatic complexity 28 (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 · StateMachineRenderer.render (cyclomatic 28) · ×1
  • StateMachineRenderer.render (cyclomatic 28) SageFs.Core/Features/DomainModelViz.fs:192 — StateMachineRenderer.render has cyclomatic complexity 28 (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 · Evaluator.RunGuarded (cyclomatic 28) · ×1
  • Evaluator.RunGuarded (cyclomatic 28) SageFs.Core/Features/MemberEvaluation.fs:136 — Evaluator.RunGuarded has cyclomatic complexity 28 (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 · LiveValueTree.classify (cyclomatic 28) · ×1
  • LiveValueTree.classify (cyclomatic 28) SageFs.Core/Features/LiveValueTree.fs:471 — LiveValueTree.classify has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · McpStdioBridge.run (cyclomatic 28) · ×1
  • McpStdioBridge.run (cyclomatic 28) SageFs/McpStdioBridge.fs:133 — McpStdioBridge.run has cyclomatic complexity 28 (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 · Ansi.tokenize (cyclomatic 28) · ×1
  • Ansi.tokenize (cyclomatic 28) scripts/lemmings/ui/nvim/Ansi.fs:128 — Ansi.tokenize 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 · Nvim.parseShellCommand (cyclomatic 27) · ×1
  • Nvim.parseShellCommand (cyclomatic 27) scripts/lemmings/ui/nvim/Nvim.fs:325 — Nvim.parseShellCommand has cyclomatic complexity 27 (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 · GenericReload.sharedStub (cyclomatic 26) · ×1
  • GenericReload.sharedStub (cyclomatic 26) SageFs.Core/Middleware/GenericReload.fs:504 — GenericReload.sharedStub has cyclomatic complexity 26 (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 · IsolatedFsiSession.start (cyclomatic 26) · ×1
  • IsolatedFsiSession.start (cyclomatic 26) SageFs.Core/IsolatedFsiSession.fs:670 — IsolatedFsiSession.start has cyclomatic complexity 26 (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 · FsiHostClient.start (cyclomatic 26) · ×1
  • FsiHostClient.start (cyclomatic 26) SageFs.Core/FsiHostClient.fs:483 — FsiHostClient.start has cyclomatic complexity 26 (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 · TrunkFollow.step (cyclomatic 26) · ×1
  • TrunkFollow.step (cyclomatic 26) SageFs.Core/Features/TrunkFollow.fs:268 — TrunkFollow.step has cyclomatic complexity 26 (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 · CategoryDetection.categorize (cyclomatic 26) · ×1
  • CategoryDetection.categorize (cyclomatic 26) SageFs.Core/Features/LiveTestingTypes.fs:2345 — CategoryDetection.categorize has cyclomatic complexity 26 (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 · CoreEvidence.inspectProject (cyclomatic 26) · ×1
  • CoreEvidence.inspectProject (cyclomatic 26) SageFs.Core/CoreEvidence.fs:144 — CoreEvidence.inspectProject has cyclomatic complexity 26 (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 · ReadyWaitSim.apply (cyclomatic 26) · ×1
  • ReadyWaitSim.apply (cyclomatic 26) SageFs.Simulation/ReadyWaitSim.fs:173 — ReadyWaitSim.apply has cyclomatic complexity 26 (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 · DashboardFragments.renderLiveBindingsPanel (cyclomatic 26) · ×1
  • DashboardFragments.renderLiveBindingsPanel (cyclomatic 26) SageFs/DashboardFragments.fs:3593 — DashboardFragments.renderLiveBindingsPanel has cyclomatic complexity 26 (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 · IsolatedFsiSession.planHost (cyclomatic 25) · ×1
  • IsolatedFsiSession.planHost (cyclomatic 25) SageFs.Core/IsolatedFsiSession.fs:572 — IsolatedFsiSession.planHost has cyclomatic complexity 25 (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 · SessionBuild.runBuildAsync (cyclomatic 25) · ×1
  • SessionBuild.runBuildAsync (cyclomatic 25) SageFs.Core/SessionBuild.fs:441 — SessionBuild.runBuildAsync has cyclomatic complexity 25 (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 · Dashboard.createSessionActionHandler (cyclomatic 25) · ×1
  • Dashboard.createSessionActionHandler (cyclomatic 25) SageFs/Dashboard.fs:2106 — Dashboard.createSessionActionHandler has cyclomatic complexity 25 (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 · Dashboard.createFrictionSendHandler (cyclomatic 25) · ×1
  • Dashboard.createFrictionSendHandler (cyclomatic 25) SageFs/Dashboard.fs:2372 — Dashboard.createFrictionSendHandler has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Screen.computeLayoutWith (cyclomatic 25) · ×1
  • Screen.computeLayoutWith (cyclomatic 25) SageFs/Screen.fs:185 — Screen.computeLayoutWith has cyclomatic complexity 25 (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 · ValueReads.decode (cyclomatic 24) · ×1
  • ValueReads.decode (cyclomatic 24) SageFs.Core/Middleware/ValueReads.fs:70 — ValueReads.decode has cyclomatic complexity 24 (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 · LiveValueTree.walkWithin (cyclomatic 24) · ×1
  • LiveValueTree.walkWithin (cyclomatic 24) SageFs.Core/Features/LiveValueTree.fs:863 — LiveValueTree.walkWithin has cyclomatic complexity 24 (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 · ShapeMigration.migrate (cyclomatic 24) · ×1
  • ShapeMigration.migrate (cyclomatic 24) SageFs.Core/ShapeMigration.fs:83 — ShapeMigration.migrate 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 · AppRunner.launch (cyclomatic 24) · ×1
  • AppRunner.launch (cyclomatic 24) SageFs.Host/AppRunner.fs:322 — AppRunner.launch has cyclomatic complexity 24 (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 · HygieneSim.applyOp (cyclomatic 24) · ×1
  • HygieneSim.applyOp (cyclomatic 24) SageFs.Simulation/HygieneSim.fs:246 — HygieneSim.applyOp has cyclomatic complexity 24 (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 · DashboardFragments.renderSessionContextPanel (cyclomatic 24) · ×1
  • DashboardFragments.renderSessionContextPanel (cyclomatic 24) SageFs/DashboardFragments.fs:3349 — DashboardFragments.renderSessionContextPanel has cyclomatic complexity 24 (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 · DashboardTypes.resolveSessionProjects (cyclomatic 24) · ×1
  • DashboardTypes.resolveSessionProjects (cyclomatic 24) SageFs/DashboardTypes.fs:1584 — DashboardTypes.resolveSessionProjects has cyclomatic complexity 24 (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 · Theme.parseConfigLines (cyclomatic 24) · ×1
  • Theme.parseConfigLines (cyclomatic 24) SageFs/Theme.fs:193 — Theme.parseConfigLines has cyclomatic complexity 24 (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 · NvimTour.parseLine (cyclomatic 24) · ×1
  • NvimTour.parseLine (cyclomatic 24) scripts/lemmings/ui/nvim/NvimTour.fs:120 — NvimTour.parseLine 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 · StatusBarManager.RunStartupHealthCheckAsync (cyclomatic 23) · ×1
  • StatusBarManager.RunStartupHealthCheckAsync (cyclomatic 23) sagefs-vs/SageFs.VisualStudio/StatusBar/StatusBarManager.cs:189 — StatusBarManager.RunStartupHealthCheckAsync 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 · LiveTestCycleStateModule.handleFcsResult (cyclomatic 23) · ×1
  • LiveTestCycleStateModule.handleFcsResult (cyclomatic 23) SageFs.Core/Features/LiveTestingCycle.fs:876 — LiveTestCycleStateModule.handleFcsResult has cyclomatic complexity 23 (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 · TweakTransaction.step (cyclomatic 23) · ×1
  • TweakTransaction.step (cyclomatic 23) SageFs.Core/Features/Tweak/TweakTransaction.fs:95 — TweakTransaction.step has cyclomatic complexity 23 (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 · GuardReachability.walk (cyclomatic 23) · ×1
  • GuardReachability.walk (cyclomatic 23) SageFs.Core/Features/GuardReachability.fs:183 — GuardReachability.walk has cyclomatic complexity 23 (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 · LiveValueTree.decode (cyclomatic 23) · ×1
  • LiveValueTree.decode (cyclomatic 23) SageFs.Core/Features/LiveValueTree.fs:218 — LiveValueTree.decode has cyclomatic complexity 23 (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 · AppRunOrchestration.runApp (cyclomatic 23) · ×1
  • AppRunOrchestration.runApp (cyclomatic 23) SageFs.Core/AppRunOrchestration.fs:239 — AppRunOrchestration.runApp has cyclomatic complexity 23 (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 · MachineProbeReader.storageOf (cyclomatic 23) · ×1
  • MachineProbeReader.storageOf (cyclomatic 23) SageFs.Core/MachineProfile.fs:368 — MachineProbeReader.storageOf has cyclomatic complexity 23 (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 · Session.Save (cyclomatic 23) · ×1
  • Session.Save (cyclomatic 23) SageFs.Host/RunAppDelta.fs:97 — Session.Save has cyclomatic complexity 23 (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 · TweakSim.step (cyclomatic 23) · ×1
  • TweakSim.step (cyclomatic 23) SageFs.Simulation/TweakSim.fs:323 — TweakSim.step has cyclomatic complexity 23 (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 · SageFsUpdate.finalizeLiveTestingState (cyclomatic 23) · ×1
  • SageFsUpdate.finalizeLiveTestingState (cyclomatic 23) SageFs/SageFsApp.fs:630 — SageFsUpdate.finalizeLiveTestingState has cyclomatic complexity 23 (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 · Draw.resolveJunctions (cyclomatic 23) · ×1
  • Draw.resolveJunctions (cyclomatic 23) SageFs/Draw.fs:104 — Draw.resolveJunctions has cyclomatic complexity 23 (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 · FileAnnotationTracker.ProcessFileAnnotations (cyclomatic 22) · ×1
  • FileAnnotationTracker.ProcessFileAnnotations (cyclomatic 22) sagefs-vs/SageFs.VisualStudio.Editor/FileAnnotationTracker.cs:61 — FileAnnotationTracker.ProcessFileAnnotations 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 · HotReloading.injectNoInlining (cyclomatic 22) · ×1
  • HotReloading.injectNoInlining (cyclomatic 22) SageFs.Core/Middleware/HotReloading.fs:149 — HotReloading.injectNoInlining has cyclomatic complexity 22 (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 · FailureNarrativeBuilder.buildNarrative (cyclomatic 22) · ×1
  • FailureNarrativeBuilder.buildNarrative (cyclomatic 22) SageFs.Core/Features/LiveTestingTypes.fs:1671 — FailureNarrativeBuilder.buildNarrative has cyclomatic complexity 22 (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 · TrunkFollowSim.runOp (cyclomatic 22) · ×1
  • TrunkFollowSim.runOp (cyclomatic 22) SageFs.Simulation/TrunkFollowSim.fs:256 — TrunkFollowSim.runOp has cyclomatic complexity 22 (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 · WorkflowSwitchSim.step (cyclomatic 22) · ×1
  • WorkflowSwitchSim.step (cyclomatic 22) SageFs.Simulation/WorkflowSwitchSim.fs:176 — WorkflowSwitchSim.step has cyclomatic complexity 22 (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 · JupyterTransport.parseFrames (cyclomatic 22) · ×1
  • JupyterTransport.parseFrames (cyclomatic 22) SageFs/JupyterTransport.fs:18 — JupyterTransport.parseFrames has cyclomatic complexity 22 (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 · HotReloadCore.handleNewAsmFromRepl (cyclomatic 21) · ×1
  • HotReloadCore.handleNewAsmFromRepl (cyclomatic 21) SageFs.Core/Middleware/HotReloadCore.fs:1565 — HotReloadCore.handleNewAsmFromRepl has cyclomatic complexity 21 (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 · ValueReadTracking.reflectionSitesOf (cyclomatic 21) · ×1
  • ValueReadTracking.reflectionSitesOf (cyclomatic 21) SageFs.Core/Middleware/ValueReadTracking.fs:549 — ValueReadTracking.reflectionSitesOf has cyclomatic complexity 21 (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 · IlCanon.sameWithoutLooking (cyclomatic 21) · ×1
  • IlCanon.sameWithoutLooking (cyclomatic 21) SageFs.Core/Features/MetadataDelta/IlCanon.fs:349 — IlCanon.sameWithoutLooking 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 · ProjectLoading.loadSolution (cyclomatic 21) · ×1
  • ProjectLoading.loadSolution (cyclomatic 21) SageFs.Core/ProjectLoading.fs:664 — ProjectLoading.loadSolution has cyclomatic complexity 21 (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 · Checkout.classify (cyclomatic 21) · ×1
  • Checkout.classify (cyclomatic 21) SageFs.Core/Checkout.fs:40 — Checkout.classify has cyclomatic complexity 21 (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 · Cohort.project (cyclomatic 21) · ×1
  • Cohort.project (cyclomatic 21) SageFs.Core/Cohort.fs:1591 — Cohort.project has cyclomatic complexity 21 (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 · PatchConfirmationSim.step (cyclomatic 21) · ×1
  • PatchConfirmationSim.step (cyclomatic 21) SageFs.Simulation/PatchConfirmationSim.fs:136 — PatchConfirmationSim.step has cyclomatic complexity 21 (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 · Dashboard.createToggleWarmupAutoOpenHandler (cyclomatic 21) · ×1
  • Dashboard.createToggleWarmupAutoOpenHandler (cyclomatic 21) SageFs/Dashboard.fs:2633 — Dashboard.createToggleWarmupAutoOpenHandler has cyclomatic complexity 21 (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 · McpCohortIntegration.setIntegrationRef (cyclomatic 21) · ×1
  • McpCohortIntegration.setIntegrationRef (cyclomatic 21) SageFs/McpCohortIntegration.fs:82 — McpCohortIntegration.setIntegrationRef has cyclomatic complexity 21 (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 · ValueReadTracking.walk (cyclomatic 20) · ×1
  • ValueReadTracking.walk (cyclomatic 20) SageFs.Core/Middleware/ValueReadTracking.fs:238 — ValueReadTracking.walk has cyclomatic complexity 20 (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 · EvalActorDecision.decide (cyclomatic 20) · ×1
  • EvalActorDecision.decide (cyclomatic 20) SageFs.Core/EvalActorDecision.fs:139 — EvalActorDecision.decide has cyclomatic complexity 20 (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 · ReflectionExecutor.invokeWith (cyclomatic 20) · ×1
  • ReflectionExecutor.invokeWith (cyclomatic 20) SageFs.Core/Features/LiveTestingExecutors.fs:55 — ReflectionExecutor.invokeWith has cyclomatic complexity 20 (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 · CoverageInstrumenter.insertBeforeWithFixup (cyclomatic 20) · ×1
  • CoverageInstrumenter.insertBeforeWithFixup (cyclomatic 20) SageFs.Core/Features/CoverageInstrumenter.fs:148 — CoverageInstrumenter.insertBeforeWithFixup has cyclomatic complexity 20 (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 · ReloadOutcomeModule.describe (cyclomatic 20) · ×1
  • ReloadOutcomeModule.describe (cyclomatic 20) SageFs.Core/Features/ReloadOutcome.fs:400 — ReloadOutcomeModule.describe has cyclomatic complexity 20 (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 · LiveValueTree.classifyGetter (cyclomatic 20) · ×1
  • LiveValueTree.classifyGetter (cyclomatic 20) SageFs.Core/Features/LiveValueTree.fs:307 — LiveValueTree.classifyGetter has cyclomatic complexity 20 (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 · HolderRewrite.classify (cyclomatic 20) · ×1
  • HolderRewrite.classify (cyclomatic 20) SageFs.Core/HolderRewrite.fs:103 — HolderRewrite.classify has cyclomatic complexity 20 (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 · DevReloadMiddleware.createMiddleware (cyclomatic 20) · ×1
  • DevReloadMiddleware.createMiddleware (cyclomatic 20) SageFs.Host/DevReloadMiddleware.fs:137 — DevReloadMiddleware.createMiddleware has cyclomatic complexity 20 (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 · WorkerLifecycleSim.stepReal (cyclomatic 20) · ×1
  • WorkerLifecycleSim.stepReal (cyclomatic 20) SageFs.Simulation/WorkerLifecycleSim.fs:162 — WorkerLifecycleSim.stepReal has cyclomatic complexity 20 (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 · Dashboard.createEvalFileHandler (cyclomatic 20) · ×1
  • Dashboard.createEvalFileHandler (cyclomatic 20) SageFs/Dashboard.fs:1680 — Dashboard.createEvalFileHandler has cyclomatic complexity 20 (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 · AnsiEmitter.emitDiff (cyclomatic 20) · ×1
  • AnsiEmitter.emitDiff (cyclomatic 20) SageFs/AnsiEmitter.fs:266 — AnsiEmitter.emitDiff has cyclomatic complexity 20 (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 · EnvCheck.sdkCheckFromInputs (cyclomatic 20) · ×1
  • EnvCheck.sdkCheckFromInputs (cyclomatic 20) SageFs/EnvCheck.fs:314 — EnvCheck.sdkCheckFromInputs has cyclomatic complexity 20 (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 · OpenDirective.openDirectiveMiddleware (cyclomatic 19) · ×1
  • OpenDirective.openDirectiveMiddleware (cyclomatic 19) SageFs.Core/Middleware/Directives.fs:28 — OpenDirective.openDirectiveMiddleware 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 · EvalStore.materializeScope (cyclomatic 19) · ×1
  • EvalStore.materializeScope (cyclomatic 19) SageFs.Core/Features/EvalStore.fs:359 — EvalStore.materializeScope 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 · ExpectoExecutor.runReflectedBody (cyclomatic 19) · ×1
  • ExpectoExecutor.runReflectedBody (cyclomatic 19) SageFs.Core/Features/LiveTestingExecutors.fs:578 — ExpectoExecutor.runReflectedBody 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 · TestOrchestrator.executeOne (cyclomatic 19) · ×1
  • TestOrchestrator.executeOne (cyclomatic 19) SageFs.Core/Features/LiveTestingExecutors.fs:970 — TestOrchestrator.executeOne 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 · CoverageBitmapModule.narrowByLines (cyclomatic 19) · ×1
  • CoverageBitmapModule.narrowByLines (cyclomatic 19) SageFs.Core/Features/LiveTestingTypes.fs:917 — CoverageBitmapModule.narrowByLines 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 · SessionManager.stopWorker (cyclomatic 19) · ×1
  • SessionManager.stopWorker (cyclomatic 19) SageFs.Core/SessionManager.fs:315 — SessionManager.stopWorker has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ExpensiveWorkLease.requestCore (cyclomatic 19) · ×1
  • ExpensiveWorkLease.requestCore (cyclomatic 19) SageFs.Core/ExpensiveWorkLease.fs:324 — ExpensiveWorkLease.requestCore 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 · CompileOrderInsight.analyzeWithReferences (cyclomatic 19) · ×1
  • CompileOrderInsight.analyzeWithReferences (cyclomatic 19) SageFs.Core/CompileOrderInsight.fs:156 — CompileOrderInsight.analyzeWithReferences 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 · HolderRewriteSim.unsafeOf (cyclomatic 19) · ×1
  • HolderRewriteSim.unsafeOf (cyclomatic 19) SageFs.Simulation/HolderRewriteSim.fs:94 — HolderRewriteSim.unsafeOf 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 · McpServer.mapStatusRoutes (cyclomatic 19) · ×1
  • McpServer.mapStatusRoutes (cyclomatic 19) SageFs/McpServer.fs:2687 — McpServer.mapStatusRoutes 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 · SageFsTools.set_reflection_read_mode (cyclomatic 19) · ×1
  • SageFsTools.set_reflection_read_mode (cyclomatic 19) SageFs/McpTools.fs:1424 — SageFsTools.set_reflection_read_mode 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. This is NOT this file's highest cyclomatic complexity: McpTools.blockerKindOf (cyclomatic 43) 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 · DashboardFragments.renderHighlightedLine (cyclomatic 19) · ×1
  • DashboardFragments.renderHighlightedLine (cyclomatic 19) SageFs/DashboardFragments.fs:727 — DashboardFragments.renderHighlightedLine 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 · HygieneEdge.removeWorktree (cyclomatic 19) · ×1
  • HygieneEdge.removeWorktree (cyclomatic 19) SageFs/HygieneEdge.fs:32 — HygieneEdge.removeWorktree 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 · DaemonClient.parseStateEvent (cyclomatic 19) · ×1
  • DaemonClient.parseStateEvent (cyclomatic 19) SageFs/DaemonClient.fs:51 — DaemonClient.parseStateEvent 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. This is NOT this file's highest cyclomatic complexity: DaemonClient.actionToApi (cyclomatic 53) 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 · KeyMapModule.parseConfigLines (cyclomatic 19) · ×1
  • KeyMapModule.parseConfigLines (cyclomatic 19) SageFs/RenderPipeline.fs:620 — KeyMapModule.parseConfigLines 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 · HotReloadCore.getAllMethods (cyclomatic 18) · ×1
  • HotReloadCore.getAllMethods (cyclomatic 18) SageFs.Core/Middleware/HotReloadCore.fs:61 — HotReloadCore.getAllMethods has cyclomatic complexity 18 (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 · SafeDirectoryWalk.walkFiles (cyclomatic 18) · ×1
  • SafeDirectoryWalk.walkFiles (cyclomatic 18) SageFs.Core/SafeDirectoryWalk.fs:91 — SafeDirectoryWalk.walkFiles has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DUExtractor.extractTransitionsFromSignature (cyclomatic 18) · ×1
  • DUExtractor.extractTransitionsFromSignature (cyclomatic 18) SageFs.Core/Features/DomainModelViz.fs:83 — DUExtractor.extractTransitionsFromSignature has cyclomatic complexity 18 (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 · SessionContextTui.detailLines (cyclomatic 18) · ×1
  • SessionContextTui.detailLines (cyclomatic 18) SageFs.Core/WarmupContext.fs:223 — SessionContextTui.detailLines has cyclomatic complexity 18 (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 · MemoryShedSim.scenarioOf (cyclomatic 18) · ×1
  • MemoryShedSim.scenarioOf (cyclomatic 18) SageFs.Simulation/MemoryShedSim.fs:210 — MemoryShedSim.scenarioOf has cyclomatic complexity 18 (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 · LiveCheckPumpSim.runOp (cyclomatic 18) · ×1
  • LiveCheckPumpSim.runOp (cyclomatic 18) SageFs.Simulation/LiveCheckPumpSim.fs:219 — LiveCheckPumpSim.runOp has cyclomatic complexity 18 (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 · SageFsTools.send_fsharp_code (cyclomatic 18) · ×1
  • SageFsTools.send_fsharp_code (cyclomatic 18) SageFs/McpTools.fs:752 — SageFsTools.send_fsharp_code has cyclomatic complexity 18 (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. This is NOT this file's highest cyclomatic complexity: McpTools.blockerKindOf (cyclomatic 43) 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 · Dashboard.createApiStateHandler (cyclomatic 18) · ×1
  • Dashboard.createApiStateHandler (cyclomatic 18) SageFs/Dashboard.fs:2703 — Dashboard.createApiStateHandler has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · CohortPlay.renderPlaySummary (cyclomatic 18) · ×1
  • CohortPlay.renderPlaySummary (cyclomatic 18) SageFs/CohortPlay.fs:29 — CohortPlay.renderPlaySummary has cyclomatic complexity 18 (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 · McpAnalysisViews.suggestRepairJson (cyclomatic 18) · ×1
  • McpAnalysisViews.suggestRepairJson (cyclomatic 18) SageFs/McpAnalysisViews.fs:71 — McpAnalysisViews.suggestRepairJson has cyclomatic complexity 18 (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 · HygieneGather.readProcesses (cyclomatic 18) · ×1
  • HygieneGather.readProcesses (cyclomatic 18) SageFs/HygieneGather.fs:192 — HygieneGather.readProcesses has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · LiveCheckPump.step (cyclomatic 17) · ×1
  • LiveCheckPump.step (cyclomatic 17) SageFs.Core/Features/LiveCheckPump.fs:141 — LiveCheckPump.step 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 · SideEffectClass.classify (cyclomatic 17) · ×1
  • SideEffectClass.classify (cyclomatic 17) SageFs.Core/Features/Tweak/SideEffectClass.fs:61 — SideEffectClass.classify 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 · Treemap.squarify (cyclomatic 17) · ×1
  • Treemap.squarify (cyclomatic 17) SageFs.Core/Features/Treemap.fs:29 — Treemap.squarify has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · FsiProtocol.writeValue (cyclomatic 17) · ×1
  • FsiProtocol.writeValue (cyclomatic 17) SageFs.FsiHost/FsiProtocol.fs:265 — FsiProtocol.writeValue 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 · HostAgent.afterEvalStep (cyclomatic 17) · ×1
  • HostAgent.afterEvalStep (cyclomatic 17) SageFs.Core/HostAgent.fs:197 — HostAgent.afterEvalStep 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 · RuntimeCompat.parseRuntimeRequirement (cyclomatic 17) · ×1
  • RuntimeCompat.parseRuntimeRequirement (cyclomatic 17) SageFs.Core/RuntimeCompat.fs:79 — RuntimeCompat.parseRuntimeRequirement 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 · AppRunner.resolveProjectAssembly (cyclomatic 17) · ×1
  • AppRunner.resolveProjectAssembly (cyclomatic 17) SageFs.Host/AppRunner.fs:177 — AppRunner.resolveProjectAssembly 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 · MemoryShedSim.step (cyclomatic 17) · ×1
  • MemoryShedSim.step (cyclomatic 17) SageFs.Simulation/MemoryShedSim.fs:166 — MemoryShedSim.step 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 · Program.sweepCommand (cyclomatic 17) · ×1
  • Program.sweepCommand (cyclomatic 17) SageFs/Program.fs:254 — Program.sweepCommand 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 · McpServer.mapAnalysisRoutes (cyclomatic 17) · ×1
  • McpServer.mapAnalysisRoutes (cyclomatic 17) SageFs/McpServer.fs:3574 — McpServer.mapAnalysisRoutes 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 · CohortInspector.search (cyclomatic 17) · ×1
  • CohortInspector.search (cyclomatic 17) SageFs/CohortInspector.fs:319 — CohortInspector.search 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 · McpTools.manageScratchPad (cyclomatic 17) · ×1
  • McpTools.manageScratchPad (cyclomatic 17) SageFs/Mcp.fs:3013 — McpTools.manageScratchPad 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 · SageFsMsgQueueCoalescing.tryAbsorbPending (cyclomatic 17) · ×1
  • SageFsMsgQueueCoalescing.tryAbsorbPending (cyclomatic 17) SageFs/SageFsApp.fs:515 — SageFsMsgQueueCoalescing.tryAbsorbPending 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 · ValidatedBufferModule.moveCursor (cyclomatic 17) · ×1
  • ValidatedBufferModule.moveCursor (cyclomatic 17) SageFs/Editor.fs:130 — ValidatedBufferModule.moveCursor 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 · Draw.textHighlighted (cyclomatic 17) · ×1
  • Draw.textHighlighted (cyclomatic 17) SageFs/Draw.fs:38 — Draw.textHighlighted 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 · DiagnosticStateTracker.ProcessDiagnosticsEvent (cyclomatic 16) · ×1
  • DiagnosticStateTracker.ProcessDiagnosticsEvent (cyclomatic 16) sagefs-vs/SageFs.VisualStudio.Editor/DiagnosticStateTracker.cs:42 — DiagnosticStateTracker.ProcessDiagnosticsEvent 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 · CompilationContext.transformWholeFile (cyclomatic 16) · ×1
  • CompilationContext.transformWholeFile (cyclomatic 16) SageFs.Core/Middleware/CompilationContext.fs:327 — CompilationContext.transformWholeFile has cyclomatic complexity 16 (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 · HotReloadCore.planGenericWork (cyclomatic 16) · ×1
  • HotReloadCore.planGenericWork (cyclomatic 16) SageFs.Core/Middleware/HotReloadCore.fs:1503 — HotReloadCore.planGenericWork has cyclomatic complexity 16 (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. This is NOT this file's highest cyclomatic complexity: HotReloadCore.compatibleForDetour (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 · ValueReads.localUse (cyclomatic 16) · ×1
  • ValueReads.localUse (cyclomatic 16) SageFs.Core/Middleware/ValueReads.fs:173 — ValueReads.localUse 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 · Diagnostician.summarize (cyclomatic 16) · ×1
  • Diagnostician.summarize (cyclomatic 16) SageFs.Core/Features/Diagnostician.fs:100 — Diagnostician.summarize has cyclomatic complexity 16 (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 · CohortStatusText.render (cyclomatic 16) · ×1
  • CohortStatusText.render (cyclomatic 16) SageFs.Core/Features/CohortStatusText.fs:11 — CohortStatusText.render 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 · CoverageBitmapModule.coveringTestsByLine (cyclomatic 16) · ×1
  • CoverageBitmapModule.coveringTestsByLine (cyclomatic 16) SageFs.Core/Features/LiveTestingTypes.fs:959 — CoverageBitmapModule.coveringTestsByLine has cyclomatic complexity 16 (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. This is NOT this file's highest cyclomatic complexity: SourceMapping.attributeMatchesFramework (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 · ReloadPlanning.planReload (cyclomatic 16) · ×1
  • ReloadPlanning.planReload (cyclomatic 16) SageFs.Core/Features/ReloadPlanning.fs:1242 — ReloadPlanning.planReload has cyclomatic complexity 16 (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. This is NOT this file's highest cyclomatic complexity: ReloadChangeModule.describe (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 · GuardReachability.implementationsIn (cyclomatic 16) · ×1
  • GuardReachability.implementationsIn (cyclomatic 16) SageFs.Core/Features/GuardReachability.fs:142 — GuardReachability.implementationsIn has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SessionHealthModule.classify (cyclomatic 16) · ×1
  • SessionHealthModule.classify (cyclomatic 16) SageFs.Core/SessionHealth.fs:123 — SessionHealthModule.classify has cyclomatic complexity 16 (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 · WorkerSpawn.startWorkerProcess (cyclomatic 16) · ×1
  • WorkerSpawn.startWorkerProcess (cyclomatic 16) SageFs.Core/WorkerSpawn.fs:28 — WorkerSpawn.startWorkerProcess has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · HttpWorkerClient.streamRun (cyclomatic 16) · ×1
  • HttpWorkerClient.streamRun (cyclomatic 16) SageFs.Core/HttpWorkerClient.fs:196 — HttpWorkerClient.streamRun has cyclomatic complexity 16 (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. This is NOT this file's highest cyclomatic complexity: HttpWorkerClient.toRoute (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 · Planner.stepOf (cyclomatic 16) · ×1
  • Planner.stepOf (cyclomatic 16) SageFs.Core/WorkspaceHygiene.fs:803 — Planner.stepOf has cyclomatic complexity 16 (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 · Executor.operationsFor (cyclomatic 16) · ×1
  • Executor.operationsFor (cyclomatic 16) SageFs.Core/WorkspaceHygiene.fs:957 — Executor.operationsFor has cyclomatic complexity 16 (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 · WorkerConfigModule.fromEnvironmentWith (cyclomatic 16) · ×1
  • WorkerConfigModule.fromEnvironmentWith (cyclomatic 16) SageFs.Core/Args.fs:120 — WorkerConfigModule.fromEnvironmentWith has cyclomatic complexity 16 (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 · DevReloadInjector.install (cyclomatic 16) · ×1
  • DevReloadInjector.install (cyclomatic 16) SageFs.Host/DevReloadInjector.fs:131 — DevReloadInjector.install has cyclomatic complexity 16 (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 · SourceStateSim.decideWith (cyclomatic 16) · ×1
  • SourceStateSim.decideWith (cyclomatic 16) SageFs.Simulation/SourceStateSim.fs:171 — SourceStateSim.decideWith has cyclomatic complexity 16 (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. This is NOT this file's highest cyclomatic complexity: SourceStateSim.runOp (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 · WorkerReloadRelay.start (cyclomatic 16) · ×1
  • WorkerReloadRelay.start (cyclomatic 16) SageFs/WorkerReloadRelay.fs:129 — WorkerReloadRelay.start has cyclomatic complexity 16 (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 · McpServer.replayCachedTestState (cyclomatic 16) · ×1
  • McpServer.replayCachedTestState (cyclomatic 16) SageFs/McpServer.fs:1047 — McpServer.replayCachedTestState has cyclomatic complexity 16 (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 · PanelVisibilityModule.decide (cyclomatic 16) · ×1
  • PanelVisibilityModule.decide (cyclomatic 16) SageFs/DashboardTypes.fs:1366 — PanelVisibilityModule.decide has cyclomatic complexity 16 (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 · TrunkFollowShell.move (cyclomatic 16) · ×1
  • TrunkFollowShell.move (cyclomatic 16) SageFs/TrunkFollowShell.fs:73 — TrunkFollowShell.move has cyclomatic complexity 16 (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 · Answer.planRipple (cyclomatic 16) · ×1
  • Answer.planRipple (cyclomatic 16) SageFs/McpAnalysis.fs:164 — Answer.planRipple has cyclomatic complexity 16 (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 · McpTools.switchWorkflow (cyclomatic 16) · ×1
  • McpTools.switchWorkflow (cyclomatic 16) SageFs/Mcp.fs:2289 — McpTools.switchWorkflow has cyclomatic complexity 16 (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 · McpTools.getMessageJournal (cyclomatic 16) · ×1
  • McpTools.getMessageJournal (cyclomatic 16) SageFs/Mcp.fs:2929 — McpTools.getMessageJournal has cyclomatic complexity 16 (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 · McpAdapter.formatWarmupDetailForLlm (cyclomatic 16) · ×1
  • McpAdapter.formatWarmupDetailForLlm (cyclomatic 16) SageFs/McpAdapter.fs:223 — McpAdapter.formatWarmupDetailForLlm has cyclomatic complexity 16 (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 · CohortGit.rebaseCommitsOnto (cyclomatic 16) · ×1
  • CohortGit.rebaseCommitsOnto (cyclomatic 16) SageFs/CohortGit.fs:279 — CohortGit.rebaseCommitsOnto has cyclomatic complexity 16 (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 · SageFsEffectHandler.startConfirmationBuild (cyclomatic 16) · ×1
  • SageFsEffectHandler.startConfirmationBuild (cyclomatic 16) SageFs/SageFsEffectHandler.fs:281 — SageFsEffectHandler.startConfirmationBuild has cyclomatic complexity 16 (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 · createSseSubscriber.startListening (cyclomatic 16) · ×1
  • createSseSubscriber.startListening (cyclomatic 16) sagefs-vscode/src/sse-helpers.js:38 — createSseSubscriber.startListening has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 40, 61). 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.
D17 · Explicit Debt · BarePragmaDisable repeated across 16 files · ×1
  • BarePragmaDisable repeated across 16 files sagefs-vs/SageFs.VisualStudio/Commands/CellNavigationCommands.cs:11 — The identical BarePragmaDisable (`#pragma warning disable VSEXTPREVIEW_OUTPUTWINDOW`) appears in 16 files (16 occurrences) — a single repo-wide policy (e.g. a Directory.Build.props decision or an idiomatic suppression), not 16 independent debts. Decide it once centrally rather than file-by-file. (Every occurrence still counts toward the score and metrics.)
D2 · Cognitive Complexity · WorkerMain.run (cognitive 402) · ×1
  • WorkerMain.run (cognitive 402) SageFs.Host/WorkerMain.fs:561 — WorkerMain.run has cognitive complexity 402 (threshold 15). Drivers by points: match/switch 108 (348 pts), error handling 14 (29 pts), if/else 7 (12 pts), loops 4 (9 pts), boolean chains 4 (nesting depth added 265). 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 · DaemonMode.run (cognitive 324) · ×1
  • DaemonMode.run (cognitive 324) SageFs/DaemonMode.fs:2116 — DaemonMode.run has cognitive complexity 324 (threshold 15). Drivers by points: match/switch 122 (219 pts), error handling 38 (59 pts), if/else 16 (24 pts), loops 9 (14 pts), boolean chains 8 (nesting depth added 131). 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 · SageFsUpdate.update (cognitive 289) · ×1
  • SageFsUpdate.update (cognitive 289) SageFs/SageFsApp.fs:1121 — SageFsUpdate.update has cognitive complexity 289 (threshold 15). Drivers by points: match/switch 92 (276 pts), boolean chains 13 (nesting depth added 184). 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 · SageFsEffectHandler.execute (cognitive 254) · ×1
  • SageFsEffectHandler.execute (cognitive 254) SageFs/SageFsEffectHandler.fs:341 — SageFsEffectHandler.execute has cognitive complexity 254 (threshold 15). Drivers by points: match/switch 55 (219 pts), error handling 5 (18 pts), loops 3 (15 pts), boolean chains 2 (nesting depth added 189). 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 · Cohort.decideRaw (cognitive 231) · ×1
  • Cohort.decideRaw (cognitive 231) SageFs.Core/Cohort.fs:853 — Cohort.decideRaw has cognitive complexity 231 (threshold 15). Drivers by points: match/switch 53 (178 pts), if/else 20 (49 pts), boolean chains 4 (nesting depth added 154). 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 · SessionManager.createWithAlarm (cognitive 225) · ×1
  • SessionManager.createWithAlarm (cognitive 225) SageFs.Core/SessionManager.fs:434 — SessionManager.createWithAlarm has cognitive complexity 225 (threshold 15). Drivers by points: match/switch 66 (198 pts), error handling 8 (11 pts), if/else 6 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 142). 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 · AppState.mkAppStateActor (cognitive 180) · ×1
  • AppState.mkAppStateActor (cognitive 180) SageFs.Core/AppState.fs:1047 — AppState.mkAppStateActor has cognitive complexity 180 (threshold 15). Drivers by points: match/switch 68 (144 pts), error handling 13 (33 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 97). 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 · GenericReload.reach (cognitive 151) · ×1
  • GenericReload.reach (cognitive 151) SageFs.Core/Middleware/GenericReload.fs:193 — GenericReload.reach has cognitive complexity 151 (threshold 15). Drivers by points: match/switch 32 (115 pts), loops 6 (12 pts), if/else 2 (11 pts), boolean chains 7, error handling 2 (6 pts) (nesting depth added 102). 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 · ManifestReader.read (cognitive 151) · ×1
  • ManifestReader.read (cognitive 151) SageFs.Core/Features/ManifestPersistence.fs:125 — ManifestReader.read has cognitive complexity 151 (threshold 15). Drivers by points: match/switch 14 (101 pts), loops 3 (33 pts), if/else 1 (13 pts), boolean chains 3, error handling 1 (nesting depth added 129). 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 · Program.run (cognitive 130) · ×1
  • Program.run (cognitive 130) SageFs.FsiHost/Program.fs:136 — Program.run has cognitive complexity 130 (threshold 15). Drivers by points: error handling 20 (72 pts), match/switch 18 (54 pts), boolean chains 2, loops 2 (nesting depth added 88). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LiveValueTree.buildNode (cognitive 128) · ×1
  • LiveValueTree.buildNode (cognitive 128) SageFs.Core/Features/LiveValueTree.fs:542 — LiveValueTree.buildNode has cognitive complexity 128 (threshold 15). Drivers by points: match/switch 18 (72 pts), error handling 10 (44 pts), if/else 8 (11 pts), boolean chains 1 (nesting depth added 91). 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 · DashboardFragments.renderSessionsForSession (cognitive 107) · ×1
  • DashboardFragments.renderSessionsForSession (cognitive 107) SageFs/DashboardFragments.fs:1519 — DashboardFragments.renderSessionsForSession has cognitive complexity 107 (threshold 15). Drivers by points: match/switch 46 (105 pts), boolean chains 2 (nesting depth added 59). 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 · ElmLoop.startWithCoalescerAndReducer (cognitive 101) · ×1
  • ElmLoop.startWithCoalescerAndReducer (cognitive 101) SageFs/ElmLoop.fs:75 — ElmLoop.startWithCoalescerAndReducer has cognitive complexity 101 (threshold 15). Drivers by points: error handling 16 (40 pts), if/else 13 (26 pts), match/switch 15 (25 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MethodDiff.diff (cognitive 97) · ×1
  • MethodDiff.diff (cognitive 97) SageFs.Core/Features/MetadataDelta/MethodDiff.fs:182 — MethodDiff.diff has cognitive complexity 97 (threshold 15). Drivers by points: match/switch 26 (87 pts), loops 8, boolean chains 2 (nesting depth added 61). 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 · Dashboard.createStreamHandler (cognitive 97) · ×1
  • Dashboard.createStreamHandler (cognitive 97) SageFs/Dashboard.fs:1218 — Dashboard.createStreamHandler has cognitive complexity 97 (threshold 15). Drivers by points: error handling 34 (57 pts), match/switch 19 (31 pts), if/else 3 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · McpServer.mapSessionRoutes (cognitive 86) · ×1
  • McpServer.mapSessionRoutes (cognitive 86) SageFs/McpServer.fs:2800 — McpServer.mapSessionRoutes has cognitive complexity 86 (threshold 15). Drivers by points: match/switch 40 (76 pts), error handling 3 (9 pts), loops 1 (nesting depth added 42). 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 · Screen.drawWith (cognitive 81) · ×1
  • Screen.drawWith (cognitive 81) SageFs/Screen.fs:263 — Screen.drawWith has cognitive complexity 81 (threshold 15). Drivers by points: match/switch 20 (72 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 55). 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 · DeltaRouteSim.step (cognitive 80) · ×1
  • DeltaRouteSim.step (cognitive 80) SageFs.Simulation/DeltaRouteSim.fs:241 — DeltaRouteSim.step has cognitive complexity 80 (threshold 15). Drivers by points: match/switch 25 (72 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 52). 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 · DeltaChain.write (cognitive 77) · ×1
  • DeltaChain.write (cognitive 77) SageFs.Core/Features/MetadataDelta/DeltaWriter.fs:492 — DeltaChain.write has cognitive complexity 77 (threshold 15). Drivers by points: match/switch 34 (57 pts), loops 13 (15 pts), boolean chains 3, error handling 2 (nesting depth added 25). 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 · WorkerHttpTransport.startServerWithShutdown (cognitive 77) · ×1
  • WorkerHttpTransport.startServerWithShutdown (cognitive 77) SageFs.Host/WorkerHttpTransport.fs:331 — WorkerHttpTransport.startServerWithShutdown has cognitive complexity 77 (threshold 15). Drivers by points: match/switch 28 (54 pts), error handling 9 (12 pts), loops 5 (11 pts) (nesting depth added 35). 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 · AppState.discoverWarmupReplayPlan (cognitive 73) · ×1
  • AppState.discoverWarmupReplayPlan (cognitive 73) SageFs.Core/AppState.fs:447 — AppState.discoverWarmupReplayPlan has cognitive complexity 73 (threshold 15). Drivers by points: match/switch 14 (47 pts), loops 6 (12 pts), error handling 3 (6 pts), if/else 2 (5 pts), boolean chains 3 (nesting depth added 45). 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 · ReflectionReadSim.runWith (cognitive 73) · ×1
  • ReflectionReadSim.runWith (cognitive 73) SageFs.Simulation/ReflectionReadSim.fs:172 — ReflectionReadSim.runWith has cognitive complexity 73 (threshold 15). Drivers by points: match/switch 25 (63 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 40). 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 · McpServer.wireModelChangeHandlers (cognitive 71) · ×1
  • McpServer.wireModelChangeHandlers (cognitive 71) SageFs/McpServer.fs:1506 — McpServer.wireModelChangeHandlers has cognitive complexity 71 (threshold 15). Drivers by points: match/switch 22 (46 pts), error handling 6 (11 pts), loops 4 (10 pts), boolean chains 4 (nesting depth added 35). 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 · CategoryDetection.categorize (cognitive 69) · ×1
  • CategoryDetection.categorize (cognitive 69) SageFs.Core/Features/LiveTestingTypes.fs:2345 — CategoryDetection.categorize has cognitive complexity 69 (threshold 15). Drivers by points: match/switch 11 (66 pts), boolean chains 3 (nesting depth added 55). 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 · Store.create (cognitive 69) · ×1
  • Store.create (cognitive 69) SageFs/FrictionSqlite.fs:250 — Store.create has cognitive complexity 69 (threshold 15). Drivers by points: if/else 20 (37 pts), match/switch 7 (12 pts), error handling 11, loops 9 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dashboard.createFrictionSendHandler (cognitive 68) · ×1
  • Dashboard.createFrictionSendHandler (cognitive 68) SageFs/Dashboard.fs:2372 — Dashboard.createFrictionSendHandler has cognitive complexity 68 (threshold 15). Drivers by points: match/switch 10 (30 pts), if/else 7 (25 pts), error handling 4 (13 pts) (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Evaluator.RunGuarded (cognitive 66) · ×1
  • Evaluator.RunGuarded (cognitive 66) SageFs.Core/Features/MemberEvaluation.fs:136 — Evaluator.RunGuarded has cognitive complexity 66 (threshold 15). Drivers by points: match/switch 12 (49 pts), error handling 4 (17 pts) (nesting depth added 50). 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 · TestCycleEffects.decideAfterTypeCheck (cognitive 65) · ×1
  • TestCycleEffects.decideAfterTypeCheck (cognitive 65) SageFs.Core/Features/LiveTestingCycle.fs:76 — TestCycleEffects.decideAfterTypeCheck has cognitive complexity 65 (threshold 15). Drivers by points: match/switch 20 (57 pts), boolean chains 8 (nesting depth added 37). 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 · DaemonMode.createSessionOpsWithRecovery (cognitive 64) · ×1
  • DaemonMode.createSessionOpsWithRecovery (cognitive 64) SageFs/DaemonMode.fs:516 — DaemonMode.createSessionOpsWithRecovery has cognitive complexity 64 (threshold 15). Drivers by points: match/switch 18 (62 pts), error handling 2 (nesting depth added 44). 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 · IlCanon.canonicalize (cognitive 61) · ×1
  • IlCanon.canonicalize (cognitive 61) SageFs.Core/Features/MetadataDelta/IlCanon.fs:226 — IlCanon.canonicalize has cognitive complexity 61 (threshold 15). Drivers by points: match/switch 19 (56 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 39). 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 · CapabilitySim.step (cognitive 59) · ×1
  • CapabilitySim.step (cognitive 59) SageFs.Simulation/CapabilitySim.fs:223 — CapabilitySim.step has cognitive complexity 59 (threshold 15). Drivers by points: match/switch 16 (43 pts), if/else 6 (15 pts), boolean chains 1 (nesting depth added 36). 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 · IsolatedFsiSession.planHost (cognitive 58) · ×1
  • IsolatedFsiSession.planHost (cognitive 58) SageFs.Core/IsolatedFsiSession.fs:572 — IsolatedFsiSession.planHost has cognitive complexity 58 (threshold 15). Drivers by points: match/switch 11 (44 pts), loops 3 (13 pts), boolean chains 1 (nesting depth added 43). 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 · IsolatedFsiSession.start (cognitive 58) · ×1
  • IsolatedFsiSession.start (cognitive 58) SageFs.Core/IsolatedFsiSession.fs:670 — IsolatedFsiSession.start has cognitive complexity 58 (threshold 15). Drivers by points: match/switch 14 (58 pts) (nesting depth added 44). 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 · GuardReachability.walk (cognitive 58) · ×1
  • GuardReachability.walk (cognitive 58) SageFs.Core/Features/GuardReachability.fs:183 — GuardReachability.walk has cognitive complexity 58 (threshold 15). Drivers by points: match/switch 9 (32 pts), loops 4 (25 pts), boolean chains 1 (nesting depth added 44). 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 · WorkerStartup.await (cognitive 58) · ×1
  • WorkerStartup.await (cognitive 58) SageFs.Core/WorkerStartup.fs:37 — WorkerStartup.await has cognitive complexity 58 (threshold 15). Drivers by points: error handling 16 (36 pts), match/switch 7 (18 pts), loops 3 (4 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Ansi.tokenize (cognitive 58) · ×1
  • Ansi.tokenize (cognitive 58) scripts/lemmings/ui/nvim/Ansi.fs:128 — Ansi.tokenize has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 4 (16 pts), boolean chains 6, match/switch 1 (4 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AppState.createFsiSession (cognitive 55) · ×1
  • AppState.createFsiSession (cognitive 55) SageFs.Core/AppState.fs:704 — AppState.createFsiSession has cognitive complexity 55 (threshold 15). Drivers by points: match/switch 23 (39 pts), loops 4 (9 pts), error handling 4 (7 pts) (nesting depth added 24). 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 · McpAdapter.splitStatements (cognitive 54) · ×1
  • McpAdapter.splitStatements (cognitive 54) SageFs/McpAdapter.fs:282 — McpAdapter.splitStatements has cognitive complexity 54 (threshold 15). Drivers by points: match/switch 9 (28 pts), loops 6 (16 pts), boolean chains 10 (nesting depth added 29). 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 · ProjectFSharpCoreIdentity.rewriteReferenceWith (cognitive 52) · ×1
  • ProjectFSharpCoreIdentity.rewriteReferenceWith (cognitive 52) SageFs.Core/IsolatedFsiSession.fs:317 — ProjectFSharpCoreIdentity.rewriteReferenceWith has cognitive complexity 52 (threshold 15). Drivers by points: match/switch 9 (33 pts), loops 6 (18 pts), boolean chains 1 (nesting depth added 36). 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 · Theme.parseConfigLines (cognitive 52) · ×1
  • Theme.parseConfigLines (cognitive 52) SageFs/Theme.fs:193 — Theme.parseConfigLines has cognitive complexity 52 (threshold 15). Drivers by points: match/switch 9 (46 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 39). 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 · ShapeMigration.migrate (cognitive 50) · ×1
  • ShapeMigration.migrate (cognitive 50) SageFs.Core/ShapeMigration.fs:83 — ShapeMigration.migrate has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 7 (22 pts), error handling 1 (5 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · McpTools.resolveSessionId (cognitive 50) · ×1
  • McpTools.resolveSessionId (cognitive 50) SageFs/Mcp.fs:418 — McpTools.resolveSessionId has cognitive complexity 50 (threshold 15). Drivers by points: match/switch 15 (50 pts) (nesting depth added 35). 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 · ValueReadTracking.reflectionSitesOf (cognitive 49) · ×1
  • ValueReadTracking.reflectionSitesOf (cognitive 49) SageFs.Core/Middleware/ValueReadTracking.fs:549 — ValueReadTracking.reflectionSitesOf has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 9 (34 pts), error handling 3 (12 pts), boolean chains 3 (nesting depth added 34). 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 · TriviaNormalization.normalize (cognitive 49) · ×1
  • TriviaNormalization.normalize (cognitive 49) SageFs.Core/Features/LiveTestingTypes.fs:95 — TriviaNormalization.normalize has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (43 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FsiProtocol.readValue (cognitive 48) · ×1
  • FsiProtocol.readValue (cognitive 48) SageFs.FsiHost/FsiProtocol.fs:335 — FsiProtocol.readValue has cognitive complexity 48 (threshold 15). Drivers by points: match/switch 15 (36 pts), if/else 11, boolean chains 1 (nesting depth added 21). 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 · SessionBuild.runBuildAsync (cognitive 48) · ×1
  • SessionBuild.runBuildAsync (cognitive 48) SageFs.Core/SessionBuild.fs:441 — SessionBuild.runBuildAsync has cognitive complexity 48 (threshold 15). Drivers by points: match/switch 9 (29 pts), loops 3 (11 pts), error handling 2 (8 pts) (nesting depth added 34). 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 · CoreEvidence.inspectProject (cognitive 48) · ×1
  • CoreEvidence.inspectProject (cognitive 48) SageFs.Core/CoreEvidence.fs:144 — CoreEvidence.inspectProject has cognitive complexity 48 (threshold 15). Drivers by points: match/switch 13 (44 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 33). 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 · McpServer.wireSessionEventSubscription (cognitive 48) · ×1
  • McpServer.wireSessionEventSubscription (cognitive 48) SageFs/McpServer.fs:1160 — McpServer.wireSessionEventSubscription has cognitive complexity 48 (threshold 15). Drivers by points: match/switch 11 (36 pts), error handling 4 (12 pts) (nesting depth added 33). 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 · McpTools.evalSingleStatement (cognitive 48) · ×1
  • McpTools.evalSingleStatement (cognitive 48) SageFs/Mcp.fs:1029 — McpTools.evalSingleStatement has cognitive complexity 48 (threshold 15). Drivers by points: match/switch 13 (40 pts), error handling 2 (8 pts) (nesting depth added 33). 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 · ReloadPlanning.stripCommentsAndStrings (cognitive 45) · ×1
  • ReloadPlanning.stripCommentsAndStrings (cognitive 45) SageFs.Core/Features/ReloadPlanning.fs:906 — ReloadPlanning.stripCommentsAndStrings has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 11, match/switch 4 (9 pts), loops 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JupyterTransport.parseFrames (cognitive 45) · ×1
  • JupyterTransport.parseFrames (cognitive 45) SageFs/JupyterTransport.fs:18 — JupyterTransport.parseFrames has cognitive complexity 45 (threshold 15). Drivers by points: match/switch 11 (41 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 31). 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 · EditorUpdate.update (cognitive 45) · ×1
  • EditorUpdate.update (cognitive 45) SageFs/Editor.fs:250 — EditorUpdate.update has cognitive complexity 45 (threshold 15). Drivers by points: match/switch 19 (43 pts), boolean chains 2 (nesting depth added 24). 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 · LiveValueTree.classifyGetter (cognitive 44) · ×1
  • LiveValueTree.classifyGetter (cognitive 44) SageFs.Core/Features/LiveValueTree.fs:307 — LiveValueTree.classifyGetter has cognitive complexity 44 (threshold 15). Drivers by points: match/switch 8 (33 pts), error handling 2 (8 pts), boolean chains 3 (nesting depth added 31). 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 · FileAnnotationTracker.ProcessFileAnnotations (cognitive 43) · ×1
  • FileAnnotationTracker.ProcessFileAnnotations (cognitive 43) sagefs-vs/SageFs.VisualStudio.Editor/FileAnnotationTracker.cs:61 — FileAnnotationTracker.ProcessFileAnnotations 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 · SafeDirectoryWalk.walkFiles (cognitive 43) · ×1
  • SafeDirectoryWalk.walkFiles (cognitive 43) SageFs.Core/SafeDirectoryWalk.fs:91 — SafeDirectoryWalk.walkFiles has cognitive complexity 43 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (13 pts), error handling 3 (10 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · McpServer.mapLiveTestingRoutes (cognitive 43) · ×1
  • McpServer.mapLiveTestingRoutes (cognitive 43) SageFs/McpServer.fs:3325 — McpServer.mapLiveTestingRoutes has cognitive complexity 43 (threshold 15). Drivers by points: match/switch 20 (37 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 19). 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 · Dashboard.createEndpoints (cognitive 43) · ×1
  • Dashboard.createEndpoints (cognitive 43) SageFs/Dashboard.fs:2995 — Dashboard.createEndpoints has cognitive complexity 43 (threshold 15). Drivers by points: match/switch 23 (36 pts), error handling 5, boolean chains 1, loops 1 (nesting depth added 13). 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 · CoverageBitmapModule.coveringTestsByLine (cognitive 42) · ×1
  • CoverageBitmapModule.coveringTestsByLine (cognitive 42) SageFs.Core/Features/LiveTestingTypes.fs:959 — CoverageBitmapModule.coveringTestsByLine has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 6 (27 pts), loops 4 (14 pts), boolean chains 1 (nesting depth added 31). 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 · LiveValueTree.walkWithin (cognitive 42) · ×1
  • LiveValueTree.walkWithin (cognitive 42) SageFs.Core/Features/LiveValueTree.fs:863 — LiveValueTree.walkWithin has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 9 (27 pts), loops 3 (9 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 26). 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 · Program.sweepCommand (cognitive 42) · ×1
  • Program.sweepCommand (cognitive 42) SageFs/Program.fs:254 — Program.sweepCommand has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 7 (25 pts), error handling 3 (15 pts), loops 1 (2 pts) (nesting depth added 31). 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 · KeyMapModule.parseConfigLines (cognitive 42) · ×1
  • KeyMapModule.parseConfigLines (cognitive 42) SageFs/RenderPipeline.fs:620 — KeyMapModule.parseConfigLines has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 8 (37 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 31). 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 · HotReloading.hotReloadingMiddleware (cognitive 41) · ×1
  • HotReloading.hotReloadingMiddleware (cognitive 41) SageFs.Core/Middleware/HotReloading.fs:213 — HotReloading.hotReloadingMiddleware has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 15 (41 pts) (nesting depth added 26). 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 · ValueReadSim.runWith (cognitive 41) · ×1
  • ValueReadSim.runWith (cognitive 41) SageFs.Simulation/ValueReadSim.fs:302 — ValueReadSim.runWith has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 19 (32 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AnsiEmitter.emitDiff (cognitive 41) · ×1
  • AnsiEmitter.emitDiff (cognitive 41) SageFs/AnsiEmitter.fs:266 — AnsiEmitter.emitDiff has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 8 (35 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 30). 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 · NvimTour.parseLine (cognitive 41) · ×1
  • NvimTour.parseLine (cognitive 41) scripts/lemmings/ui/nvim/NvimTour.fs:120 — NvimTour.parseLine has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (31 pts), match/switch 3 (7 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DaemonMode.resumePreviousSessions (cognitive 40) · ×1
  • DaemonMode.resumePreviousSessions (cognitive 40) SageFs/DaemonMode.fs:1673 — DaemonMode.resumePreviousSessions has cognitive complexity 40 (threshold 15). Drivers by points: match/switch 19 (36 pts), loops 2 (4 pts) (nesting depth added 19). 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 · DiagnosticStateTracker.ProcessDiagnosticsEvent (cognitive 37) · ×1
  • DiagnosticStateTracker.ProcessDiagnosticsEvent (cognitive 37) sagefs-vs/SageFs.VisualStudio.Editor/DiagnosticStateTracker.cs:42 — DiagnosticStateTracker.ProcessDiagnosticsEvent 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 · HotReloadCore.handleNewAsmFromRepl (cognitive 37) · ×1
  • HotReloadCore.handleNewAsmFromRepl (cognitive 37) SageFs.Core/Middleware/HotReloadCore.fs:1565 — HotReloadCore.handleNewAsmFromRepl has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 11 (30 pts), error handling 1 (5 pts), boolean chains 2 (nesting depth added 23). 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 · WorkerSpawn.startWorkerProcess (cognitive 37) · ×1
  • WorkerSpawn.startWorkerProcess (cognitive 37) SageFs.Core/WorkerSpawn.fs:28 — WorkerSpawn.startWorkerProcess has cognitive complexity 37 (threshold 15). Drivers by points: error handling 4 (19 pts), match/switch 7 (18 pts) (nesting depth added 26). 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 · ProjectLoading.loadSolution (cognitive 37) · ×1
  • ProjectLoading.loadSolution (cognitive 37) SageFs.Core/ProjectLoading.fs:664 — ProjectLoading.loadSolution has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 9 (24 pts), error handling 2 (7 pts), loops 2 (4 pts), if/else 1 (2 pts) (nesting depth added 23). 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 · McpServer.createServerCaptureFilter (cognitive 37) · ×1
  • McpServer.createServerCaptureFilter (cognitive 37) SageFs/McpServer.fs:298 — McpServer.createServerCaptureFilter has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 19 (29 pts), if/else 2 (4 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 13). 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 · Dashboard.buildDashboardSnapshotWithSessions (cognitive 37) · ×1
  • Dashboard.buildDashboardSnapshotWithSessions (cognitive 37) SageFs/Dashboard.fs:866 — Dashboard.buildDashboardSnapshotWithSessions has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 22 (37 pts) (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · StatusBarManager.RunStartupHealthCheckAsync (cognitive 36) · ×1
  • StatusBarManager.RunStartupHealthCheckAsync (cognitive 36) sagefs-vs/SageFs.VisualStudio/StatusBar/StatusBarManager.cs:189 — StatusBarManager.RunStartupHealthCheckAsync has cognitive complexity 36 (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 · SessionManager.stopWorker (cognitive 36) · ×1
  • SessionManager.stopWorker (cognitive 36) SageFs.Core/SessionManager.fs:315 — SessionManager.stopWorker has cognitive complexity 36 (threshold 15). Drivers by points: error handling 11 (28 pts), match/switch 3 (6 pts), if/else 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameDiff.parsePositionedLines (cognitive 36) · ×1
  • FrameDiff.parsePositionedLines (cognitive 36) SageFs/TerminalUI.fs:218 — FrameDiff.parsePositionedLines has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 9 (29 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 22). 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 · EnvCheck.sdkCheckFromInputs (cognitive 36) · ×1
  • EnvCheck.sdkCheckFromInputs (cognitive 36) SageFs/EnvCheck.fs:314 — EnvCheck.sdkCheckFromInputs has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 10 (35 pts), boolean chains 1 (nesting depth added 25). 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 · MachineProbeReader.storageOf (cognitive 35) · ×1
  • MachineProbeReader.storageOf (cognitive 35) SageFs.Core/MachineProfile.fs:368 — MachineProbeReader.storageOf has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 11 (33 pts), boolean chains 1, error handling 1 (nesting depth added 22). 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 · CohortInspector.search (cognitive 35) · ×1
  • CohortInspector.search (cognitive 35) SageFs/CohortInspector.fs:319 — CohortInspector.search has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (25 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HotReloadCore.applyDetourPlan (cognitive 34) · ×1
  • HotReloadCore.applyDetourPlan (cognitive 34) SageFs.Core/Middleware/HotReloadCore.fs:843 — HotReloadCore.applyDetourPlan has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 20 (27 pts), loops 4, error handling 2 (3 pts) (nesting depth added 8). 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 · Treemap.squarify (cognitive 34) · ×1
  • Treemap.squarify (cognitive 34) SageFs.Core/Features/Treemap.fs:29 — Treemap.squarify has cognitive complexity 34 (threshold 15). Drivers by points: loops 4 (12 pts), match/switch 4 (12 pts), if/else 4 (8 pts), boolean chains 2 (nesting depth added 20). 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 · DashboardFragments.renderFailureNarratives (cognitive 34) · ×1
  • DashboardFragments.renderFailureNarratives (cognitive 34) SageFs/DashboardFragments.fs:588 — DashboardFragments.renderFailureNarratives has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 4 (9 pts), loops 1 (2 pts) (nesting depth added 18). 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 · HygieneGather.readProcesses (cognitive 34) · ×1
  • HygieneGather.readProcesses (cognitive 34) SageFs/HygieneGather.fs:192 — HygieneGather.readProcesses has cognitive complexity 34 (threshold 15). Drivers by points: error handling 5 (17 pts), match/switch 6 (16 pts), boolean chains 1 (nesting depth added 22). 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 · FsiHostClient.start (cognitive 33) · ×1
  • FsiHostClient.start (cognitive 33) SageFs.Core/FsiHostClient.fs:483 — FsiHostClient.start has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 7 (20 pts), loops 3 (5 pts), error handling 4, if/else 2 (4 pts) (nesting depth added 17). 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 · TrunkFollow.step (cognitive 33) · ×1
  • TrunkFollow.step (cognitive 33) SageFs.Core/Features/TrunkFollow.fs:268 — TrunkFollow.step has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 12 (32 pts), boolean chains 1 (nesting depth added 20). 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 · Session.Save (cognitive 33) · ×1
  • Session.Save (cognitive 33) SageFs.Host/RunAppDelta.fs:97 — Session.Save has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 8 (27 pts), loops 1 (6 pts) (nesting depth added 24). 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 · StateMachineRenderer.render (cognitive 32) · ×1
  • StateMachineRenderer.render (cognitive 32) SageFs.Core/Features/DomainModelViz.fs:192 — StateMachineRenderer.render has cognitive complexity 32 (threshold 15). Drivers by points: match/switch 8 (22 pts), loops 5 (7 pts), boolean chains 3 (nesting depth added 16). 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 · DashboardFragments.renderSessionContextPanel (cognitive 32) · ×1
  • DashboardFragments.renderSessionContextPanel (cognitive 32) SageFs/DashboardFragments.fs:3349 — DashboardFragments.renderSessionContextPanel has cognitive complexity 32 (threshold 15). Drivers by points: match/switch 8 (22 pts), loops 6 (10 pts) (nesting depth added 18). 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 · CohortGit.rebaseCommitsOnto (cognitive 32) · ×1
  • CohortGit.rebaseCommitsOnto (cognitive 32) SageFs/CohortGit.fs:279 — CohortGit.rebaseCommitsOnto has cognitive complexity 32 (threshold 15). Drivers by points: match/switch 8 (32 pts) (nesting depth added 24). 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 · AppRunOrchestration.runApp (cognitive 31) · ×1
  • AppRunOrchestration.runApp (cognitive 31) SageFs.Core/AppRunOrchestration.fs:239 — AppRunOrchestration.runApp has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 9 (31 pts) (nesting depth added 22). 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 · SageFsTools.set_reflection_read_mode (cognitive 31) · ×1
  • SageFsTools.set_reflection_read_mode (cognitive 31) SageFs/McpTools.fs:1424 — SageFsTools.set_reflection_read_mode has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 9 (31 pts) (nesting depth added 22). 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 · McpTools.routeToSessionWithin (cognitive 31) · ×1
  • McpTools.routeToSessionWithin (cognitive 31) SageFs/Mcp.fs:299 — McpTools.routeToSessionWithin has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 7 (25 pts), error handling 2 (6 pts) (nesting depth added 22). 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 · HygieneEdge.removeWorktree (cognitive 31) · ×1
  • HygieneEdge.removeWorktree (cognitive 31) SageFs/HygieneEdge.fs:32 — HygieneEdge.removeWorktree has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 10 (31 pts) (nesting depth added 21). 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 · NvimOracle.daemonState (cognitive 31) · ×1
  • NvimOracle.daemonState (cognitive 31) scripts/lemmings/ui/nvim/NvimOracle.fs:428 — NvimOracle.daemonState has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 9 (28 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 20). 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 · OpenDirective.openDirectiveMiddleware (cognitive 30) · ×1
  • OpenDirective.openDirectiveMiddleware (cognitive 30) SageFs.Core/Middleware/Directives.fs:28 — OpenDirective.openDirectiveMiddleware has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 9 (21 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 17). 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 · McpServer.mapExecutionRoutes (cognitive 30) · ×1
  • McpServer.mapExecutionRoutes (cognitive 30) SageFs/McpServer.fs:2032 — McpServer.mapExecutionRoutes has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 20 (22 pts), boolean chains 3, error handling 2, if/else 1 (2 pts), loops 1 (nesting depth added 3). 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 · SyntaxHighlight.tokenize (cognitive 30) · ×1
  • SyntaxHighlight.tokenize (cognitive 30) SageFs/SyntaxHighlight.fs:103 — SyntaxHighlight.tokenize has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 6 (22 pts), loops 2 (8 pts) (nesting depth added 22). 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 · DashboardFragments.renderHighlightedLine (cognitive 29) · ×1
  • DashboardFragments.renderHighlightedLine (cognitive 29) SageFs/DashboardFragments.fs:727 — DashboardFragments.renderHighlightedLine has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 7 (24 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 18). 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 · TestStateTracker.ProcessResultsBatch (cognitive 28) · ×1
  • TestStateTracker.ProcessResultsBatch (cognitive 28) sagefs-vs/SageFs.VisualStudio.Editor/TestStateTracker.cs:58 — TestStateTracker.ProcessResultsBatch 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 · ValueReads.fateAt (cognitive 28) · ×1
  • ValueReads.fateAt (cognitive 28) SageFs.Core/Middleware/ValueReads.fs:273 — ValueReads.fateAt has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 10 (21 pts), if/else 5 (6 pts), boolean chains 1 (nesting depth added 12). 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 · DevReloadInjector.install (cognitive 28) · ×1
  • DevReloadInjector.install (cognitive 28) SageFs.Host/DevReloadInjector.fs:131 — DevReloadInjector.install has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 7 (24 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 19). 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 · HotReloadCore.resolveAssembly (cognitive 27) · ×1
  • HotReloadCore.resolveAssembly (cognitive 27) SageFs.Core/Middleware/HotReloadCore.fs:1748 — HotReloadCore.resolveAssembly has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 5 (14 pts), error handling 5 (13 pts) (nesting depth added 17). 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 · ExpensiveWorkLease.requestCore (cognitive 27) · ×1
  • ExpensiveWorkLease.requestCore (cognitive 27) SageFs.Core/ExpensiveWorkLease.fs:324 — ExpensiveWorkLease.requestCore has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 7 (18 pts), if/else 2 (5 pts), boolean chains 4 (nesting depth added 14). 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 · WorkspaceHygieneRender.renderPlan (cognitive 27) · ×1
  • WorkspaceHygieneRender.renderPlan (cognitive 27) SageFs.Core/WorkspaceHygieneRender.fs:119 — WorkspaceHygieneRender.renderPlan has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 5 (18 pts), loops 3 (9 pts) (nesting depth added 19). 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 · DevReloadMiddleware.createMiddleware (cognitive 27) · ×1
  • DevReloadMiddleware.createMiddleware (cognitive 27) SageFs.Host/DevReloadMiddleware.fs:137 — DevReloadMiddleware.createMiddleware has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 8 (25 pts), boolean chains 2 (nesting depth added 17). 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 · TrunkFollowShell.move (cognitive 27) · ×1
  • TrunkFollowShell.move (cognitive 27) SageFs/TrunkFollowShell.fs:73 — TrunkFollowShell.move has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 7 (26 pts), boolean chains 1 (nesting depth added 19). 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 · McpTools.createSession (cognitive 27) · ×1
  • McpTools.createSession (cognitive 27) SageFs/Mcp.fs:2161 — McpTools.createSession has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 7 (27 pts) (nesting depth added 20). 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 · McpTools.manageScratchPad (cognitive 27) · ×1
  • McpTools.manageScratchPad (cognitive 27) SageFs/Mcp.fs:3013 — McpTools.manageScratchPad has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 8 (27 pts) (nesting depth added 19). 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 · McpAnalysisViews.suggestRepairJson (cognitive 27) · ×1
  • McpAnalysisViews.suggestRepairJson (cognitive 27) SageFs/McpAnalysisViews.fs:71 — McpAnalysisViews.suggestRepairJson has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 7 (21 pts), if/else 2 (6 pts) (nesting depth added 18). 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 · HotReloading.injectNoInlining (cognitive 26) · ×1
  • HotReloading.injectNoInlining (cognitive 26) SageFs.Core/Middleware/HotReloading.fs:149 — HotReloading.injectNoInlining has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 6 (12 pts), boolean chains 5, if/else 2 (5 pts), loops 2 (4 pts) (nesting depth added 11). 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 · GenericReload.sharedStub (cognitive 26) · ×1
  • GenericReload.sharedStub (cognitive 26) SageFs.Core/Middleware/GenericReload.fs:504 — GenericReload.sharedStub has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 9 (19 pts), loops 2 (6 pts), error handling 1 (nesting depth added 14). 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 · HealthAnomaly.step (cognitive 26) · ×1
  • HealthAnomaly.step (cognitive 26) SageFs.Core/Features/HealthAnomaly.fs:307 — HealthAnomaly.step has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 2 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExpectoExecutor.runReflectedBody (cognitive 26) · ×1
  • ExpectoExecutor.runReflectedBody (cognitive 26) SageFs.Core/Features/LiveTestingExecutors.fs:578 — ExpectoExecutor.runReflectedBody has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 7 (16 pts), error handling 4 (8 pts), boolean chains 2 (nesting depth added 13). 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 · Checkout.classify (cognitive 26) · ×1
  • Checkout.classify (cognitive 26) SageFs.Core/Checkout.fs:40 — Checkout.classify has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 9 (22 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · GuardSim.step (cognitive 26) · ×1
  • GuardSim.step (cognitive 26) SageFs.Simulation/GuardSim.fs:271 — GuardSim.step has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 12 (26 pts) (nesting depth added 14). 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 · DaemonMode.createElmRuntime (cognitive 26) · ×1
  • DaemonMode.createElmRuntime (cognitive 26) SageFs/DaemonMode.fs:1856 — DaemonMode.createElmRuntime has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 12 (19 pts), error handling 6, boolean chains 1 (nesting depth added 7). 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 · Dashboard.createSessionActionHandler (cognitive 26) · ×1
  • Dashboard.createSessionActionHandler (cognitive 26) SageFs/Dashboard.fs:2106 — Dashboard.createSessionActionHandler has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 9 (18 pts), error handling 3, if/else 2 (3 pts), boolean chains 2 (nesting depth added 10). 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 · StartDaemonCommand.ExecuteCommandAsync (cognitive 25) · ×1
  • StartDaemonCommand.ExecuteCommandAsync (cognitive 25) sagefs-vs/SageFs.VisualStudio/Commands/DaemonCommands.cs:34 — StartDaemonCommand.ExecuteCommandAsync 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 · EvalFileCommand.ExecuteCommandAsync (cognitive 25) · ×1
  • EvalFileCommand.ExecuteCommandAsync (cognitive 25) sagefs-vs/SageFs.VisualStudio/Commands/EvalFileCommand.cs:39 — EvalFileCommand.ExecuteCommandAsync 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 · EvalStore.materializeScope (cognitive 25) · ×1
  • EvalStore.materializeScope (cognitive 25) SageFs.Core/Features/EvalStore.fs:359 — EvalStore.materializeScope has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 7 (18 pts), loops 5 (7 pts) (nesting depth added 13). 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 · LiveValueTree.classify (cognitive 25) · ×1
  • LiveValueTree.classify (cognitive 25) SageFs.Core/Features/LiveValueTree.fs:471 — LiveValueTree.classify has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HttpWorkerClient.streamRun (cognitive 25) · ×1
  • HttpWorkerClient.streamRun (cognitive 25) SageFs.Core/HttpWorkerClient.fs:196 — HttpWorkerClient.streamRun has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 7 (23 pts), error handling 1, loops 1 (nesting depth added 16). 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 · McpStdioBridge.run (cognitive 25) · ×1
  • McpStdioBridge.run (cognitive 25) SageFs/McpStdioBridge.fs:133 — McpStdioBridge.run has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 11 (21 pts), loops 1 (3 pts), error handling 1 (nesting depth added 12). 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 · Dashboard.createToggleWarmupAutoOpenHandler (cognitive 25) · ×1
  • Dashboard.createToggleWarmupAutoOpenHandler (cognitive 25) SageFs/Dashboard.fs:2633 — Dashboard.createToggleWarmupAutoOpenHandler has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 8 (22 pts), error handling 3 (nesting depth added 14). 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 · Dashboard.createApiStateHandler (cognitive 25) · ×1
  • Dashboard.createApiStateHandler (cognitive 25) SageFs/Dashboard.fs:2703 — Dashboard.createApiStateHandler has cognitive complexity 25 (threshold 15). Drivers by points: error handling 8 (15 pts), loops 2 (4 pts), match/switch 3, if/else 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · McpTools.switchWorkflow (cognitive 25) · ×1
  • McpTools.switchWorkflow (cognitive 25) SageFs/Mcp.fs:2289 — McpTools.switchWorkflow has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 7 (25 pts) (nesting depth added 18). 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 · Nvim.parseKeys (cognitive 25) · ×1
  • Nvim.parseKeys (cognitive 25) scripts/lemmings/ui/nvim/Nvim.fs:184 — Nvim.parseKeys has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (10 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Diagnostician.summarize (cognitive 24) · ×1
  • Diagnostician.summarize (cognitive 24) SageFs.Core/Features/Diagnostician.fs:100 — Diagnostician.summarize has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 11 (24 pts) (nesting depth added 13). 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 · ReflectionExecutor.invokeWith (cognitive 24) · ×1
  • ReflectionExecutor.invokeWith (cognitive 24) SageFs.Core/Features/LiveTestingExecutors.fs:55 — ReflectionExecutor.invokeWith has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 8 (20 pts), error handling 3, boolean chains 1 (nesting depth added 12). 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 · CoverageInstrumenter.insertBeforeWithFixup (cognitive 24) · ×1
  • CoverageInstrumenter.insertBeforeWithFixup (cognitive 24) SageFs.Core/Features/CoverageInstrumenter.fs:148 — CoverageInstrumenter.insertBeforeWithFixup has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 8 (19 pts), loops 3 (5 pts) (nesting depth added 13). 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 · CoverageBitmapModule.narrowByLines (cognitive 24) · ×1
  • CoverageBitmapModule.narrowByLines (cognitive 24) SageFs.Core/Features/LiveTestingTypes.fs:917 — CoverageBitmapModule.narrowByLines has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (19 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SageFsTools.reset_hot_reload_state (cognitive 24) · ×1
  • SageFsTools.reset_hot_reload_state (cognitive 24) SageFs/McpTools.fs:1347 — SageFsTools.reset_hot_reload_state has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 7 (19 pts), loops 1 (5 pts) (nesting depth added 16). 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 · DashboardTypes.resolveSessionProjects (cognitive 24) · ×1
  • DashboardTypes.resolveSessionProjects (cognitive 24) SageFs/DashboardTypes.fs:1584 — DashboardTypes.resolveSessionProjects has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 11 (23 pts), boolean chains 1 (nesting depth added 12). 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 · McpCohortIntegration.setIntegrationRef (cognitive 24) · ×1
  • McpCohortIntegration.setIntegrationRef (cognitive 24) SageFs/McpCohortIntegration.fs:82 — McpCohortIntegration.setIntegrationRef has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 10 (24 pts) (nesting depth added 14). 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 · Draw.textHighlighted (cognitive 24) · ×1
  • Draw.textHighlighted (cognitive 24) SageFs/Draw.fs:38 — Draw.textHighlighted has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 5 (15 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 14). 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 · SseClient.LoopAsync (cognitive 23) · ×1
  • SseClient.LoopAsync (cognitive 23) sagefs-vs/SageFs.VisualStudio.Editor/SseClient.cs:35 — SseClient.LoopAsync 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 · CohortStatusText.render (cognitive 23) · ×1
  • CohortStatusText.render (cognitive 23) SageFs.Core/Features/CohortStatusText.fs:11 — CohortStatusText.render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3 (6 pts), 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 · FsiProtocol.writeValue (cognitive 23) · ×1
  • FsiProtocol.writeValue (cognitive 23) SageFs.FsiHost/FsiProtocol.fs:265 — FsiProtocol.writeValue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 6). 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 · Program.main (cognitive 23) · ×1
  • Program.main (cognitive 23) SageFs/Program.fs:543 — Program.main has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 9 (20 pts), loops 1 (3 pts) (nesting depth added 13). 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 · ValueReads.decode (cognitive 22) · ×1
  • ValueReads.decode (cognitive 22) SageFs.Core/Middleware/ValueReads.fs:70 — ValueReads.decode has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 6 (15 pts), loops 1 (5 pts), boolean chains 2 (nesting depth added 13). 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 · LiveValueTree.decode (cognitive 22) · ×1
  • LiveValueTree.decode (cognitive 22) SageFs.Core/Features/LiveValueTree.fs:218 — LiveValueTree.decode has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 8 (15 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 10). 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 · CoreEvidence.evidenceFor (cognitive 22) · ×1
  • CoreEvidence.evidenceFor (cognitive 22) SageFs.Core/CoreEvidence.fs:194 — CoreEvidence.evidenceFor has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 7 (22 pts) (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AppRunner.launch (cognitive 22) · ×1
  • AppRunner.launch (cognitive 22) SageFs.Host/AppRunner.fs:322 — AppRunner.launch has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 11 (20 pts), boolean chains 1, error handling 1 (nesting depth added 9). 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 · CompilationContext.transformWholeFile (cognitive 21) · ×1
  • CompilationContext.transformWholeFile (cognitive 21) SageFs.Core/Middleware/CompilationContext.fs:327 — CompilationContext.transformWholeFile has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 8 (20 pts), boolean chains 1 (nesting depth added 12). 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 · HotReloadCore.prepareGenericUnit (cognitive 21) · ×1
  • HotReloadCore.prepareGenericUnit (cognitive 21) SageFs.Core/Middleware/HotReloadCore.fs:767 — HotReloadCore.prepareGenericUnit has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 6 (17 pts), error handling 2 (4 pts) (nesting depth added 13). 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 · DUExtractor.extractTransitionsFromSignature (cognitive 21) · ×1
  • DUExtractor.extractTransitionsFromSignature (cognitive 21) SageFs.Core/Features/DomainModelViz.fs:83 — DUExtractor.extractTransitionsFromSignature has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 7 (18 pts), boolean chains 3 (nesting depth added 11). 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 · TweakTransaction.step (cognitive 21) · ×1
  • TweakTransaction.step (cognitive 21) SageFs.Core/Features/Tweak/TweakTransaction.fs:95 — TweakTransaction.step has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). 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 · ReloadPlanning.innerNamesOf (cognitive 21) · ×1
  • ReloadPlanning.innerNamesOf (cognitive 21) SageFs.Core/Features/ReloadPlanning.fs:991 — ReloadPlanning.innerNamesOf has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 6 (20 pts), error handling 1 (nesting depth added 14). 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 · RuntimeCompat.parseRuntimeRequirement (cognitive 21) · ×1
  • RuntimeCompat.parseRuntimeRequirement (cognitive 21) SageFs.Core/RuntimeCompat.fs:79 — RuntimeCompat.parseRuntimeRequirement has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 8 (13 pts), if/else 2 (4 pts), loops 1 (3 pts), error handling 1 (nesting depth added 9). 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 · ReadyWaitSim.apply (cognitive 21) · ×1
  • ReadyWaitSim.apply (cognitive 21) SageFs.Simulation/ReadyWaitSim.fs:173 — ReadyWaitSim.apply has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). 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 · PatchConfirmationSim.step (cognitive 21) · ×1
  • PatchConfirmationSim.step (cognitive 21) SageFs.Simulation/PatchConfirmationSim.fs:136 — PatchConfirmationSim.step has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 9 (19 pts), loops 1 (2 pts) (nesting depth added 11). 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 · WorkerLifecycleSim.stepReal (cognitive 21) · ×1
  • WorkerLifecycleSim.stepReal (cognitive 21) SageFs.Simulation/WorkerLifecycleSim.fs:162 — WorkerLifecycleSim.stepReal has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 8 (21 pts) (nesting depth added 13). 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 · Dashboard.createEvalFileHandler (cognitive 21) · ×1
  • Dashboard.createEvalFileHandler (cognitive 21) SageFs/Dashboard.fs:1680 — Dashboard.createEvalFileHandler has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 8 (15 pts), boolean chains 4, error handling 2 (nesting depth added 7). 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 · CohortInspector.memberFields (cognitive 21) · ×1
  • CohortInspector.memberFields (cognitive 21) SageFs/CohortInspector.fs:178 — CohortInspector.memberFields has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 4 (8 pts) (nesting depth added 9). 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 · DashboardFragments.renderHotReloadPanelFull (cognitive 21) · ×1
  • DashboardFragments.renderHotReloadPanelFull (cognitive 21) SageFs/DashboardFragments.fs:2496 — DashboardFragments.renderHotReloadPanelFull has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 16 (19 pts), boolean chains 1, loops 1 (nesting depth added 3). 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 · DashboardFragments.renderBindingsPanel (cognitive 21) · ×1
  • DashboardFragments.renderBindingsPanel (cognitive 21) SageFs/DashboardFragments.fs:3516 — DashboardFragments.renderBindingsPanel has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (14 pts), loops 2 (7 pts) (nesting depth added 14). 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 · McpAnalysisViews.explainTestFailureJson (cognitive 21) · ×1
  • McpAnalysisViews.explainTestFailureJson (cognitive 21) SageFs/McpAnalysisViews.fs:155 — McpAnalysisViews.explainTestFailureJson has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 8 (21 pts) (nesting depth added 13). 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 · SessionPathValidation.validateSessionCreateRequest (cognitive 21) · ×1
  • SessionPathValidation.validateSessionCreateRequest (cognitive 21) SageFs/SessionPathValidation.fs:63 — SessionPathValidation.validateSessionCreateRequest has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 6 (19 pts), boolean chains 2 (nesting depth added 13). 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 · Decoding.decodeEvent (cognitive 21) · ×1
  • Decoding.decodeEvent (cognitive 21) SageFs/FrictionSqlite.fs:193 — Decoding.decodeEvent has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 6 (21 pts) (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DaemonClient.parseStateEvent (cognitive 21) · ×1
  • DaemonClient.parseStateEvent (cognitive 21) SageFs/DaemonClient.fs:51 — DaemonClient.parseStateEvent has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 14 (16 pts), error handling 3 (5 pts) (nesting depth added 4). 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 · NvimOracle.dropMcpOnlyFindings (cognitive 21) · ×1
  • NvimOracle.dropMcpOnlyFindings (cognitive 21) scripts/lemmings/ui/nvim/NvimOracle.fs:534 — NvimOracle.dropMcpOnlyFindings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 3 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). 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 · NvimTour.run (cognitive 21) · ×1
  • NvimTour.run (cognitive 21) scripts/lemmings/ui/nvim/NvimTour.fs:392 — NvimTour.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 3 (6 pts), loops 1 (4 pts) (nesting depth added 13). 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 · createSseSubscriber.startListening (cognitive 21) · ×1
  • createSseSubscriber.startListening (cognitive 21) sagefs-vscode/src/sse-helpers.js:38 — createSseSubscriber.startListening has cognitive complexity 21 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 7 (8 pts), boolean chains 4, loops 1 (nesting depth added 6). Most of this is not in the body itself: 0 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 61, 40). 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 · NextBlockCommand.FindNextBlock (cognitive 20) · ×1
  • NextBlockCommand.FindNextBlock (cognitive 20) sagefs-vs/SageFs.VisualStudio/Commands/CellNavigationCommands.cs:243 — NextBlockCommand.FindNextBlock 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 · HotReloading.isMultiLineFunctionBinding (cognitive 20) · ×1
  • HotReloading.isMultiLineFunctionBinding (cognitive 20) SageFs.Core/Middleware/HotReloading.fs:84 — HotReloading.isMultiLineFunctionBinding has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (14 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 11). 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 · CompilationContext.preprocessForFsi (cognitive 20) · ×1
  • CompilationContext.preprocessForFsi (cognitive 20) SageFs.Core/Middleware/CompilationContext.fs:519 — CompilationContext.preprocessForFsi has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (19 pts), boolean chains 1 (nesting depth added 12). 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 · ValueReadTracking.checkEntryWatch (cognitive 20) · ×1
  • ValueReadTracking.checkEntryWatch (cognitive 20) SageFs.Core/Middleware/ValueReadTracking.fs:895 — ValueReadTracking.checkEntryWatch has cognitive complexity 20 (threshold 15). Drivers by points: error handling 2 (10 pts), match/switch 3 (7 pts), loops 1 (3 pts) (nesting depth added 14). 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 · LiveTestCycleStateModule.handleFcsResult (cognitive 20) · ×1
  • LiveTestCycleStateModule.handleFcsResult (cognitive 20) SageFs.Core/Features/LiveTestingCycle.fs:876 — LiveTestCycleStateModule.handleFcsResult has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 11 (19 pts), boolean chains 1 (nesting depth added 8). 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 · McpServer.readOptionalProjectName (cognitive 20) · ×1
  • McpServer.readOptionalProjectName (cognitive 20) SageFs/McpServer.fs:804 — McpServer.readOptionalProjectName has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (15 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 13). 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 · DashboardFragments.renderCohortPanel (cognitive 20) · ×1
  • DashboardFragments.renderCohortPanel (cognitive 20) SageFs/DashboardFragments.fs:2943 — DashboardFragments.renderCohortPanel has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (12 pts), loops 2 (5 pts), if/else 2, boolean chains 1 (nesting depth added 10). 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 · McpTools.evalFSharpCodeWithOutcome (cognitive 20) · ×1
  • McpTools.evalFSharpCodeWithOutcome (cognitive 20) SageFs/Mcp.fs:1131 — McpTools.evalFSharpCodeWithOutcome has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 6 (12 pts), error handling 2 (6 pts), loops 1 (2 pts) (nesting depth added 11). 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 · SageFsEffectHandler.startConfirmationBuild (cognitive 20) · ×1
  • SageFsEffectHandler.startConfirmationBuild (cognitive 20) SageFs/SageFsEffectHandler.fs:281 — SageFsEffectHandler.startConfirmationBuild has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 6 (16 pts), error handling 3 (4 pts) (nesting depth added 11). 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 · DaemonClient.runSseListener (cognitive 20) · ×1
  • DaemonClient.runSseListener (cognitive 20) SageFs/DaemonClient.fs:266 — DaemonClient.runSseListener has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 3 (10 pts), error handling 3 (7 pts), loops 2 (3 pts) (nesting depth added 12). 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 · AnsiEmitter.emit (cognitive 20) · ×1
  • AnsiEmitter.emit (cognitive 20) SageFs/AnsiEmitter.fs:119 — AnsiEmitter.emit has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (13 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (AnsiEmitter.emitGridOnly) 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 · AnsiEmitter.emitGridOnly (cognitive 20) · ×1
  • AnsiEmitter.emitGridOnly (cognitive 20) SageFs/AnsiEmitter.fs:172 — AnsiEmitter.emitGridOnly has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (13 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (AnsiEmitter.emit) 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 · Nvim.parseShellCommand (cognitive 20) · ×1
  • Nvim.parseShellCommand (cognitive 20) scripts/lemmings/ui/nvim/Nvim.fs:325 — Nvim.parseShellCommand has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 8 (18 pts), boolean chains 2 (nesting depth added 10). 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 · CompilationContext.locateBlock (cognitive 19) · ×1
  • CompilationContext.locateBlock (cognitive 19) SageFs.Core/Middleware/CompilationContext.fs:276 — CompilationContext.locateBlock has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 11). 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 · EvaluableSubmissionModule.classify (cognitive 19) · ×1
  • EvaluableSubmissionModule.classify (cognitive 19) SageFs.Core/Middleware/EvaluableSubmission.fs:61 — EvaluableSubmissionModule.classify has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 6 (17 pts), error handling 1 (2 pts) (nesting depth added 12). 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 · ValueReadHooks.GetterEntered (cognitive 19) · ×1
  • ValueReadHooks.GetterEntered (cognitive 19) SageFs.Core/Middleware/ValueReadTracking.fs:345 — ValueReadHooks.GetterEntered has cognitive complexity 19 (threshold 15). Drivers by points: error handling 3 (8 pts), match/switch 4 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). 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 · IsolatedFsiSession.rewriteProjectFSharpCoreReferences (cognitive 19) · ×1
  • IsolatedFsiSession.rewriteProjectFSharpCoreReferences (cognitive 19) SageFs.Core/IsolatedFsiSession.fs:469 — IsolatedFsiSession.rewriteProjectFSharpCoreReferences has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (14 pts), error handling 1 (4 pts), loops 1 (nesting depth added 13). 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 · ReloadPlanning.lambdaDiff (cognitive 19) · ×1
  • ReloadPlanning.lambdaDiff (cognitive 19) SageFs.Core/Features/ReloadPlanning.fs:722 — ReloadPlanning.lambdaDiff has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 6 (18 pts), boolean chains 1 (nesting depth added 12). 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 · GuardReachability.implementationsIn (cognitive 19) · ×1
  • GuardReachability.implementationsIn (cognitive 19) SageFs.Core/Features/GuardReachability.fs:142 — GuardReachability.implementationsIn has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (10 pts), error handling 2 (6 pts), boolean chains 3 (nesting depth added 10). 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 · SessionContextTui.detailLines (cognitive 19) · ×1
  • SessionContextTui.detailLines (cognitive 19) SageFs.Core/WarmupContext.fs:223 — SessionContextTui.detailLines has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (11 pts), match/switch 6 (8 pts) (nesting depth added 8). 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 · CompileOrderInsight.analyzeWithReferences (cognitive 19) · ×1
  • CompileOrderInsight.analyzeWithReferences (cognitive 19) SageFs.Core/CompileOrderInsight.fs:156 — CompileOrderInsight.analyzeWithReferences has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 10 (19 pts) (nesting depth added 9). 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 · MachineProbeReader.cpuQuota (cognitive 19) · ×1
  • MachineProbeReader.cpuQuota (cognitive 19) SageFs.Core/MachineProfile.fs:476 — MachineProbeReader.cpuQuota has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 6 (18 pts), error handling 1 (nesting depth added 12). 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 · McpServer.replayCachedTestState (cognitive 19) · ×1
  • McpServer.replayCachedTestState (cognitive 19) SageFs/McpServer.fs:1047 — McpServer.replayCachedTestState has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (10 pts), loops 2 (6 pts), boolean chains 2, error handling 1 (nesting depth added 9). 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 · McpServer.wireCohortEventSubscription (cognitive 19) · ×1
  • McpServer.wireCohortEventSubscription (cognitive 19) SageFs/McpServer.fs:1312 — McpServer.wireCohortEventSubscription has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 6 (17 pts), error handling 1, loops 1 (nesting depth added 11). 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 · McpServer.mapAnalysisRoutes (cognitive 19) · ×1
  • McpServer.mapAnalysisRoutes (cognitive 19) SageFs/McpServer.fs:3574 — McpServer.mapAnalysisRoutes has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 10 (19 pts) (nesting depth added 9). 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 · McpTools.getMessageJournal (cognitive 19) · ×1
  • McpTools.getMessageJournal (cognitive 19) SageFs/Mcp.fs:2929 — McpTools.getMessageJournal has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 7 (19 pts) (nesting depth added 12). 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 · McpAdapter.formatWarmupDetailForLlm (cognitive 19) · ×1
  • McpAdapter.formatWarmupDetailForLlm (cognitive 19) SageFs/McpAdapter.fs:223 — McpAdapter.formatWarmupDetailForLlm has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (11 pts), match/switch 5 (8 pts) (nesting depth added 9). 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 · FrictionReviewView.parseEditsJson (cognitive 19) · ×1
  • FrictionReviewView.parseEditsJson (cognitive 19) SageFs/FrictionReviewView.fs:78 — FrictionReviewView.parseEditsJson has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 2 (7 pts), if/else 3 (6 pts), loops 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TestDiagnosticsBridge.UpdateDiagnosticsAsync (cognitive 18) · ×1
  • TestDiagnosticsBridge.UpdateDiagnosticsAsync (cognitive 18) sagefs-vs/SageFs.VisualStudio/Services/TestDiagnosticsBridge.cs:46 — TestDiagnosticsBridge.UpdateDiagnosticsAsync 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 · ValueReadTracking.walk (cognitive 18) · ×1
  • ValueReadTracking.walk (cognitive 18) SageFs.Core/Middleware/ValueReadTracking.fs:238 — ValueReadTracking.walk has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 8 (18 pts) (nesting depth added 10). 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 · FsiHostBuild.ensureFSharpCoreVariant (cognitive 18) · ×1
  • FsiHostBuild.ensureFSharpCoreVariant (cognitive 18) SageFs.Core/FsiHostBuild.fs:384 — FsiHostBuild.ensureFSharpCoreVariant has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (10 pts), loops 2 (6 pts), boolean chains 1, error handling 1 (nesting depth added 10). 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 · TrunkFollow.settleInRecords (cognitive 18) · ×1
  • TrunkFollow.settleInRecords (cognitive 18) SageFs.Core/Features/TrunkFollow.fs:218 — TrunkFollow.settleInRecords has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 6 (18 pts) (nesting depth added 12). 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 · CellMarker.parse (cognitive 18) · ×1
  • CellMarker.parse (cognitive 18) SageFs.Core/Features/NotebookExport.fs:20 — CellMarker.parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HostAdaptation.readFrameworkAssemblies (cognitive 18) · ×1
  • HostAdaptation.readFrameworkAssemblies (cognitive 18) SageFs.Core/HostAdaptation.fs:246 — HostAdaptation.readFrameworkAssemblies has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (8 pts), error handling 1 (5 pts), loops 2 (5 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 · Cohort.project (cognitive 18) · ×1
  • Cohort.project (cognitive 18) SageFs.Core/Cohort.fs:1591 — Cohort.project has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (10 pts), match/switch 7, if/else 1 (nesting depth added 3). 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 · TweakSimInvariants.whyKeptAgreesWithGroundTruthAfterMultipleRounds (cognitive 18) · ×1
  • TweakSimInvariants.whyKeptAgreesWithGroundTruthAfterMultipleRounds (cognitive 18) SageFs.Simulation/TweakSimInvariants.fs:289 — TweakSimInvariants.whyKeptAgreesWithGroundTruthAfterMultipleRounds has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 6 (18 pts) (nesting depth added 12). 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 · DashboardFragments.renderHygienePanel (cognitive 18) · ×1
  • DashboardFragments.renderHygienePanel (cognitive 18) SageFs/DashboardFragments.fs:3984 — DashboardFragments.renderHygienePanel has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (16 pts), loops 1 (2 pts) (nesting depth added 10). 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 · LoadScriptCommand.ExecuteCommandAsync (cognitive 17) · ×1
  • LoadScriptCommand.ExecuteCommandAsync (cognitive 17) sagefs-vs/SageFs.VisualStudio/Commands/LoadScriptCommand.cs:39 — LoadScriptCommand.ExecuteCommandAsync 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 · Tracker.SetMode (cognitive 17) · ×1
  • Tracker.SetMode (cognitive 17) SageFs.Core/Middleware/ValueReadTracking.fs:1540 — Tracker.SetMode has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (13 pts), loops 2 (4 pts) (nesting depth added 10). 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 · ValueReads.effectOf (cognitive 17) · ×1
  • ValueReads.effectOf (cognitive 17) SageFs.Core/Middleware/ValueReads.fs:226 — ValueReads.effectOf has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (16 pts), boolean chains 1 (nesting depth added 10). 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 · NotebookExport.importNotebook (cognitive 17) · ×1
  • NotebookExport.importNotebook (cognitive 17) SageFs.Core/Features/NotebookExport.fs:85 — NotebookExport.importNotebook has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 3 (5 pts) (nesting depth added 9). 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 · CoverageInstrumenter.collectSequencePoints (cognitive 17) · ×1
  • CoverageInstrumenter.collectSequencePoints (cognitive 17) SageFs.Core/Features/CoverageInstrumenter.fs:18 — CoverageInstrumenter.collectSequencePoints has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (8 pts), match/switch 2 (8 pts), boolean chains 1 (nesting depth added 10). 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 · DeltaApply.runUpdateHandlers (cognitive 17) · ×1
  • DeltaApply.runUpdateHandlers (cognitive 17) SageFs.Core/Features/MetadataDelta/DeltaApply.fs:230 — DeltaApply.runUpdateHandlers has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (9 pts), error handling 2 (5 pts), loops 2 (3 pts) (nesting depth added 10). 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 · AppRunOrchestration.launch (cognitive 17) · ×1
  • AppRunOrchestration.launch (cognitive 17) SageFs.Core/AppRunOrchestration.fs:56 — AppRunOrchestration.launch has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (17 pts) (nesting depth added 11). 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 · HygieneFs.resolvePath (cognitive 17) · ×1
  • HygieneFs.resolvePath (cognitive 17) SageFs.Core/HygieneFs.fs:11 — HygieneFs.resolvePath has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (14 pts), error handling 2 (3 pts) (nesting depth added 9). 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 · Executor.operationsFor (cognitive 17) · ×1
  • Executor.operationsFor (cognitive 17) SageFs.Core/WorkspaceHygiene.fs:957 — Executor.operationsFor has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 8 (17 pts) (nesting depth added 9). 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 · AppRunner.resolveProjectAssembly (cognitive 17) · ×1
  • AppRunner.resolveProjectAssembly (cognitive 17) SageFs.Host/AppRunner.fs:177 — AppRunner.resolveProjectAssembly has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (12 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 8). 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 · CliCommandModule.parse (cognitive 17) · ×1
  • CliCommandModule.parse (cognitive 17) SageFs/Program.fs:118 — CliCommandModule.parse has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, match/switch 3 (5 pts) (nesting depth added 2). 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 · McpServer.replaySessionSnapshot (cognitive 17) · ×1
  • McpServer.replaySessionSnapshot (cognitive 17) SageFs/McpServer.fs:1012 — McpServer.replaySessionSnapshot has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (13 pts), error handling 2 (4 pts) (nesting depth added 10). 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 · McpCapability.mintMember (cognitive 17) · ×1
  • McpCapability.mintMember (cognitive 17) SageFs/McpCapability.fs:56 — McpCapability.mintMember has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (17 pts) (nesting depth added 11). 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 · CohortLandingVerify.runTestsInSession (cognitive 17) · ×1
  • CohortLandingVerify.runTestsInSession (cognitive 17) SageFs/CohortLandingVerify.fs:152 — CohortLandingVerify.runTestsInSession has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (17 pts) (nesting depth added 11). 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 · HygieneGather.kindsOfTarget (cognitive 17) · ×1
  • HygieneGather.kindsOfTarget (cognitive 17) SageFs/HygieneGather.fs:754 — HygieneGather.kindsOfTarget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (3 pts) (nesting depth added 8). 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 · Screen.computeLayoutWith (cognitive 17) · ×1
  • Screen.computeLayoutWith (cognitive 17) SageFs/Screen.fs:185 — Screen.computeLayoutWith has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (15 pts), boolean chains 2 (nesting depth added 8). 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 · SageFsMsgQueueCoalescing.tryAbsorbPending (cognitive 17) · ×1
  • SageFsMsgQueueCoalescing.tryAbsorbPending (cognitive 17) SageFs/SageFsApp.fs:515 — SageFsMsgQueueCoalescing.tryAbsorbPending has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 8 (17 pts) (nesting depth added 9). 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 · EditorUpdate.deleteForward (cognitive 17) · ×1
  • EditorUpdate.deleteForward (cognitive 17) SageFs/Editor.fs:206 — EditorUpdate.deleteForward has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (17 pts) (nesting depth added 10). 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 · Daemon.sessions (cognitive 17) · ×1
  • Daemon.sessions (cognitive 17) scripts/lemmings/ui/nvim/NvimTour.fs:264 — Daemon.sessions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 2 (6 pts), match/switch 2 (4 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HotReloadToggleDirectoryCommand.ExecuteCommandAsync (cognitive 16) · ×1
  • HotReloadToggleDirectoryCommand.ExecuteCommandAsync (cognitive 16) sagefs-vs/SageFs.VisualStudio/Commands/HotReloadCommands.cs:214 — HotReloadToggleDirectoryCommand.ExecuteCommandAsync 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 · SwitchSessionCommand.ExecuteCommandAsync (cognitive 16) · ×1
  • SwitchSessionCommand.ExecuteCommandAsync (cognitive 16) sagefs-vs/SageFs.VisualStudio/Commands/SessionCommands.cs:152 — SwitchSessionCommand.ExecuteCommandAsync 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 · SquiggleTagger.GetTags (cognitive 16) · ×1
  • SquiggleTagger.GetTags (cognitive 16) sagefs-vs/SageFs.VisualStudio.Editor/SquiggleTagger.cs:68 — SquiggleTagger.GetTags 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 · TestStateTracker.ProcessSourceLocations (cognitive 16) · ×1
  • TestStateTracker.ProcessSourceLocations (cognitive 16) sagefs-vs/SageFs.VisualStudio.Editor/TestStateTracker.cs:153 — TestStateTracker.ProcessSourceLocations 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 · ValueReadTracking.rewirableSiteIds (cognitive 16) · ×1
  • ValueReadTracking.rewirableSiteIds (cognitive 16) SageFs.Core/Middleware/ValueReadTracking.fs:605 — ValueReadTracking.rewirableSiteIds has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (10 pts), error handling 2 (5 pts), boolean chains 1 (nesting depth added 9). 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 · ReloadPlanning.recordShapeOf (cognitive 16) · ×1
  • ReloadPlanning.recordShapeOf (cognitive 16) SageFs.Core/Features/ReloadPlanning.fs:1077 — ReloadPlanning.recordShapeOf has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (15 pts), error handling 1 (nesting depth added 10). 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 · GuardReachability.eligibility (cognitive 16) · ×1
  • GuardReachability.eligibility (cognitive 16) SageFs.Core/Features/GuardReachability.fs:98 — GuardReachability.eligibility has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (15 pts), boolean chains 1 (nesting depth added 10). 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 · SessionHealthModule.classify (cognitive 16) · ×1
  • SessionHealthModule.classify (cognitive 16) SageFs.Core/SessionHealth.fs:123 — SessionHealthModule.classify has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (15 pts), boolean chains 1 (nesting depth added 10). 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 · DaemonState.probeDaemonHttpAsync (cognitive 16) · ×1
  • DaemonState.probeDaemonHttpAsync (cognitive 16) SageFs.Core/DaemonState.fs:254 — DaemonState.probeDaemonHttpAsync has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (12 pts), error handling 2 (4 pts) (nesting depth added 9). 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 · SessionReloadModule.ofPayloadJson (cognitive 16) · ×1
  • SessionReloadModule.ofPayloadJson (cognitive 16) SageFs.Core/SessionReload.fs:134 — SessionReloadModule.ofPayloadJson has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (8 pts), if/else 1 (4 pts), loops 1 (3 pts), error handling 1 (nesting depth added 7). 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 · AspireSetup.loadLaunchSettings (cognitive 16) · ×1
  • AspireSetup.loadLaunchSettings (cognitive 16) SageFs.Core/AspireSetup.fs:50 — AspireSetup.loadLaunchSettings has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (15 pts), error handling 1 (nesting depth added 9). 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 · WarmUp.openWithRetryRichCore (cognitive 16) · ×1
  • WarmUp.openWithRetryRichCore (cognitive 16) SageFs.Core/WarmUp.fs:183 — WarmUp.openWithRetryRichCore has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). 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 · WarmUp.openWithRetry (cognitive 16) · ×1
  • WarmUp.openWithRetry (cognitive 16) SageFs.Core/WarmUp.fs:332 — WarmUp.openWithRetry has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 7 (15 pts), boolean chains 1 (nesting depth added 8). 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 · MachineProbeReader.fromCgroup (cognitive 16) · ×1
  • MachineProbeReader.fromCgroup (cognitive 16) SageFs.Core/MachineProfile.fs:449 — MachineProbeReader.fromCgroup has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (15 pts), error handling 1 (nesting depth added 10). 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 · NativeResolution.install (cognitive 16) · ×1
  • NativeResolution.install (cognitive 16) SageFs.Core/NativeResolution.fs:137 — NativeResolution.install has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (12 pts), error handling 2 (4 pts) (nesting depth added 9). 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 · MemoryShedSim.scenarioOf (cognitive 16) · ×1
  • MemoryShedSim.scenarioOf (cognitive 16) SageFs.Simulation/MemoryShedSim.fs:210 — MemoryShedSim.scenarioOf has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (15 pts), loops 1 (nesting depth added 9). 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 · LiveCheckPumpSim.runOp (cognitive 16) · ×1
  • LiveCheckPumpSim.runOp (cognitive 16) SageFs.Simulation/LiveCheckPumpSim.fs:219 — LiveCheckPumpSim.runOp has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 8 (16 pts) (nesting depth added 8). 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 · SourceStateSim.decideWith (cognitive 16) · ×1
  • SourceStateSim.decideWith (cognitive 16) SageFs.Simulation/SourceStateSim.fs:171 — SourceStateSim.decideWith has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 7 (16 pts) (nesting depth added 9). 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 · DashboardFragments.renderFrictionPanel (cognitive 16) · ×1
  • DashboardFragments.renderFrictionPanel (cognitive 16) SageFs/DashboardFragments.fs:2799 — DashboardFragments.renderFrictionPanel has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (9 pts), match/switch 4 (7 pts) (nesting depth added 9). 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 · McpTools.setLiveTestingForSession (cognitive 16) · ×1
  • McpTools.setLiveTestingForSession (cognitive 16) SageFs/Mcp.fs:2450 — McpTools.setLiveTestingForSession has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (16 pts) (nesting depth added 10). 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 · Draw.resolveJunctions (cognitive 16) · ×1
  • Draw.resolveJunctions (cognitive 16) SageFs/Draw.fs:104 — Draw.resolveJunctions has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). 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.
D3 · God Classes · TooManyMethods · ×1
  • TooManyMethods: SageFsTools SageFs/McpTools.fs:720 — TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — no coverage collector is wired up — Coverage NOT MEASURED: `--collect:"XPlat Code Coverage"` names a data collector that ships in the `coverlet.collector` package, and this repository wires up none — no test project references it and no runsettings declares one. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment: without a collector, `--collect` produces nothing even from a suite that builds and passes. Add a `coverlet.collector` PackageReference to the test project(s) (or commit the Cobertura/OpenCover/lcov report your CI produces) and real coverage will be measured. It is excluded from the score rather than counted as a near-zero defect.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 2 typed · 9 plain JS — the untyped files are SageFs.Host/Resources/devreload.js, SageFs/Resources/devreload.js, sagefs-vscode/esbuild.mjs, sagefs-vscode/src/LiveTestingListener.golden-tests.mjs, sagefs-vscode/src/SageFsClient.golden-tests.mjs, sagefs-vscode/src/http-helpers.golden-tests.mjs (+3 more).
R10 · Code Duplication · Wholesale file copy (272 identical lines × 2 files) · ×1
  • Wholesale file copy (272 identical lines × 2 files) SageFs.Host/Resources/devreload.js:1 — SageFs.Host/Resources/devreload.js:1 · SageFs/Resources/devreload.js:1 — these 2 files are line-for-line copies of one another — 272 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×1
  • Duplicated block (11 lines × 2 locations) friction-receiver/src/index.ts:305 — friction-receiver/src/index.ts:305 · friction-receiver/src/index.ts:329 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (5 lines × 4 locations) · ×1
  • Duplicated block (5 lines × 4 locations) sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:252 — sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:252 · sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:264 · sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:276 · sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:324 — 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.
R10 · Code Duplication · Duplicated block (5 lines × 3 locations) · ×1
  • Duplicated block (5 lines × 3 locations) sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:260 — sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:260 · sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:284 · sagefs-vscode/src/LiveTestingListener.golden-tests.mjs:290 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function fetch (cyclomatic 20, cognitive 22) · ×1
  • Complex function fetch (cyclomatic 20, cognitive 22) friction-receiver/src/index.ts:358 — fetch has cyclomatic complexity 20 and cognitive complexity 22; 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 sanitizeReport (cyclomatic 15, cognitive 14) · ×1
  • Complex function sanitizeReport (cyclomatic 15, cognitive 14) friction-receiver/src/index.ts:183 — sanitizeReport has cyclomatic complexity 15 and cognitive complexity 14; 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.
R3 · Large Files · Large Files · ×1
  • Large Files — 1 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: friction-receiver/src/index.ts (409).
R6 · Tooling · No lint script · ×1
  • No lint script — test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~100 LoC) · ×1
  • Dead file (~100 LoC) sagefs-vscode/src/sse-helpers.js — no import path from any entry point (7 application, 1 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~54 LoC) · ×1
  • Dead file (~54 LoC) sagefs-vscode/src/http-helpers.js — no import path from any entry point (7 application, 1 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
X5 · Nullable reference types · Symbol treated as nullable, then dereferenced unguarded · ×1
  • Symbol treated as nullable, then dereferenced unguarded sagefs-vs/SageFs.VisualStudio.Editor/Completions/SageFsCompletionSource.cs:127 — This method contradicts itself about `linkedCts`: line 152 writes `linkedCts?.Dispose`, which says `linkedCts` can be null, but line 127 then dereferences it directly as `linkedCts.Token` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `linkedCts` truly cannot be null here, the `?.` is misleading. Settle it one way — test `linkedCts` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Minor — 17 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×2
  • Duplicated predicate SageFs.Core/ProjectLoading.fs:1168 — `s.StartsWith("-r:", System.StringComparison.Ordinal) && s.EndsWith(".dll", System.StringComparison.Ordinal)` appears character-identically in 2 files — SageFs.Core/ProjectLoading.fs, SageFs.Core/SessionAgent.fs. 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 SageFs.Core/AppState.fs:599 — `t.Name.StartsWith("<", System.StringComparison.Ordinal) || t.Name.StartsWith("$", System.StringComparison.Ordinal) || t.Name.Contains("@") |…` appears character-identically in 2 files — SageFs.Core/AppState.fs, SageFs.Core/OpenReplay.fs. 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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×2
  • Silent fallback default in catch sagefs-vs/SageFs.VisualStudio/Commands/FailingTestNavigationCommands.cs:331 — `TryOpenDocumentAsync` swallows every 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 sagefs-vs/SageFs.VisualStudio.Editor/CellHighlightAdornment.cs:148 — `IsDarkTheme` swallows every exception into `return true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
D19 · Documentation Quality · Documentation · ×1
  • Documentation: contradicts the code docs/FEATURES_SURVEY.md — The survey states 33 modules in SageFs.Core/Features/* as of the last update but the module count (and tool list) has grown beyond that and the MCP tools referenced are no longer registered. Update the stale survey to reflect the current module count and the live MCP tool inventory.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add `semgrep --config=auto` plus gitleaks for committed secrets (F# is not a CodeQL language and has no language-specific SAST engine) as a CI step. What was searched, so you can tell an absence from a miss: the 20057 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
X2 · Cancellation propagation · Not all async methods take a CancellationToken · ×1
  • Not all async methods take a CancellationToken — Only 92/98 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.2 `!` suppressions per 1k syntax nodes — 6 suppression(s) across the 36995 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.
Minor — 2 finding(s)
D19 · Documentation Quality · XML-doc coverage · ×2
  • XML-doc coverage: SageFs.VisualStudio sagefs-vs/SageFs.VisualStudio/SageFs.VisualStudio.csproj — SageFs.VisualStudio: 8 % XML-doc coverage (20/260).
  • XML-doc coverage: SageFs.VisualStudio.Editor sagefs-vs/SageFs.VisualStudio.Editor/SageFs.VisualStudio.Editor.csproj — SageFs.VisualStudio.Editor: 22 % XML-doc coverage (34/152).

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-c79a8d9d26f44d6ea791d5f73b66234d/history.json --exit-code 0 --source .616artifacts/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-c79a8d9d26f44d6ea791d5f73b66234d/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .16artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnuget—nuget: not applicable — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan0—
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update6artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .1artifacts/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 4 file(s) — `SageFs.Host/Resources/devreload.js`, `SageFs/Resources/devreload.js`, `sagefs-vs/SageFs.VisualStudio/Services/EvalCodeLensProvider.cs`, `sagefs-vs/SageFs.VisualStudio/Services/FSharpBufferChangedListener.cs` — 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 01a0ff5b-3494-7eaf-b7dc-8086f931fc39 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md