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 surveyMeasured under the Code Assurance Index · rubric rubric-2026.10.1 (frozen) · verify this surveyFiledcd_71ab738ee6304300bdb7f829353bff0f
Filed 3 October 2026, 01:35 UTC
Public
Large · 193,062 LoC · 3 projects · rebuild ~3.3 person-years · weakest lens: Readiness (42%)
Findings by grade
649 critical665 serious19 minor7 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 ▸
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
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 headlineWidth 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.
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.
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
0.7× (at 52% quality) — the last 20% of quality is most of the work
Size & shape
Large · effort split not classified for 185,840 line(s) outside the .NET model (the tier breakdown is a C#-only syntax walk)
Effort basis
The 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).
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.
→ 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.
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.
Features.ObservedFrictionTypes uses Features.FrictionTelemetryTypes. Changing Features.FrictionTelemetryTypes can break Features.ObservedFrictionTypes, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
17→4 Features.ReloadPlanning depends on Features.MetadataDelta✕
Type pairs
1 distinct (type in Features.ReloadPlanning → type in Features.MetadataDelta) reference.
33 distinct (type in SageFs → type in Features.LiveTesting) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Server.DashboardFragments uses Features.ObservedFrictionTypes. Changing Features.ObservedFrictionTypes can break Server.DashboardFragments, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→22 Server.DashboardFragments depends on ProjectLoading✕
Type pairs
1 distinct (type in Server.DashboardFragments → type in ProjectLoading) reference.
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 category
Findings
Severity
A02:2021 — Cryptographic Failures
617
High / Critical
A03:2021 — Injection
16
High / Critical
A06:2021 — Vulnerable & Outdated Components
6
High / Critical
A05:2021 — Security Misconfiguration
1
High / 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 this
Helps
Effort
Dimension
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
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
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
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.)
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.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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.
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.
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.
+ 194 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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.
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.
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.
+ 237 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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.
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.
Do you agree with this assessment?
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.
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).
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).
Resolve the 1 TooManyMethods finding(s) in God Classes — start with McpTools.fs. — One of this dimension's main actionable groups (1 warning-level).
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.
Do you agree with this assessment?
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.
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.
All 1 mechanizable ADR(s) are enforced: 0 by analyzers, 1 by tests. Cycles found: 0.
What to do
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.
Do you agree with this assessment?
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.
142 test methods: 142 unit, 0 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
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.
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.
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.
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.
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.
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.
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)
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).
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.
Do you agree with this assessment?
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.
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).
BarePragmaDisable repeated across 16 filessagefs-vs/SageFs.VisualStudio/Commands/CellNavigationCommands.cs:11
What to do
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).
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).
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).
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.
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.
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
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
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.
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.
0 naming inconsistencies across 200 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
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.
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.
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
Resolve the 616 REDACTED finding(s) in Secrets (history) — start with REDACTED (616). — One of this dimension's main actionable groups (616 issue-level).
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.
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).
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
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
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).
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.
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.
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
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).
Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Do you agree with this assessment?
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.
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.
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.
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.
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.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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.
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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
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.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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).
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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.
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.
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.
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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
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.
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.
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.
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.
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.
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.
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.
Do you agree with this assessment?
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.
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.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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)
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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.
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 `!`.
Do you agree with this assessment?
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.
Capped 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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
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.
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.
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.
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
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'.
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.
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.
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.
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.
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 scan
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.
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.
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.
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.
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.
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.
Issues: 649 · Warnings: 665 · Recommendations: 17 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 03-10-2026 @ 01:22 UTC.
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.