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

darklang/dark

Measured 23 October 2026, 01:13 UTC, at code version e76430b

No regression since the last survey Code coverage: not measuredTest reliability: not measured

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

Code coverage is not measured: No coverage collector is wired up.

Test reliability is not measured: No test run produced results.

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

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

A medium codebase: 94,958 lines of product code in 22 projects, tests not counted · Estimated rebuild effort: about 1.0 person-years · Weakest lens: Accessibility, 49

Findings by how serious they are

60 critical 632 serious 25 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
23 October 2026, 01:13 UTC

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

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

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

57of 60 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
700of 717 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
60dimensions across 7 lenses, read from 94,958 lines of product code in 22 projects.
Chapters

Executive summary

darklang/dark scores 56 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged. The project hasn't declared a stable release yet, so its lenses are rated against a lower bar than a released product's, while the score itself is worked out as for any repository.

The weakest lens counts most in the score, and here that is Accessibility, which scores 49 and is rated Adequate. Its Visual & motion safety dimension scores 3.1 out of 10, and until that reaches 4, Accessibility can't be rated higher than Adequate. The first actions are to keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1 and to enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge, and if Accessibility rose to 70, the score would rise from 56 to about 61.

60 findings are critical: 39 in Secrets (history), ten in Static Analysis (SAST), six in IaC & Container Security, two in Dependency Vulnerabilities, two in Forms & labels and one in Circular Imports.

Watchdog couldn't measure 33 dimensions in this code, among them Dependency Hygiene, Explicit Debt and Internal API Consistency, so they are left out of the score. The product code is 94,958 lines, which would take an estimated 1.0 person-years, around €140,000, to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Accessibility 49 · counts for 46%Production Readiness 53 · counts for 25%Maturity 63 · counts for 14%Security and Compliance 64 · counts for 8%Code Health 76 · counts for 4%Architecture 82 · counts for 2%Performance 88 · counts for 1%

If Accessibility rose from 49 to 70, the lowest score rated Strong, the score would rise from 56 to about 61.

Code composition: what the lines of code are
Product code 68%Tests 32%
New since the last survey: 140 findings

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

  • Cyclomatic Complexity · Host.performWithSession (cyclomatic 66) backend/src/LibExecution/Host/Host.fs
  • Cyclomatic Complexity · HandleCommand.reachability (cyclomatic 39) backend/src/LocalExec/LocalExec.fs
  • Cyclomatic Complexity · Host.resolveSessionPosix (cyclomatic 37) backend/src/LibExecution/Host/Host.fs
  • Cyclomatic Complexity · BranchCommands.register (cyclomatic 29) later/vscode-extension/client/src/commands/branchCommands.ts
  • Cyclomatic Complexity · PackageCommands.register (cyclomatic 29) later/vscode-extension/client/src/commands/packageCommands.ts
  • Cyclomatic Complexity · BranchManagerPanel.constructor (cyclomatic 29) later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts
  • Cyclomatic Complexity · HostProcess.runInWorkspace (cyclomatic 27) backend/src/LibExecution/Host/HostProcess.fs
  • Cyclomatic Complexity · PackagesTreeDataProvider.getChildren (cyclomatic 26) REDACTED
  • Cyclomatic Complexity · Syscall.fns (cyclomatic 24) backend/src/Builtins/Builtins.Cli/Libs/Syscall.fs
  • Cyclomatic Complexity · Permissions.fns (cyclomatic 22) backend/src/Builtins/Builtins.Matter/Libs/PM/Permissions.fs
  • Cyclomatic Complexity · cli.html.shell.onData() (cyclomatic 22) later/backend/src/Wasm/wwwroot/cli.html
  • Cyclomatic Complexity · RuntimeChild.fns (cyclomatic 21) backend/src/Builtins/Builtins.Cli/Libs/RuntimeChild.fs
  • Cyclomatic Complexity · ScmCommands.register (cyclomatic 21) later/vscode-extension/client/src/commands/scmCommands.ts
  • Cyclomatic Complexity · Interpreter.tryBuildSync (cyclomatic 19) backend/src/LibExecution/Interpreter.fs
  • Cyclomatic Complexity · HostPosix.listDir (cyclomatic 19) backend/src/LibExecution/Host/HostPosix.fs
  • Cyclomatic Complexity · Requirements.forExpressionWith (cyclomatic 18) backend/src/LibExecution/CallGraph.fs
  • Cyclomatic Complexity · Interpreter.tryFastOp (cyclomatic 17) backend/src/LibExecution/Interpreter.fs
  • Cyclomatic Complexity · Propagation.resolveCurrentHash (cyclomatic 16) backend/src/LibDB/Propagation.fs
  • Cyclomatic Complexity · WipRefresh.compactWipOps (cyclomatic 16) backend/src/LibDB/WipRefresh.fs
  • Cognitive Complexity · Host.performWithSession (cognitive 129) backend/src/LibExecution/Host/Host.fs
  • Cognitive Complexity · HandleCommand.reachability (cognitive 79) backend/src/LocalExec/LocalExec.fs
  • Cognitive Complexity · Host.resolveSessionPosix (cognitive 68) backend/src/LibExecution/Host/Host.fs
  • Cognitive Complexity · HostPosix.listDir (cognitive 57) backend/src/LibExecution/Host/HostPosix.fs
  • Cognitive Complexity · BranchManagerPanel.constructor (cognitive 41) later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts
  • Cognitive Complexity · HostProcess.runInWorkspace (cognitive 39) backend/src/LibExecution/Host/HostProcess.fs
  • Cognitive Complexity · PackagesTreeDataProvider.getChildren (cognitive 36) REDACTED
  • Cognitive Complexity · ScmCommands.register (cognitive 33) later/vscode-extension/client/src/commands/scmCommands.ts
  • Cognitive Complexity · BranchCommands.register (cognitive 32) later/vscode-extension/client/src/commands/branchCommands.ts
  • Cognitive Complexity · RuntimeChild.fns (cognitive 31) backend/src/Builtins/Builtins.Cli/Libs/RuntimeChild.fs
  • Cognitive Complexity · PackageCommands.register (cognitive 30) later/vscode-extension/client/src/commands/packageCommands.ts
  • Cognitive Complexity · Syscall.fns (cognitive 28) backend/src/Builtins/Builtins.Cli/Libs/Syscall.fs
  • Cognitive Complexity · PinnedItemsServiceImpl.load (cognitive 26) later/vscode-extension/client/src/services/pinnedItemsService.ts
  • Cognitive Complexity · cli.html.shell.onData() (cognitive 25) later/backend/src/Wasm/wwwroot/cli.html
  • Cognitive Complexity · docsPage.formatContent (cognitive 24) later/vscode-extension/client/src/panels/homepage/pages/docsPage.ts
  • Cognitive Complexity · HostProcess.startChild (cognitive 20) backend/src/LibExecution/Host/HostProcess.fs
  • Cognitive Complexity · Permissions.fns (cognitive 20) backend/src/Builtins/Builtins.Matter/Libs/PM/Permissions.fs
  • Cognitive Complexity · HostPosix.pollDescriptors (cognitive 19) backend/src/LibExecution/Host/HostPosix.fs
  • Cognitive Complexity · HostPosix.tryTerminalWindowSize (cognitive 19) backend/src/LibExecution/Host/HostPosix.fs
  • Cognitive Complexity · collect_diagnostics.failure_databases (cognitive 18) .circleci/collect_diagnostics.py
  • Cognitive Complexity · Requirements.forExpressionWith (cognitive 17) backend/src/LibExecution/CallGraph.fs
  • Cognitive Complexity · Interpreter.applyInstruction (cognitive 17) backend/src/LibExecution/Interpreter.fs
  • Cognitive Complexity · DvalCreator.enumFieldsSync (cognitive 17) backend/src/LibExecution/TypeChecker.fs
  • Cognitive Complexity · HostPosix.withParent (cognitive 17) backend/src/LibExecution/Host/HostPosix.fs
  • Cognitive Complexity · collect_diagnostics.collect (cognitive 17) .circleci/collect_diagnostics.py
  • Cognitive Complexity · HostPosix.utimensAt (cognitive 16) backend/src/LibExecution/Host/HostPosix.fs
  • Cognitive Complexity · DarkFileSystemProvider.writeFile (cognitive 16) later/vscode-extension/client/src/providers/darkFileSystemProvider.ts
  • God Classes · TooManyFunctions: HostKernel backend/src/LibExecution/Host/HostKernel.fs
  • God Classes · FileTooLong: Host/HostPosix.fs backend/src/LibExecution/Host/HostPosix.fs
  • God Classes · MethodTooLong: BranchManagerPanel._getHtml later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts
  • God Classes · FileTooLong: LibExecution/Execution.fs backend/src/LibExecution/Execution.fs
  • God Classes · MethodTooLong: BranchCommands.register later/vscode-extension/client/src/commands/branchCommands.ts
  • Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) backend/src/Builtins/Builtins.Pure/Libs/Int128.fs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) backend/src/LibDB/AstTransformer.fs
  • Code Duplication · Duplicated block (14–19 lines × 2) backend/src/LibParser/Parser.fs
  • Code Duplication · Duplicated block (11 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Float.fs
  • Code Duplication · Duplicated block (8–10 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs
  • Code Duplication · Duplicated block (9 lines × 2) backend/src/LibExecution/TypeChecker.fs
  • Code Duplication · Duplicated block (7–8 lines × 2) backend/src/LibExecution/Host/HostDescriptors.fs
  • Code Duplication · Duplicated block (5 lines × 2) backend/src/LibParser/Package.fs
  • Code Duplication · Duplicated block (17 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/String.fs
  • Code Duplication · Duplicated block (16 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/String.fs
  • Code Duplication · Duplicated block (14 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Regex.fs
  • Code Duplication · Duplicated block (14 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs
  • Code Duplication · Duplicated block (13 lines × 2) backend/src/Builtins/Builtins.Cli/Libs/Output.fs
  • Code Duplication · Duplicated block (13 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Regex.fs
  • Code Duplication · Duplicated block (10 lines × 3) backend/src/Builtins/Builtins.Matter/Libs/Traces.fs
  • Code Duplication · Duplicated block (10 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs
  • Code Duplication · Duplicated block (12 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs
  • Code Duplication · Duplicated block (11 lines × 6) backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs
  • Code Duplication · Duplicated block (11 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs
  • Code Duplication · Duplicated block (11 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs
  • Code Duplication · Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs
  • Code Duplication · Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Math.fs
  • Code Duplication · Duplicated block (12 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs
  • Code Duplication · Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Dict.fs
  • Code Duplication · Duplicated block (11 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/Int32.fs
  • Code Duplication · Duplicated block (12 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs
  • Code Duplication · Duplicated block (11 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Int64.fs
  • Code Duplication · Duplicated block (11 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int32.fs
  • Code Duplication · Duplicated block (11 lines × 6) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs
  • Code Duplication · Duplicated block (12 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int8.fs
  • Code Duplication · Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs
  • Code Duplication · Duplicated block (11 lines × 2) backend/src/Builtins/Builtins.Cli/Libs/Posix.fs
  • Code Duplication · Duplicated block (12 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int8.fs
  • Code Duplication · Duplicated block (11 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int8.fs
  • Code Duplication · Duplicated block (11 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs
  • Code Duplication · Duplicated block (10 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/List.fs
  • Code Duplication · Duplicated block (11 lines × 2) backend/src/LibParser/Parser.fs
  • Code Duplication · Duplicated block (10 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs
  • Code Duplication · Duplicated block (10 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs
  • Code Duplication · Duplicated block (8 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs
  • Code Duplication · Duplicated block (9 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs
  • Code Duplication · Duplicated block (6 lines × 2) backend/src/LibExecution/Host/HostPosix.fs
  • Code Duplication · Duplicated block (5 lines × 2) backend/src/LibExecution/Dval.fs
  • Churn × Complexity Hotspots · Hotspot: backend/src/LocalExec/LocalExec.fs backend/src/LocalExec/LocalExec.fs
  • Churn × Complexity Hotspots · Hotspot: backend/src/LibExecution/Host/HostPosix.fs backend/src/LibExecution/Host/HostPosix.fs
  • Churn × Complexity Hotspots · Hotspot: backend/src/LibDB/PackageOpPlayback.fs backend/src/LibDB/PackageOpPlayback.fs
  • Churn × Complexity Hotspots · Hotspot: backend/src/LibExecution/Host/HostProcess.fs backend/src/LibExecution/Host/HostProcess.fs
  • Churn × Complexity Hotspots · Hotspot: backend/src/Builtins/Builtins.Cli/Libs/Syscall.fs backend/src/Builtins/Builtins.Cli/Libs/Syscall.fs
  • Churn × Complexity Hotspots · Hotspot: backend/src/Builtins/Builtins.Matter/Libs/PM/Permissions.fs backend/src/Builtins/Builtins.Matter/Libs/PM/Permissions.fs

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

Fixed since the last survey: 161 findings

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

  • Cyclomatic Complexity · RTQueryCompiler.executeInstruction (cyclomatic 75) backend/src/LibExecution/RTQueryCompiler.fs
  • Cyclomatic Complexity · RTQueryCompiler.compileLambda (cyclomatic 55) backend/src/LibExecution/RTQueryCompiler.fs
  • Cyclomatic Complexity · DvalReprInternalQueryable.parseJsonV0 (cyclomatic 48) backend/src/LibSerialization/DvalReprInternalQueryable.fs
  • Cyclomatic Complexity · RTQueryCompiler.symbolicToSql (cyclomatic 38) backend/src/LibExecution/RTQueryCompiler.fs
  • Cyclomatic Complexity · DvalReprInternalQueryable.toJsonV0 (cyclomatic 33) backend/src/LibSerialization/DvalReprInternalQueryable.fs
  • Cyclomatic Complexity · DB.fns (cyclomatic 32) backend/src/Builtins/Builtins.Matter/Libs/DB.fs
  • Cyclomatic Complexity · BranchCommands.register (cyclomatic 29) vscode-extension/client/src/commands/branchCommands.ts
  • Cyclomatic Complexity · PackageCommands.register (cyclomatic 29) vscode-extension/client/src/commands/packageCommands.ts
  • Cyclomatic Complexity · BranchManagerPanel.constructor (cyclomatic 29) vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts
  • Cyclomatic Complexity · HostProcess.io (cyclomatic 26) backend/src/LibExecution/Host/HostProcess.fs
  • Cyclomatic Complexity · PackagesTreeDataProvider.getChildren (cyclomatic 26) REDACTED
  • Cyclomatic Complexity · Store.fns (cyclomatic 22) backend/src/Builtins/Builtins.Matter/Libs/PM/Store.fs
  • Cyclomatic Complexity · cli.html.shell.onData() (cyclomatic 22) backend/src/Wasm/wwwroot/cli.html
  • Cyclomatic Complexity · ScmCommands.register (cyclomatic 21) vscode-extension/client/src/commands/scmCommands.ts
  • Cyclomatic Complexity · Requirements.forFunctionWith (cyclomatic 20) backend/src/LibExecution/CallGraph.fs
  • Cyclomatic Complexity · HttpClient.fns (cyclomatic 18) backend/src/Builtins/Builtins.Http.Client/Libs/HttpClient.fs
  • Cyclomatic Complexity · Execution.fns (cyclomatic 17) backend/src/Builtins/Builtins.Cli/Libs/Execution.fs
  • Cognitive Complexity · HostProcess.io (cognitive 74) backend/src/LibExecution/Host/HostProcess.fs
  • Cognitive Complexity · RTQueryCompiler.executeInstruction (cognitive 69) backend/src/LibExecution/RTQueryCompiler.fs
  • Cognitive Complexity · DB.fns (cognitive 41) backend/src/Builtins/Builtins.Matter/Libs/DB.fs
  • Cognitive Complexity · BranchManagerPanel.constructor (cognitive 41) vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts
  • Cognitive Complexity · PackagesTreeDataProvider.getChildren (cognitive 36) REDACTED
  • Cognitive Complexity · HostLibc.listDir (cognitive 33) backend/src/LibExecution/Host/HostLibc.fs
  • Cognitive Complexity · ScmCommands.register (cognitive 33) vscode-extension/client/src/commands/scmCommands.ts
  • Cognitive Complexity · BranchCommands.register (cognitive 32) vscode-extension/client/src/commands/branchCommands.ts
  • Cognitive Complexity · PackageCommands.register (cognitive 30) vscode-extension/client/src/commands/packageCommands.ts
  • Cognitive Complexity · Store.fns (cognitive 29) backend/src/Builtins/Builtins.Matter/Libs/PM/Store.fs
  • Cognitive Complexity · Requirements.forFunctionWith (cognitive 28) backend/src/LibExecution/CallGraph.fs
  • Cognitive Complexity · PinnedItemsServiceImpl.load (cognitive 26) vscode-extension/client/src/services/pinnedItemsService.ts
  • Cognitive Complexity · RTQueryCompiler.symbolicToSql (cognitive 25) backend/src/LibExecution/RTQueryCompiler.fs
  • Cognitive Complexity · DvalReprInternalQueryable.parseJsonV0 (cognitive 25) backend/src/LibSerialization/DvalReprInternalQueryable.fs
  • Cognitive Complexity · Execution.fns (cognitive 25) backend/src/Builtins/Builtins.Cli/Libs/Execution.fs
  • Cognitive Complexity · cli.html.shell.onData() (cognitive 25) backend/src/Wasm/wwwroot/cli.html
  • Cognitive Complexity · docsPage.formatContent (cognitive 24) vscode-extension/client/src/panels/homepage/pages/docsPage.ts
  • Cognitive Complexity · HttpClient.fns (cognitive 21) backend/src/Builtins/Builtins.Http.Client/Libs/HttpClient.fs
  • Cognitive Complexity · PackagePermissions.loadClosure (cognitive 19) backend/src/LibDB/PackagePermissions.fs
  • Cognitive Complexity · HostLibc.withParent (cognitive 17) backend/src/LibExecution/Host/HostLibc.fs
  • Cognitive Complexity · HostLibc.tryTerminalWindowSize (cognitive 16) backend/src/LibExecution/Host/HostLibc.fs
  • Cognitive Complexity · HostLibc.fdWrite (cognitive 16) backend/src/LibExecution/Host/HostLibc.fs
  • Cognitive Complexity · DarkFileSystemProvider.writeFile (cognitive 16) vscode-extension/client/src/providers/darkFileSystemProvider.ts
  • God Classes · FileTooLong: Host/HostLibc.fs backend/src/LibExecution/Host/HostLibc.fs
  • God Classes · FileTooLong: Libs/Posix.fs backend/src/Builtins/Builtins.Cli/Libs/Posix.fs
  • God Classes · MethodTooLong: BranchManagerPanel._getHtml vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts
  • God Classes · FileTooLong: Libs/DB.fs backend/src/Builtins/Builtins.Matter/Libs/DB.fs
  • God Classes · FileTooLong: LibDB/Queries.fs backend/src/LibDB/Queries.fs
  • God Classes · TooManyFunctions: Execution backend/src/LibExecution/Execution.fs
  • God Classes · FileTooLong: LibDB/Branches.fs backend/src/LibDB/Branches.fs
  • God Classes · FileTooLong: LibExecution/RTQueryCompiler.fs backend/src/LibExecution/RTQueryCompiler.fs
  • God Classes · FileTooLong: Libs/Int8.fs backend/src/Builtins/Builtins.Pure/Libs/Int8.fs
  • God Classes · FileTooLong: LibDB/Inserts.fs backend/src/LibDB/Inserts.fs
  • God Classes · FileTooLong: Libs/Int16.fs backend/src/Builtins/Builtins.Pure/Libs/Int16.fs
  • God Classes · FileTooLong: Libs/Int32.fs backend/src/Builtins/Builtins.Pure/Libs/Int32.fs
  • God Classes · MethodTooLong: BranchCommands.register vscode-extension/client/src/commands/branchCommands.ts
  • God Classes · FileTooLong: Libs/Int64.fs backend/src/Builtins/Builtins.Pure/Libs/Int64.fs
  • Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) backend/src/Builtins/Builtins.Pure/Libs/Int128.fs
  • Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) backend/src/Builtins/Builtins.Pure/Libs/Int.fs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) backend/src/LibDB/AstTransformer.fs
  • Code Duplication · Duplicated block (23–26 lines × 2) backend/src/Builtins/Builtins.Http.Client/Libs/HttpClient.fs
  • Code Duplication · Duplicated block (22 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Json.fs
  • Code Duplication · Duplicated block (21–22 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Json.fs
  • Code Duplication · Duplicated block (22 lines × 2) backend/src/LibDB/UserDB.fs
  • Code Duplication · Duplicated block (14–15 lines × 2) backend/src/Builtins/Builtins.Cli/Libs/File.fs
  • Code Duplication · Duplicated block (14 lines × 3) backend/src/Builtins/Builtins.Matter/Libs/DB.fs
  • Code Duplication · Duplicated block (13 lines × 4) backend/src/Builtins/Builtins.Matter/Libs/DB.fs
  • Code Duplication · Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/DB.fs
  • Code Duplication · Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Float.fs
  • Code Duplication · Duplicated block (10 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/DB.fs
  • Code Duplication · Duplicated block (9 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs
  • Code Duplication · Duplicated block (9 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs
  • Code Duplication · Duplicated block (9 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Int32.fs
  • Code Duplication · Duplicated block (9 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs
  • Code Duplication · Duplicated block (8 lines × 3) backend/src/LibExecution/Interpreter.fs
  • Code Duplication · Duplicated block (8 lines × 2) backend/src/LibExecution/Interpreter.fs
  • Code Duplication · Duplicated block (7 lines × 2) backend/src/LibExecution/Interpreter.fs
  • Code Duplication · Duplicated block (5 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Json.fs
  • Code Duplication · Duplicated block (5 lines × 2) backend/src/LibExecution/ProgramTypesToDarkTypes.fs
  • Code Duplication · Duplicated block (18 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/String.fs
  • Code Duplication · Duplicated block (14 lines × 2) backend/src/Builtins/Builtins.Cli/Libs/Output.fs
  • Code Duplication · Duplicated block (14 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs
  • Code Duplication · Duplicated block (14 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Regex.fs
  • Code Duplication · Duplicated block (14 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/Regex.fs
  • Code Duplication · Duplicated block (11 lines × 3) backend/src/Builtins/Builtins.Matter/Libs/Traces.fs
  • Code Duplication · Duplicated block (11 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs
  • Code Duplication · Duplicated block (11 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/List.fs
  • Code Duplication · Duplicated block (12 lines × 6) backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs
  • Code Duplication · Duplicated block (12 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int32.fs
  • Code Duplication · Duplicated block (12 lines × 7) backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs
  • Code Duplication · Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Int64.fs
  • Code Duplication · Duplicated block (12 lines × 6) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs
  • Code Duplication · Duplicated block (12 lines × 7) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs
  • Code Duplication · Duplicated block (13 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Math.fs
  • Code Duplication · Duplicated block (13 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs
  • Code Duplication · Duplicated block (13 lines × 2) backend/src/LibParser/Parser.fs
  • Code Duplication · Duplicated block (12 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/Int64.fs
  • Code Duplication · Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs
  • Code Duplication · Duplicated block (13 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs
  • Code Duplication · Duplicated block (13 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int8.fs
  • Code Duplication · Duplicated block (12 lines × 5) backend/src/Builtins/Builtins.Pure/Libs/Int32.fs
  • Code Duplication · Duplicated block (12 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs
  • Code Duplication · Duplicated block (12 lines × 9) backend/src/Builtins/Builtins.Pure/Libs/Int8.fs
Rebuild cost: about €140,000 · Estimate
Cost to rebuild€47,000 to €240,000, for 782 to 2,482 hours of work, about 1.0 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 56. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 94,958 lines of product code

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

Top priorities

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

1
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Raises the score by about 5 points · Medium effort · Visual & motion safety
2
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
Raises the score by about 4 points · Medium effort · A11y enforcement
3
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 3 points · Medium effort · Forms & labels

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €140,000 to build again, about 1.0 person-years of work. Its weakest lens is Accessibility, at 49 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.3 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 4% to 10% on every change. The history of the code shows how much it changes: about 386,497 lines over the last 90 days, which is about 1,567,460 lines a year. At that pace, the extra work comes to an estimated 170.4 to 1022.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — bounded-context dependency graph

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

arch ctx:Builtins Builtins 9 projects ctx:LibConfig LibConfig 1 project ctx:Builtins->ctx:LibConfig ctx:LibDB LibDB 1 project ctx:Builtins->ctx:LibDB ctx:LibExecution LibExecution 1 project ctx:Builtins->ctx:LibExecution ctx:LibParser LibParser 1 project ctx:Builtins->ctx:LibParser ctx:LibSerialization LibSerialization 1 project ctx:Builtins->ctx:LibSerialization ctx:Prelude Prelude 1 project ctx:Builtins->ctx:Prelude ctx:Cli Cli 1 project ctx:Cli->ctx:Builtins ctx:Cli->ctx:LibDB ctx:Cli->ctx:LibExecution ctx:LibConfig->ctx:Prelude ctx:LibDB->ctx:LibConfig ctx:LibDB->ctx:LibExecution ctx:LibDB->ctx:LibSerialization ctx:LibDB->ctx:Prelude ctx:LibExecution->ctx:Prelude ctx:LibParser->ctx:LibDB ctx:LibParser->ctx:LibExecution ctx:LibParser->ctx:Prelude ctx:LibSerialization->ctx:LibExecution ctx:LibSerialization->ctx:Prelude ctx:LocalExec LocalExec 1 project ctx:LocalExec->ctx:Builtins ctx:LocalExec->ctx:LibDB ctx:LocalExec->ctx:LibExecution ctx:LocalExec->ctx:LibParser ctx:LocalExec->ctx:LibSerialization __more__ +1 more contexts

Architecture: which parts of the code depend on which

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

990 modules, with 1328 dependencies between them. 3 loops run through 33 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 950 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 LibExecution.Branching2 LibExecution.Effects3 LibExecution.ProgramTypes.PackageTest4 LibExecution.ProgramTypes.PackageType5 LibExecution.ProgramTypes.PackageValue6 LibExecution.ProgramTypes.TraitImpl7 NEList8 LibExecution.Permissions9 LibExecution.ProgramTypes.FQFnName10 LibExecution.ProgramTypes.FQTypeName11 LibExecution.ProgramTypes.FQValueName12 LibExecution.ProgramTypes.PackageFn13 LibExecution.RuntimeTypes.FQFnName14 LibExecution.RuntimeTypes.FQTypeName15 LibExecution.RuntimeTypes.FQValueName16 LibExecution.RuntimeTypes.PackageFn17 LibParser.WrittenTypes18 LibExecution.HostTypes19 LibExecution.ProgramTypes.Trait20 LibExecution.RuntimeTypes.RuntimeError21 LibExecution.ProgramTypes22 LibExecution.RuntimeTypes23 LibDB.DependencyExtractor24 LibDB.Docs25 LibDB.PackagePermissions26 LibDB.Tracing27 LibExecution.Interpreter28 LibExecution.ProgramTypes.Search29 LibExecution.ProgramTypes.TypeDeclaration30 LibExecution.RuntimeTypes.TypeDeclaration31 LibExecution.Scheduler32 LibParser.NameResolver33 Tests.SerializationTestValues.ProgramTypes34 LibDB.AstTransformer35 LibDB.DeferredResolver36 LibDB.PackageOpPlayback37 LibParser.Package38 LibSerialization.Hashing.Canonical39 LibDB.Propagation40 LibSerialization.Hashing.Hashing
1 LibExecution.Branching
2 LibExecution.Effects
3 LibExecution.ProgramTypes.PackageTest
4 LibExecution.ProgramTypes.PackageType
5 LibExecution.ProgramTypes.PackageValue
6 LibExecution.ProgramTypes.TraitImpl
7 NEList
8 LibExecution.Permissions1
9 LibExecution.ProgramTypes.FQFnName5
10 LibExecution.ProgramTypes.FQTypeName1
11 LibExecution.ProgramTypes.FQValueName1
12 LibExecution.ProgramTypes.PackageFn1
13 LibExecution.RuntimeTypes.FQFnName3
14 LibExecution.RuntimeTypes.FQTypeName1
15 LibExecution.RuntimeTypes.FQValueName1
16 LibExecution.RuntimeTypes.PackageFn1
17 LibParser.WrittenTypes1
18 LibExecution.HostTypes3
19 LibExecution.ProgramTypes.Trait1112
20 LibExecution.RuntimeTypes.RuntimeError1115
21 LibExecution.ProgramTypes11111463111
22 LibExecution.RuntimeTypes1158745112
23 LibDB.DependencyExtractor11111114
24 LibDB.Docs11111113
25 LibDB.PackagePermissions112121
26 LibDB.Tracing118
27 LibExecution.Interpreter1232135
28 LibExecution.ProgramTypes.Search1111111
29 LibExecution.ProgramTypes.TypeDeclaration14
30 LibExecution.RuntimeTypes.TypeDeclaration13
31 LibExecution.Scheduler131111
32 LibParser.NameResolver11111112
33 Tests.SerializationTestValues.ProgramTypes11111116
34 LibDB.AstTransformer1111411131
35 LibDB.DeferredResolver111111112191
36 LibDB.PackageOpPlayback111111181
37 LibParser.Package211
38 LibSerialization.Hashing.Canonical111121121154
39 LibDB.Propagation111111161
40 LibSerialization.Hashing.Hashing1222122102
Uses a module listed above itPart of a loopThe module itself
1 LibExecution.Branching2 LibExecution.Effects3 LibExecution.ProgramTypes.PackageTest4 LibExecution.ProgramTypes.PackageType5 LibExecution.ProgramTypes.PackageValue6 LibExecution.ProgramTypes.TraitImpl7 NEList8 LibExecution.Permissions9 LibExecution.ProgramTypes.FQFnName10 LibExecution.ProgramTypes.FQTypeName11 LibExecution.ProgramTypes.FQValueName12 LibExecution.ProgramTypes.PackageFn13 LibExecution.RuntimeTypes.FQFnName14 LibExecution.RuntimeTypes.FQTypeName15 LibExecution.RuntimeTypes.FQValueName16 LibExecution.RuntimeTypes.PackageFn17 LibParser.WrittenTypes18 LibExecution.HostTypes19 LibExecution.ProgramTypes.Trait20 LibExecution.RuntimeTypes.RuntimeError21 LibExecution.ProgramTypes22 LibExecution.RuntimeTypes23 LibDB.DependencyExtractor24 LibDB.Docs25 LibDB.PackagePermissions26 LibDB.Tracing27 LibExecution.Interpreter28 LibExecution.ProgramTypes.Search29 LibExecution.ProgramTypes.TypeDeclaration30 LibExecution.RuntimeTypes.TypeDeclaration31 LibExecution.Scheduler32 LibParser.NameResolver33 Tests.SerializationTestValues.ProgramTypes34 LibDB.AstTransformer35 LibDB.DeferredResolver36 LibDB.PackageOpPlayback37 LibParser.Package38 LibSerialization.Hashing.Canonical39 LibDB.Propagation40 LibSerialization.Hashing.HashingLibExecution.Branching1LibExecution.Effects2LibExecution.ProgramTypes.PackageTest3LibExecution.ProgramTypes.PackageType4LibExecution.ProgramTypes.PackageValue5LibExecution.ProgramTypes.TraitImpl6NEList7LibExecution.Permissions8LibExecution.ProgramTypes.FQFnName9LibExecution.ProgramTypes.FQTypeName10LibExecution.ProgramTypes.FQValueName11LibExecution.ProgramTypes.PackageFn12LibExecution.RuntimeTypes.FQFnName13LibExecution.RuntimeTypes.FQTypeName14LibExecution.RuntimeTypes.FQValueName15LibExecution.RuntimeTypes.PackageFn16LibParser.WrittenTypes17LibExecution.HostTypes18LibExecution.ProgramTypes.Trait19LibExecution.RuntimeTypes.RuntimeError20LibExecution.ProgramTypes21LibExecution.RuntimeTypes22LibDB.DependencyExtractor23LibDB.Docs24LibDB.PackagePermissions25LibDB.Tracing26LibExecution.Interpreter27LibExecution.ProgramTypes.Search28LibExecution.ProgramTypes.TypeDeclaration29LibExecution.RuntimeTypes.TypeDeclaration30LibExecution.Scheduler31LibParser.NameResolver32Tests.SerializationTestValues.ProgramTypes33LibDB.AstTransformer34LibDB.DeferredResolver35LibDB.PackageOpPlayback36LibParser.Package37LibSerialization.Hashing.Canonical38LibDB.Propagation39LibSerialization.Hashing.Hashing4015111311113111211151111146311111587451121111111411111113112121118123213511111111413131111111111121111111611114111311111111121911111111812111111211211541111111611222122102+950 more modules (most-connected shown)

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

At a glance — Architecture · 82% · Strong ·

At a glance — Maturity · 63% · Adequate · gated by M2 ·

At a glance — Readiness · 53% · Adequate · gated by R6, P2, P3 ·

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

At a glance — Accessibility · 49% · Adequate · gated by AC6 ·

At a glance — Performance · 88% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A07:2025 — Authentication Failures40High / Critical
A02:2025 — Security Misconfiguration18High / Critical
A05:2025 — Injection11High / Critical
A03:2025 — Software Supply Chain Failures7High / Critical

Roadmap

First, address visual and motion safety by ensuring visible focus styles, respecting reduced motion preferences, and fixing low-contrast colors. Next, enforce accessibility standards by adding automated checks to your test suite and CI pipeline, while simultaneously ensuring all form controls and buttons have proper programmatic labels. Finally, improve observability by implementing structured logging via ILogger or Serilog, and establish a robust tooling foundation by adding test runners and type checking scripts to your package configuration and CI workflows.

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

Do thisHelpsEffortDimension
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+4.6 ptsMediumVisual & motion safety
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.+4.2 ptsMediumA11y enforcement
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+3.2 ptsMediumForms & labels
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.5 ptsLowADR Quality
Log through `ILogger` (Microsoft.Extensions.Logging, or Serilog with a JSON sink) at meaningful points in the programs and services you run.+2.7 ptsMediumObservability
Add a test runner (vitest / jest / playwright) and `tsc --noEmit` as package.json scripts and run them in CI.+2.3 ptsMediumTooling
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+1.4 ptsMediumArchitecture documentation
Resolve the 2 Off-boarding risk finding(s) in Bus Factor.+0.6 ptsLowBus Factor

File quality

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

FileScoreBandWorst signal
REDACTED0.9SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED3.7MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.4MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.6MixedSecrets (history): REDACTED: REDACTED
REDACTED4.8MixedSecrets (history): REDACTED: REDACTED
REDACTED5.1MixedSecrets (history): REDACTED: REDACTED
REDACTED5.1MixedSecrets (history): REDACTED: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.8MixedSecrets (history): REDACTED: REDACTED
REDACTED5.8MixedSecrets (history): REDACTED: REDACTED
REDACTED5.8MixedSecrets (history): REDACTED: REDACTED
REDACTED5.8MixedSecrets (history): High secret: REDACTED
REDACTED5.8MixedSecrets (history): REDACTED: REDACTED
REDACTED5.8MixedSecrets (history): REDACTED: REDACTED
backend/src/LibParser/Lexer.fs7.0Near-cleanCyclomatic Complexity: Lexer.tokenize (cyclomatic 221)
backend/src/LibExecution/Interpreter.fs7.0Near-cleanCyclomatic Complexity: Interpreter.runSyncInstructions (cyclomatic 134)
backend/src/Builtins/Builtins.Pure/Libs/List.fs7.0Near-cleanCyclomatic Complexity: List.fns (cyclomatic 126)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 60

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

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

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

Could not be resolved — 34

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. 57 of 60 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — 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 — 60 dimensions across the health lenses
D1D2D3D4D5D6D9D13D14D15D16D19D20D21D26D27D28D29D30D31D34D35D36D43D44AC2AC3AC6AC7AX10AX3AX4GD1M1M2M3M4P1P10P2P3P4P6PF2PF3R1R10R11R2R3R5R6R7R8R9S1X20X23X27X28

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 700 of 717 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a16651-e87e-7f0f-bd51-b154711e001a.

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

Run transparency — what happened this run

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

  • 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 MEASURED: the test run produced no results for any test tier, so no test ever ran and flakiness could not be exercised. The cause could not be attributed, so it is excluded from the score rather than read as an absence of 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. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: `dotnet list package` exited 1 with no output.
  • 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 backend/src/LibParser/Parser.fs, backend/src/Builtins/Builtins.Language/Libs/Parser.fs, backend/src/LibExecution/ProgramTypes.fs, backend/src/LibParser/WrittenTypes.fs, backend/src/Builtins/Builtins.Pure/Libs/List.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.
  • D22 Internal API Consistency — 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. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (later/vscode-extension/package.json), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • 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. D28's config-credential rule (WD-SECRET-0002) parses each committed `.json` config as a document and reads credential-named values; `later/.vscode/tasks-extension-task.json` did not parse (JSON5, a template, several concatenated documents), so a credential bound there is UNMEASURED by that rule. gitleaks still scanned the same files as text.
  • 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.
  • AX1 Captive dependencies — 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 reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is Microsoft.Extensions.DependencyInjection registered from F#, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped.
  • C1 Data Protection — 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — 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. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — 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. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — 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. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — 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. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • IC1 Incompleteness & stubs — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X1 Async correctness — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X32 Type resolved by simple name across every loaded assembly — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • 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.
  • 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.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • 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.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • 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".
  • 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 (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity3.8 / 10Weak✓ Tool-verified

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

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

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

127 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was NoModule.fns at 270. A further 77 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 Stdin.keyReadToDval at 150 — they are counted neither in the figure above nor in this dimension's score. 18 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: backend/src/LibExecution/Host/HostTypes.fs (HostTypes.describeOperation at 79), backend/src/LibSerialization/Binary/Serializers/PT/Expr.fs (Expr.read at 39), backend/src/LibSerialization/Hashing/Canonical.fs (Canonical.writeExpr at 39), backend/src/LibExecution/RuntimeTypesToDarkTypes.fs (RuntimeError.fromDT at 33), backend/src/LibExecution/ProgramTypesAst.fs (ProgramTypesAst.unqualifiedResolvedNamesInExpr at 32), and 13 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.

NoModule.fns (cyclomatic 270)backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:116
Lexer.tokenize (cyclomatic 221)backend/src/LibParser/Lexer.fs:333
Interpreter.runSyncInstructions (cyclomatic 134)backend/src/LibExecution/Interpreter.fs:4374
List.fns (cyclomatic 126)backend/src/Builtins/Builtins.Pure/Libs/List.fs:197
Json.parse (cyclomatic 113)backend/src/Builtins/Builtins.Pure/Libs/Json.fs:279

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

What to do

  1. Bring the 4 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with NoModule.fns (cyclomatic 270), Lexer.tokenize (cyclomatic 221), Interpreter.runSyncInstructions (cyclomatic 134). — 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 Cyclomatic Complexity from 3.8 to about 5.0/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

179 method(s) exceeded the cognitive complexity threshold of 15; the worst was Interpreter.runSyncInstructions at 314.

Interpreter.runSyncInstructions (cognitive 314)backend/src/LibExecution/Interpreter.fs:4374
Lexer.tokenize (cognitive 287)backend/src/LibParser/Lexer.fs:333
Interpreter.applyInstructionForced (cognitive 281)backend/src/LibExecution/Interpreter.fs:3520
List.fns (cognitive 214)backend/src/Builtins/Builtins.Pure/Libs/List.fs:197
Json.parse (cognitive 164)backend/src/Builtins/Builtins.Pure/Libs/Json.fs:279

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

What to do

  1. Bring the 11 bodies over 120 down to 120 or less in Cognitive Complexity — start with Interpreter.runSyncInstructions (cognitive 314), Lexer.tokenize (cognitive 287), Interpreter.applyInstructionForced (cognitive 281). — 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 11 together lifts Cognitive Complexity from 2.0 to about 3.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes7.8 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

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

43 god class(es) detected.

FileTooLong: LibExecution/Interpreter.fs · ×35backend/src/LibExecution/Interpreter.fs
TooManyFunctions: HostKernel · ×5backend/src/LibExecution/Host/HostKernel.fs:3
MethodTooLong: BranchManagerPanel._getHtml · ×2later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts:200
TooManyMethods: Schedulerbackend/src/LibExecution/Scheduler.fs:199

What to do

  1. Resolve the 35 FileTooLong finding(s) in God Classes — start with Parser.fs (2), Cli.fs (2), Interpreter.fs. — One of this dimension's main actionable groups (35 warning-level).
  2. Resolve the 5 TooManyFunctions finding(s) in God Classes — start with HostKernel.fs, Prelude.fs, PolicyStore.fs. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 2 MethodTooLong finding(s) in God Classes — start with branchManagerPanel.ts, branchCommands.ts. — One of this dimension's main actionable groups (2 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.2 / 10Stronggated by 153 serious findings✓ Tool-verified

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

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

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

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

Duplicated block (9 lines × 2) · ×13backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1539
Duplicated block (8 lines × 2) · ×12backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:74
Duplicated block (11 lines × 2) · ×8backend/src/Builtins/Builtins.Pure/Libs/Float.fs:26
Duplicated block (10 lines × 2) · ×8backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:889
Duplicated block (12 lines × 2) · ×7backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:116

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

What to do

  1. Resolve the 13 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with Cli.fs, PackageOps.fs, Packages.fs. — One of this dimension's main actionable groups (13 warning-level).
  2. Resolve the 12 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with List.fs (3), Parser.fs (2), LanguageTools.fs. — One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 8 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with Float.fs (2), REDACTED, Common.fs. — One of this dimension's main actionable groups (8 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

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

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

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

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

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

0 of 6 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

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

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

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

32 test methods: 32 unit, 0 integration, 0 BDD, 0 e2e. The Python suite contributes 32 test function(s) across 1 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 119 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 3 direct `PackageReference`(s), and 116 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

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

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

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

Top hotspots: backend/src/LibExecution/Interpreter.fs (101×134=13534); backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs (16×270=4320); backend/src/Builtins/Builtins.Pure/Libs/List.fs (34×126=4284)

Hotspot: backend/src/LibExecution/Interpreter.fs · ×93backend/src/LibExecution/Interpreter.fs:4374

What to do

  1. Resolve the 93 Hotspot finding(s) in Churn × Complexity Hotspots — start with Cli.fs (2), Parser.fs (2), Dval.fs (2). — One of this dimension's main actionable groups (93 warning-level).

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

D16 · Bus Factor8.0 / 10Strong✓ Tool-verified

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

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

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

41 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is backend/src/Builtins/Builtins.Matter/Libs/Traces.fs. Counted over 202 of the 265 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×2

What to do

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

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

D19 · Documentation QualityStrong◐ Sampled · advisory

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

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

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

The repository's READMEs document directories rather than the project: each test/assembly README is a directory-level guide for its own files (e.g. Dark HTTP server tests, HttpClient test files, NativeAOT experiment), while the root README and any architecture/design docs cover the broader scope, installation, usage, contribution, and license. The documentation is well-structured with an outline for each document present; many are focused on testing/verification rather than the project's main purpose. (15 of 25 sampled documents could not be assessed: 1 of 2 evaluation groups failed.)

Documentation: no installation or build instructions · ×2packages/darklang/cli/installation/README.md

What to do

  1. Resolve the 2 Documentation finding(s) in Documentation Quality — start with README.md (2). — One of this dimension's main actionable groups (2 recommendation-level).

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

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

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

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

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

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

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

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

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

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

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

1 of 22 build units (MSBuild, checkout, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

✓ On the Gold path — maintain.

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

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

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

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

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

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

88 % of calls cross a namespace and 2 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 35 REDACTED finding(s) in Secrets (history) — start with REDACTED (6), REDACTED (5), REDACTED (4). — One of this dimension's main actionable groups (35 issue-level).
  2. Resolve the 4 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
  3. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)1.7 / 10Critical✓ Tool-verified

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

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

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

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

11 finding(s): 0 critical, 10 high, 1 medium, 0 low. semgrep hit a parse error in 5 file(s) — `REDACTED` (lines 216–295), `later/.vscode/tasks-extension-task.json`, `scripts/run-in-docker` (line 58), `scripts/testing/_copy-store` (line 21), `scripts/testing/validate-cli-artifact` (line 119) — 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.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D30 · Dependency Vulnerabilities8.4 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D31 · IaC & Container Security6.3 / 10Adequate✓ Tool-verified

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

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

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

18 finding(s): 2 critical, 4 high, 10 medium, 2 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

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

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

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

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

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

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

0/3 supply-chain integrity signals present (provenance, signing, SBOM).

REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC2 · Forms & labels5.5 / 10Adequate✓ Tool-verified

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

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

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

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×2) — later/backend/src/Wasm/wwwroot/eval.html:28, later/backend/src/Wasm/wwwroot/repl.html:48

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC6 · Visual & motion safety3.1 / 10Weak✓ Tool-verified

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

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

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

  • `#input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — later/backend/src/Wasm/wwwroot/repl.html:33
  • `input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — later/backend/src/Wasm/wwwroot/site.css:23
  • `.sidebar` moves (`transition: width 0.3s ease, padding 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — later/vscode-extension/client/src/panels/homepage/styles/homepageStyles.css:25
  • `.toggle-btn svg` moves (`transition: transform 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — later/vscode-extension/client/src/panels/homepage/styles/homepageStyles.css:73

What to do

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

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

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

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

  • No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 4 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
AX10 · Code composition9.8 / 10Exemplary✓ Tool-verified

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

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

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

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

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

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

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

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

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

Other · Code Health — Unreviewed-generation residue in this repository's F#: bindings whose whole body still raises a "not implemented" error (NotImplementedException, failwith "not implemented"), and placeholder text (lorem ipsum, changeme/replace_me…) left in string literals of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

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

M1 · Documentation (README)7.7 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 1 of 2 project(s) that lack one — worth up to 1 pts.
M2 · Architecture documentation2.0 / 10Weak✓ Tool-verified

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

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

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

What to do

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

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

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

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

What to do

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

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

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

  • docs/writing-docstrings.md links to `LINK`, but `docs/LINK` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/writing-docstrings.md:37
  • docs/writing-docstrings.md names `client/styles/_docs.scss`, but no file or folder `client/styles/_docs.scss` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/writing-docstrings.md:53
  • docs/writing-docstrings.md names `client/src/ViewUtils.md`, but no file or folder `client/src/ViewUtils.md` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/writing-docstrings.md:53
  • later/README.md names `backend/src/LibCloud/Config.fs`, but no file or folder `backend/src/LibCloud/Config.fs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — later/README.md:272
  • later/README.md names `backend/static/favicon-32x32.png`, but no file or folder `backend/static/favicon-32x32.png` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — later/README.md:273
  • later/backend/src/Wasm/README.md runs `dotnet publish backend/src/Wasm/Wasm.fsproj -c Release -o rundir/wasm-repl`, but `backend/src/Wasm/Wasm.fsproj` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — later/backend/src/Wasm/README.md:18

What to do

  • Reconcile the README with reality: docs/writing-docstrings.md links to `LINK`, but `docs/LINK` does not exist; docs/writing-docstrings.md names `client/styles/_docs.scss`, but no file or folder `client/styles/_docs.scss` exists; docs/writing-docstrings.md names `client/src/ViewUtils.md`, but no file or folder `client/src/ViewUtils.md` exists; later/README.md names `backend/src/LibCloud/Config.fs`, but no file or folder `backend/src/LibCloud/Config.fs` exists; later/README.md names `backend/static/favicon-32x32.png`, but no file or folder `backend/static/favicon-32x32.png` exists.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

P2 · Observability2.0 / 10Weak✓ Tool-verified

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

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

  • No logging call was found in the 262 Python, JavaScript/TypeScript, F# production file(s) this check read across 24 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; F#: Microsoft.Extensions.Logging (ILogger), Serilog, NLog, log4net, Logary) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.

What to do

  • Log through `ILogger` (Microsoft.Extensions.Logging, or Serilog with a JSON sink) at meaningful points in the programs and services you run.
  • Add a health-check endpoint (ASP.NET Core's MapHealthChecks, or a /health route in your Giraffe/Suave app) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add `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 35209 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.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

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

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

P6 · Release Hygiene8.0 / 10Strong✓ Tool-verified

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

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

  • The changelog this check read carries 2 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.

What to do

  • Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
PF2 · Allocation hygiene9.2 / 10Exemplary✓ Tool-verified

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

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

What to do

  • Raise allocation-aware density on the hot paths — currently 641 use(s) across 99,340 production line(s) (~6.5/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
  • F#: on hot paths, work through Span/Memory (AsSpan/AsMemory) instead of copies, rent buffers from ArrayPool, make small records, unions and tuples [<Struct>]/struct (…) and options voption, mark lambda parameters of inline functions [<InlineIfLambda>], use valueTask for completions that are usually synchronous, and presize ResizeArray/StringBuilder.
PF3 · Async & latency hygiene8.5 / 10Exemplary✓ Tool-verified

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

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

  • `performWithSession` is async and calls .GetAwaiter().GetResult() — a blocking call inside async code stalls the thread-pool thread the workflow runs on, and every continuation queued behind it for as long as it runs. — backend/src/LibExecution/Host/Host.fs:1406

What to do

  • F#: inside async { } or task { }, bind with let! / do! (Async.AwaitTask for a Task) instead of Async.RunSynchronously, .Wait() or .GetAwaiter().GetResult(), and use do! Async.Sleep or Task.Delay instead of Thread.Sleep; Async.RunSynchronously belongs at the program's entry point, outside every workflow.
R1 · Type Safety9.3 / 10Exemplary✓ Tool-verified

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

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

What to do

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

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

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

  • later/vscode-extension/client/src/commands/branchCommands.ts:105 · later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts:106 — the two spans are one implementation copied and then locally edited — 374 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — later/vscode-extension/client/src/commands/branchCommands.ts:105
  • later/vscode-extension/client/src/services/pinnedItemsService.ts:153 · later/vscode-extension/client/src/services/pinnedItemsService.ts:201 — 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. — later/vscode-extension/client/src/services/pinnedItemsService.ts:153
  • later/vscode-extension/client/src/commands/scmCommands.ts:35 · later/vscode-extension/client/src/commands/scmCommands.ts:73 — 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. — later/vscode-extension/client/src/commands/scmCommands.ts:35
  • later/vscode-extension/client/src/services/pinnedItemsService.ts:30 · later/vscode-extension/client/src/services/recentItemsService.ts:34 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — later/vscode-extension/client/src/services/pinnedItemsService.ts:30

What to do

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

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

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

  • later/vscode-extension/client/src/extension.ts:2 imports vscode-languageclient/lib/common/semanticTokens, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — later/vscode-extension/client/src/extension.ts:2

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity6.8 / 10Strong✓ Tool-verified

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

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

  • (anonymous) has cyclomatic complexity 29 and cognitive complexity 41; 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. — later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts:57
  • (anonymous) has cyclomatic complexity 25 and cognitive complexity 26; 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. — later/vscode-extension/client/src/commands/packageCommands.ts:142
  • (anonymous) has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:300
  • getTreeItem has cyclomatic complexity 14 and cognitive complexity 11; 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. — later/vscode-extension/client/src/providers/treeviews/scmTreeDataProvider.ts:70
  • formatContent has cyclomatic complexity 13 and cognitive complexity 24; 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. — later/vscode-extension/client/src/panels/homepage/pages/docsPage.ts:34
  • constructor has cyclomatic complexity 12 and cognitive complexity 12; 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. — REDACTED:28

What to do

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

  • later/vscode-extension/client/src/panels/homepage/homepagePanel.ts has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — later/vscode-extension/client/src/panels/homepage/homepagePanel.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R5 · Dependency Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

R6 · Tooling3.3 / 10Weak✓ 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 a test runner (vitest / jest / playwright) and `tsc --noEmit` as package.json scripts and run them in CI.
R7 · Dead Code10.0 / 10Exemplary✓ 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.

  • Unreachable from the 3 application, 2 tooling and 0 test entry point(s) detected in this repo. Gate removals on `npm run REDACTED` — an undetected custom entry would make these reachable.
  • no import path from any entry point (3 application, 2 tooling, 0 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 — later/vscode-extension/client/src/types/index.ts
R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

R9 · Circular Imports8.3 / 10Strong✓ Tool-verified

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

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

  • later/vscode-extension/client/src/commands/scriptCommands.ts → later/vscode-extension/client/src/extension.ts → later/vscode-extension/client/src/commands/scriptCommands.ts — later/vscode-extension/client/src/commands/scriptCommands.ts:3

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Only what this repository's own non-C# files could be read for was assessed — markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

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

  • `https://cdn.jsdelivr.net/npm/@xterm/xterm@5.5.0/lib/xterm.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 2 such include(s) across the repository's markup. — later/backend/src/Wasm/wwwroot/cli.html:40

What to do

  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) 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.

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

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

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

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

Other · Code Health — Whether a `for … in` loop leaves the mutable .NET collection it is walking alone — F#'s own lists, arrays, maps and sets cannot be changed by a loop body, but a `ResizeArray`, `Dictionary`, `Queue` or other BCL collection walked by `for x in c do` is walked through its enumerator, so a body that adds to or removes from `c` makes the next `MoveNext` throw `InvalidOperationException` and the remaining items are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

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

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

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

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

WCAG coverage — what static analysis assessed

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

DimensionWCAG 2.2 A/AA criteriaCoverage
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

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

Reference — by lens

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

LensScoreRatingImpact
Code Health76%Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture82%StrongSolid.
Maturity63%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness53%Adequate — gated by R6, P2, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security64%Adequate — gated by D28, D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility49%Adequate — gated by AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance88%ExemplaryStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

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

  • SC1 Supply-chain hygiene — 1 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 — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 65 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 image/media element found in the parsed markup — AC1 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No F# function in this code takes an ASP.NET Core or Suave HttpContext (a Giraffe, Saturn, Falco, Oxpecker or Suave handler) and no F# class is an ASP.NET Core controller, so no request handler shares module state between request threads. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no exported interface declares behaviour
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~45427 lines of test source are present (.fs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not measured — no test run produced results
  • D12 Dependency Hygiene — Dependency hygiene not measured
  • D17 Explicit Debt — the C# workspace loaded 0 projects, so explicit-debt density could not be measured
  • D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution; this repository's .NET projects are all F# (.fsproj), which the C#/VB workspace does not load, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • 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
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • 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 (2 of 3 signals for this style — below the bar we score at): 216 value object(s); 22 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • 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
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (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 — Not applicable: no benchmark suite was found. This check searched for a BenchmarkDotNet reference in an .fsproj or .vbproj, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • R4 Test Coverage — the JS/TS workspace (27 production file(s)) has no JavaScript/TypeScript test, but it is 4.17% of this repository's production source and the other 95.83% carries 45,427 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 60 finding(s)
D28 · Secrets (history) · REDACTED · ×35
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 10 more in this group — see findings.md.
D28 · Secrets (history) · High secret · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <textarea> without a programmatic label · ×2
  • <textarea> without a programmatic label later/backend/src/Wasm/wwwroot/eval.html:28 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label later/backend/src/Wasm/wwwroot/repl.html:48 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
D30 · Dependency Vulnerabilities · High CVE · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Critical IaC · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) later/vscode-extension/client/src/commands/scriptCommands.ts:3 — later/vscode-extension/client/src/commands/scriptCommands.ts → later/vscode-extension/client/src/extension.ts → later/vscode-extension/client/src/commands/scriptCommands.ts
Serious — 632 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×93
  • Hotspot: backend/src/LibExecution/Interpreter.fs backend/src/LibExecution/Interpreter.fs:4374 — backend/src/LibExecution/Interpreter.fs changed 101 times in last 90 days, max cyclomatic complexity 134 in Interpreter.runSyncInstructions at line 4374. 3 of those changes were fix/bug commits, and the other 98 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibExecution/Interpreter.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: backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:116 — backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs changed 16 times in last 90 days, max cyclomatic complexity 270 in NoModule.fns at line 116. 2 of those changes were fix/bug commits, and the other 14 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Builtins/Builtins.Pure/Libs/NoModule.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: backend/src/Builtins/Builtins.Pure/Libs/List.fs backend/src/Builtins/Builtins.Pure/Libs/List.fs:197 — backend/src/Builtins/Builtins.Pure/Libs/List.fs changed 34 times in last 90 days, max cyclomatic complexity 126 in List.fns at line 197. 2 of those changes were fix/bug commits, and the other 32 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Builtins/Builtins.Pure/Libs/List.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: backend/src/Cli/Cli.fs backend/src/Cli/Cli.fs:411 — backend/src/Cli/Cli.fs changed 30 times in last 90 days, max cyclomatic complexity 98 in Main.runCli at line 411. 1 of those changes was a fix/bug commit, and the other 29 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Cli/Cli.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: backend/src/LibExecution/RuntimeTypes.fs backend/src/LibExecution/RuntimeTypes.fs:2161 — backend/src/LibExecution/RuntimeTypes.fs changed 75 times in last 90 days, max cyclomatic complexity 37 in DvalModule.toValueType at line 2161. 5 of those changes were fix/bug commits, and the other 70 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibExecution/RuntimeTypes.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: backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:175 — backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs changed 18 times in last 90 days, max cyclomatic complexity 150 in Stdin.keyReadToDval at line 175. 2 of those changes were fix/bug commits, and the other 16 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Builtins/Builtins.Cli/Libs/Stdin.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: backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1005 — backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs changed 38 times in last 90 days, max cyclomatic complexity 68 in Cli.fns at line 1005. 8 of those changes were fix/bug commits, and the other 30 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Builtins/Builtins.CliHost/Libs/Cli.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: backend/src/LibExecution/Host/Host.fs backend/src/LibExecution/Host/Host.fs:566 — backend/src/LibExecution/Host/Host.fs changed 27 times in last 90 days, max cyclomatic complexity 72 in Host.resolvePosix at line 566. 3 of those changes were fix/bug commits, and the other 24 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibExecution/Host/Host.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: backend/src/LibExecution/Host/HostTypes.fs backend/src/LibExecution/Host/HostTypes.fs:289 — backend/src/LibExecution/Host/HostTypes.fs changed 24 times in last 90 days, max cyclomatic complexity 79 in HostTypes.describeOperation at line 289. 2 of those changes were fix/bug commits, and the other 22 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibExecution/Host/HostTypes.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: backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:255 — backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs changed 30 times in last 90 days, max cyclomatic complexity 58 in Packages.fns at line 255. 3 of those changes were fix/bug commits, and the other 27 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.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: backend/src/LibParser/Parser.fs backend/src/LibParser/Parser.fs:2065 — backend/src/LibParser/Parser.fs changed 23 times in last 90 days, max cyclomatic complexity 75 in Parser.parsePrimary at line 2065. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibParser/Parser.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: backend/src/Builtins/Builtins.Pure/Libs/String.fs backend/src/Builtins/Builtins.Pure/Libs/String.fs:84 — backend/src/Builtins/Builtins.Pure/Libs/String.fs changed 24 times in last 90 days, max cyclomatic complexity 71 in String.fns at line 84. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Builtins/Builtins.Pure/Libs/String.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: backend/src/LibParser/WrittenTypesToProgramTypes.fs backend/src/LibParser/WrittenTypesToProgramTypes.fs:360 — backend/src/LibParser/WrittenTypesToProgramTypes.fs changed 18 times in last 90 days, max cyclomatic complexity 94 in Expr.toPT at line 360. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibParser/WrittenTypesToProgramTypes.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: backend/src/LibExecution/TypeChecker.fs backend/src/LibExecution/TypeChecker.fs:270 — backend/src/LibExecution/TypeChecker.fs changed 29 times in last 90 days, max cyclomatic complexity 57 in TypeChecker.unifyValueType at line 270. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibExecution/TypeChecker.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: backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs:96 — backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs changed 33 times in last 90 days, max cyclomatic complexity 47 in PackageOps.fns at line 96. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.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: backend/src/Builtins/Builtins.Pure/Libs/Json.fs backend/src/Builtins/Builtins.Pure/Libs/Json.fs:279 — backend/src/Builtins/Builtins.Pure/Libs/Json.fs changed 13 times in last 90 days, max cyclomatic complexity 113 in Json.parse at line 279. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Builtins/Builtins.Pure/Libs/Json.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: backend/src/LibDB/PackageManager.fs backend/src/LibDB/PackageManager.fs:274 — backend/src/LibDB/PackageManager.fs changed 20 times in last 90 days, max cyclomatic complexity 69 in PackageManager.createInMemoryOver at line 274. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibDB/PackageManager.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: backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs:547 — backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs changed 16 times in last 90 days, max cyclomatic complexity 86 in Expr.toRT at line 547. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibExecution/ProgramTypesToRuntimeTypes.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: backend/src/LibParser/Lexer.fs backend/src/LibParser/Lexer.fs:333 — backend/src/LibParser/Lexer.fs changed 6 times in last 90 days, max cyclomatic complexity 221 in Lexer.tokenize at line 333. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibParser/Lexer.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: backend/src/LibExecution/ProgramTypesToDarkTypes.fs backend/src/LibExecution/ProgramTypesToDarkTypes.fs:1069 — backend/src/LibExecution/ProgramTypesToDarkTypes.fs changed 22 times in last 90 days, max cyclomatic complexity 45 in Expr.fromDT at line 1069. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibExecution/ProgramTypesToDarkTypes.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: backend/src/Builtins/Builtins.Language/Libs/Parser.fs backend/src/Builtins/Builtins.Language/Libs/Parser.fs:497 — backend/src/Builtins/Builtins.Language/Libs/Parser.fs changed 23 times in last 90 days, max cyclomatic complexity 42 in WrittenTypesToDarkTypes.exprToDT at line 497. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Builtins/Builtins.Language/Libs/Parser.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: backend/src/Builtins/Builtins.Http.Server/Libs/HttpServer.fs backend/src/Builtins/Builtins.Http.Server/Libs/HttpServer.fs:489 — backend/src/Builtins/Builtins.Http.Server/Libs/HttpServer.fs changed 22 times in last 90 days, max cyclomatic complexity 39 in HttpServer.handleRequest at line 489. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/Builtins/Builtins.Http.Server/Libs/HttpServer.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: backend/src/LocalExec/LocalExec.fs backend/src/LocalExec/LocalExec.fs:222 — backend/src/LocalExec/LocalExec.fs changed 20 times in last 90 days, max cyclomatic complexity 39 in HandleCommand.reachability at line 222. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LocalExec/LocalExec.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: backend/src/LibExecution/FastOps.fs backend/src/LibExecution/FastOps.fs:304 — backend/src/LibExecution/FastOps.fs changed 7 times in last 90 days, max cyclomatic complexity 103 in FastOps.evalNumeric at line 304. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibExecution/FastOps.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: backend/src/LibExecution/Dval.fs backend/src/LibExecution/Dval.fs:380 — backend/src/LibExecution/Dval.fs changed 13 times in last 90 days, max cyclomatic complexity 55 in Dval.equals at line 380. 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-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 11:58:15 -07:00' --until='2026-10-19 11:58:15 -07:00' --full-history --no-merges -- backend/src/LibExecution/Dval.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.
  • + 68 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×35
  • FileTooLong: LibExecution/Interpreter.fs backend/src/LibExecution/Interpreter.fs — FileTooLong — 4105 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 108 functions. The bar is 500 significant lines; this is 3605 over it, 8.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: LibParser/Parser.fs backend/src/LibParser/Parser.fs — FileTooLong — 3198 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 105 functions. The bar is 500 significant lines; this is 2698 over it, 6.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: LibExecution/RuntimeTypes.fs backend/src/LibExecution/RuntimeTypes.fs — FileTooLong — 2407 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1907 over it, 4.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: LibExecution/ProgramTypesToDarkTypes.fs backend/src/LibExecution/ProgramTypesToDarkTypes.fs — FileTooLong — 1871 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1371 over it, 3.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: LibExecution/TypeChecker.fs backend/src/LibExecution/TypeChecker.fs — FileTooLong — 1646 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 34 functions. The bar is 500 significant lines; this is 1146 over it, 3.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: LibExecution/RuntimeTypesToDarkTypes.fs backend/src/LibExecution/RuntimeTypesToDarkTypes.fs — FileTooLong — 1600 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1100 over it, 3.20× 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: Libs/Cli.fs backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs — FileTooLong — 1386 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 886 over it, 2.77× 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: LibExecution/ProgramTypesToRuntimeTypes.fs backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs — FileTooLong — 1225 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 725 over it, 2.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Libs/Parser.fs backend/src/Builtins/Builtins.Language/Libs/Parser.fs — FileTooLong — 1203 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 41 functions. The bar is 500 significant lines; this is 703 over it, 2.41× 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: Host/Host.fs backend/src/LibExecution/Host/Host.fs — FileTooLong — 1200 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 72 functions. The bar is 500 significant lines; this is 700 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: PM/Packages.fs backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs — FileTooLong — 1074 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 574 over it, 2.15× 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: LibParser/WrittenTypesToProgramTypes.fs backend/src/LibParser/WrittenTypesToProgramTypes.fs — FileTooLong — 1031 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 531 over it, 2.06× 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: LibParser/Lexer.fs backend/src/LibParser/Lexer.fs — FileTooLong — 922 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 422 over it, 1.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Host/HostPosix.fs backend/src/LibExecution/Host/HostPosix.fs — FileTooLong — 893 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 77 functions. The bar is 500 significant lines; this is 393 over it, 1.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Libs/List.fs backend/src/Builtins/Builtins.Pure/Libs/List.fs — FileTooLong — 857 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 357 over it, 1.71× 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: LibDB/Tracing.fs backend/src/LibDB/Tracing.fs — FileTooLong — 836 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 336 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: PT/Expr.fs backend/src/LibSerialization/Binary/Serializers/PT/Expr.fs — FileTooLong — 799 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 299 over it, 1.60× 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: Libs/Traces.fs backend/src/Builtins/Builtins.Matter/Libs/Traces.fs — FileTooLong — 791 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 291 over it, 1.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: LibExecution/Scheduler.fs backend/src/LibExecution/Scheduler.fs — FileTooLong — 790 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 290 over it, 1.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: LibParser/WrittenTypes.fs backend/src/LibParser/WrittenTypes.fs — FileTooLong — 782 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 282 over it, 1.56× 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: Libs/HttpServer.fs backend/src/Builtins/Builtins.Http.Server/Libs/HttpServer.fs — FileTooLong — 781 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 281 over it, 1.56× 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: LibExecution/ProgramTypes.fs backend/src/LibExecution/ProgramTypes.fs — FileTooLong — 775 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 275 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: LibDB/PackageManager.fs backend/src/LibDB/PackageManager.fs — FileTooLong — 765 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 265 over it, 1.53× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: LibDB/PackageOpPlayback.fs backend/src/LibDB/PackageOpPlayback.fs — FileTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 254 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.
  • FileTooLong: Cli/Cli.fs backend/src/Cli/Cli.fs — FileTooLong — 724 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 224 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×13
  • Duplicated block (9 lines × 2) backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1539 — backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1539-1547 | backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1603-1611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs:261 — backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs:261-269 | backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:74-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:466 — backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:466-474 | backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:518-526 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:466` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Base64.fs:66 — backend/src/Builtins/Builtins.Pure/Libs/Base64.fs:66-74 | backend/src/Builtins/Builtins.Pure/Libs/Blob.fs:121-129 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Base64.fs:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) backend/src/LibExecution/ProgramTypesAst.fs:148 — backend/src/LibExecution/ProgramTypesAst.fs:148-156 | backend/src/LibExecution/ProgramTypesAst.fs:257-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs:248 — backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs:248-256 | backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs:321-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) backend/src/LibExecution/TypeChecker.fs:2073 — backend/src/LibExecution/TypeChecker.fs:2073-2081 | backend/src/LibExecution/TypeChecker.fs:2127-2135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) backend/src/LibParser/Parser.fs:999 — backend/src/LibParser/Parser.fs:999-1007 | backend/src/LibParser/Parser.fs:2411-2419 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) backend/src/LibParser/WrittenTypesToProgramTypes.fs:594 — backend/src/LibParser/WrittenTypesToProgramTypes.fs:594-602 | backend/src/LibParser/WrittenTypesToProgramTypes.fs:825-833 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) backend/src/LibSerialization/Binary/Serializers/PT/Expr.fs:421 — backend/src/LibSerialization/Binary/Serializers/PT/Expr.fs:421-429 | backend/src/LibSerialization/Binary/Serializers/PT/Expr.fs:810-818 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) backend/src/LibSerialization/Hashing/Canonical.fs:418 — backend/src/LibSerialization/Hashing/Canonical.fs:418-426 | backend/src/LibSerialization/Hashing/Canonical.fs:574-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/src/LibSerialization/Hashing/Canonical.fs:413` calls `w` and `backend/src/LibSerialization/Hashing/Canonical.fs:569` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) backend/src/LibExecution/PackageRefs.fs:584 — backend/src/LibExecution/PackageRefs.fs:584-595 | backend/src/LibExecution/PackageRefs.fs:619-627 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/src/LibExecution/PackageRefs.fs:627` calls `p` and `backend/src/LibExecution/PackageRefs.fs:595` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:500 — backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:500-508 | backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:526-534 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:500` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×12
  • Duplicated block (8 lines × 2) backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:74 — backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:74-81 | backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:95-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:74` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:373 — backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:373-380 | backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:411-418 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:373` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs:303 — backend/src/Builtins/Builtins.Pure/Libs/List.fs:303-310 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:559-566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs:723 — backend/src/Builtins/Builtins.Pure/Libs/List.fs:723-730 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:794-801 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/List.fs:723` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) backend/src/LibExecution/Host/Host.fs:414 — backend/src/LibExecution/Host/Host.fs:414-421 | backend/src/LibExecution/Host/Host.fs:424-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) backend/src/LibExecution/Interpreter.fs:384 — backend/src/LibExecution/Interpreter.fs:384-391 | backend/src/LibExecution/TypeChecker.fs:590-597 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) backend/src/LibExecution/TypeChecker.fs:1071 — backend/src/LibExecution/TypeChecker.fs:1071-1079 | backend/src/LibExecution/TypeChecker.fs:1094-1101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) backend/src/LibSerialization/Binary/Serializers/PT/PackageType.fs:64 — backend/src/LibSerialization/Binary/Serializers/PT/PackageType.fs:64-71 | backend/src/LibSerialization/Binary/Serializers/RT/PackageType.fs:46-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs:943 — backend/src/Builtins/Builtins.Pure/Libs/List.fs:943-951 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:963-970 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/List.fs:943` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) backend/src/LibParser/Parser.fs:3040 — backend/src/LibParser/Parser.fs:3040-3047 | backend/src/LibParser/Parser.fs:3236-3243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) backend/src/Builtins/Builtins.Language/Libs/Parser.fs:388 — backend/src/Builtins/Builtins.Language/Libs/Parser.fs:388-395 | backend/src/Builtins/Builtins.Language/Libs/Parser.fs:590-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Language/Libs/Parser.fs:388` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/DateTime.fs:399 — backend/src/Builtins/Builtins.Pure/Libs/DateTime.fs:399-406 | backend/src/Builtins/Builtins.Pure/Libs/DateTime.fs:504-511 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/DateTime.fs:399` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D31 · IaC & Container Security · Medium IaC · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×8
  • Duplicated block (11 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Float.fs:26 — backend/src/Builtins/Builtins.Pure/Libs/Float.fs:26-36 | backend/src/Builtins/Builtins.Pure/Libs/Float.fs:40-50 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Float.fs:26` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) backend/src/LibExecution/ProgramTypes.fs:167 — backend/src/LibExecution/ProgramTypes.fs:167-180 | backend/src/LibExecution/RuntimeTypes.fs:121-131 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibExecution/ProgramTypes.fs:167` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) backend/src/LibSerialization/Binary/Serializers/PT/Common.fs:77 — backend/src/LibSerialization/Binary/Serializers/PT/Common.fs:77-87 | backend/src/LibSerialization/Binary/Serializers/RT/Common.fs:23-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:403 — backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:403-414 | backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:423-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:403` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:456 — backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:456-466 | backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:477-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:456` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) backend/src/Builtins/Builtins.Cli/Libs/Posix.fs:170 — backend/src/Builtins/Builtins.Cli/Libs/Posix.fs:170-181 | backend/src/Builtins/Builtins.Cli/Libs/Posix.fs:381-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Cli/Libs/Posix.fs:170` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) backend/src/LibParser/Parser.fs:1269 — backend/src/LibParser/Parser.fs:1269-1279 | backend/src/LibParser/Parser.fs:2485-2495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Float.fs:108 — backend/src/Builtins/Builtins.Pure/Libs/Float.fs:108-118 | backend/src/Builtins/Builtins.Pure/Libs/Float.fs:263-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Float.fs:108` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×8
  • Duplicated block (10 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:889 — backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:889-898 | backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:941-950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:889` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:328 — backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:328-337 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:368-377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:328` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) backend/src/LibExecution/ProgramTypesAst.fs:163 — backend/src/LibExecution/ProgramTypesAst.fs:163-172 | backend/src/LibExecution/ProgramTypesAst.fs:275-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) backend/src/LibExecution/ProgramTypesToDarkTypes.fs:252 — backend/src/LibExecution/ProgramTypesToDarkTypes.fs:252-261 | backend/src/LibExecution/RuntimeTypesToDarkTypes.fs:208-217 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) backend/src/LibExecution/RuntimeTypes.fs:2213 — backend/src/LibExecution/RuntimeTypes.fs:2213-2222 | backend/src/LibExecution/RuntimeTypes.fs:2225-2234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs:382 — backend/src/Builtins/Builtins.Pure/Libs/List.fs:382-394 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:588-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/List.fs:382` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) backend/src/LibDB/Docs.fs:341 — backend/src/LibDB/Docs.fs:341-350 | backend/src/LibDB/Inserts.fs:60-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibDB/Docs.fs:341` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs:115 — backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs:115-124 | backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs:170-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs:115` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×7
  • Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:116 — backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:116-127 | backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:151-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:116` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) backend/src/LibExecution/Interpreter.fs:3718 — backend/src/LibExecution/Interpreter.fs:3718-3729 | backend/src/LibExecution/Interpreter.fs:3831-3842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) backend/src/LibExecution/TypeChecker.fs:1211 — backend/src/LibExecution/TypeChecker.fs:1211-1222 | backend/src/LibExecution/TypeChecker.fs:1274-1285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:276 — backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:276-287 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:309-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:276` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Math.fs:83 — backend/src/Builtins/Builtins.Pure/Libs/Math.fs:83-94 | backend/src/Builtins/Builtins.Pure/Libs/Math.fs:108-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Math.fs:83` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Dict.fs:269 — backend/src/Builtins/Builtins.Pure/Libs/Dict.fs:269-280 | backend/src/Builtins/Builtins.Pure/Libs/Dict.fs:298-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Dict.fs:269` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs:344 — backend/src/Builtins/Builtins.Pure/Libs/List.fs:344-355 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:531-542 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/List.fs:344` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×6
  • Duplicated block (6 lines × 2) backend/src/Builtins/Builtins.Language/Libs/Exec.fs:327 — backend/src/Builtins/Builtins.Language/Libs/Exec.fs:327-332 | backend/src/Builtins/Builtins.Language/Libs/Exec.fs:357-362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Language/Libs/Exec.fs:327` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) backend/src/Builtins/Builtins.Language/Libs/Instrumentation.fs:201 — backend/src/Builtins/Builtins.Language/Libs/Instrumentation.fs:201-206 | backend/src/Builtins/Builtins.Language/Libs/Instrumentation.fs:215-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) backend/src/LibParser/Parser.fs:3032 — backend/src/LibParser/Parser.fs:3032-3037 | backend/src/LibParser/Parser.fs:3229-3234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:106 — backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:106-111 | backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:125-130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) backend/src/LibExecution/Host/HostPosix.fs:409 — backend/src/LibExecution/Host/HostPosix.fs:409-414 | backend/src/LibExecution/Host/HostPosix.fs:922-927 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Int.fs:238 — backend/src/Builtins/Builtins.Pure/Libs/Int.fs:238-243 | backend/src/Builtins/Builtins.Pure/Libs/Int.fs:267-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int.fs:238` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D3 · God Classes · TooManyFunctions · ×5
  • TooManyFunctions: HostKernel backend/src/LibExecution/Host/HostKernel.fs:3 — TooManyFunctions — 59 functions. The bar is 30 functions; this is 29 over it, 1.97× 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: Prelude backend/src/Prelude/Prelude.fs:1 — TooManyFunctions — 50 functions. The bar is 30 functions; this is 20 over it, 1.67× 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: PolicyStore backend/src/LibDB/PolicyStore.fs:5 — 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: Dval backend/src/LibExecution/Dval.fs:2 — TooManyFunctions — 38 functions. The bar is 30 functions; this is 8 over it, 1.27× 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: Hashing backend/src/LibSerialization/Hashing/Hashing.fs:24 — TooManyFunctions — 33 functions. The bar is 30 functions; this is 3 over it, 1.10× 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Float.fs:5 — backend/src/Builtins/Builtins.Pure/Libs/Float.fs:5-18 | backend/src/Builtins/Builtins.Pure/Libs/Uuid.fs:5-17 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) backend/src/LibExecution/PackageRefs.fs:194 — backend/src/LibExecution/PackageRefs.fs:194-206 | backend/src/LibExecution/PackageRefs.fs:614-626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) backend/src/Builtins/Builtins.Cli/Libs/Output.fs:28 — backend/src/Builtins/Builtins.Cli/Libs/Output.fs:28-40 | backend/src/Builtins/Builtins.Cli/Libs/Output.fs:66-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Cli/Libs/Output.fs:28` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:30 — backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:30-42 | backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:57-69 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:30` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Int.fs:804 — backend/src/Builtins/Builtins.Pure/Libs/Int.fs:804-816 | backend/src/Builtins/Builtins.Pure/Libs/Int.fs:826-838 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int.fs:804` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×5
  • Duplicated block (5 lines × 2) backend/src/Builtins/Builtins.Random/Libs/Random.fs:25 — backend/src/Builtins/Builtins.Random/Libs/Random.fs:25-29 | backend/src/Builtins/Builtins.Random/Libs/Random.fs:47-51 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) backend/src/LibExecution/ProgramTypesToDarkTypes.fs:1371 — backend/src/LibExecution/ProgramTypesToDarkTypes.fs:1371-1375 | backend/src/LibExecution/ProgramTypesToDarkTypes.fs:1562-1566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) backend/src/LibParser/Package.fs:21 — backend/src/LibParser/Package.fs:21-25 | later/backend/src/Wasm/Repl.fs:112-116 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibParser/Package.fs:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) backend/src/Builtins/Builtins.Language/Libs/Exec.fs:430 — backend/src/Builtins/Builtins.Language/Libs/Exec.fs:430-434 | backend/src/Builtins/Builtins.Language/Libs/Exec.fs:451-455 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) backend/src/LibExecution/Dval.fs:171 — backend/src/LibExecution/Dval.fs:171-175 | backend/src/LibExecution/Pending.fs:73-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×4
  • Duplicated block (18 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/String.fs:666 — backend/src/Builtins/Builtins.Pure/Libs/String.fs:666-683 | backend/src/Builtins/Builtins.Pure/Libs/String.fs:745-762 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) backend/src/LibDB/PackageManager.fs:941 — backend/src/LibDB/PackageManager.fs:941-958 | backend/src/LibDB/PackageManager.fs:965-982 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibDB/PackageManager.fs:941` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 2) backend/src/LibExecution/Dval.fs:218 — backend/src/LibExecution/Dval.fs:218-235 | backend/src/LibExecution/Dval.fs:301-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) backend/src/LibParser/Package.fs:114 — backend/src/LibParser/Package.fs:114-131 | later/backend/src/Wasm/Repl.fs:213-230 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×4
  • Duplicated block (11 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:304 — backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:304-314 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:254-264 | backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:254-264 — before extracting anything, compare `backend/src/Builtins/Builtins.Pure/Libs/Int16.fs` and `backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:304` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/List.fs:291 — backend/src/Builtins/Builtins.Pure/Libs/List.fs:291-301 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:402-414 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:544-558 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/List.fs:291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:384 — backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:384-394 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:404-415 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:424-434 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:384` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:281 — backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:281-291 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:269-279 | backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:314-324 — before extracting anything, compare `backend/src/Builtins/Builtins.Pure/Libs/Int16.fs` and `backend/src/Builtins/Builtins.Pure/Libs/Int32.fs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:281` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×4
  • Duplicated block (7–8 lines × 2) backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:579 — backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:579-586 | later/backend/src/Wasm/Host.fs:297-303 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:579` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:433 — backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:433-440 | backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:485-491 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:433` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) backend/src/LibExecution/Host/HostDescriptors.fs:84 — backend/src/LibExecution/Host/HostDescriptors.fs:84-91 | backend/src/LibExecution/Host/HostDescriptors.fs:112-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–8 lines × 2) backend/src/LibSerialization/Binary/Serializers/RT/Common.fs:112 — backend/src/LibSerialization/Binary/Serializers/RT/Common.fs:112-119 | backend/src/LibSerialization/Binary/Serializers/RT/Dval.fs:332-338 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) backend/src/LibDB/Branches.fs:36 — backend/src/LibDB/Branches.fs:36-54 | backend/src/LibDB/Branches.fs:56-69 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14 lines × 2) backend/src/Builtins/Builtins.Language/Libs/Exec.fs:308 — backend/src/Builtins/Builtins.Language/Libs/Exec.fs:308-321 | backend/src/Builtins/Builtins.Language/Libs/Exec.fs:338-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Language/Libs/Exec.fs:308` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:88 — backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:88-101 | backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:124-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:88` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:862 — backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:862-875 | backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:915-928 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:862` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:930` calls `TList`, `TTuple`, `TCustomType` and `backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:876` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×4
  • Duplicated block (12 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:282 — backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:282-293 | backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:315-326 | backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:348-359 | backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:381-392 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:282` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:294 — backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:294-305 | backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:332-343 | backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:370-381 | backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:408-419 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:294` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:326 — backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:326-337 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:364-375 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:440-451 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:478-489 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:326` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:345 — backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:345-356 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:383-394 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:421-432 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:459-470 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:345` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×3
  • Duplicated block (19 lines × 2) backend/src/Builtins/Builtins.Language/Libs/Parser.fs:1008 — backend/src/Builtins/Builtins.Language/Libs/Parser.fs:1008-1026 | backend/src/Builtins/Builtins.Language/Libs/Parser.fs:1036-1054 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Language/Libs/Parser.fs:1008` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs:439 — backend/src/Builtins/Builtins.Pure/Libs/List.fs:439-457 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:573-591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/List.fs:439` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) backend/src/LibExecution/PackageRefs.fs:377 — backend/src/LibExecution/PackageRefs.fs:377-395 | backend/src/LibExecution/PackageRefs.fs:458-476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×3
  • Duplicated block (11 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:367 — backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:367-378 | backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:388-398 | backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:409-420 | backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:430-440 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:367` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:384 — backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:384-394 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:404-415 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:424-434 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:445-456 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:384` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:283 — backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:283-293 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:231-241 | backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:231-241 | backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:232-242 — before extracting anything, compare `backend/src/Builtins/Builtins.Pure/Libs/Int8.fs` and `backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:283` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×2
  • Focus outline removed in CSS without a :focus replacement later/backend/src/Wasm/wwwroot/repl.html:33 — `#input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement later/backend/src/Wasm/wwwroot/site.css:23 — `input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×2
  • Animation without a prefers-reduced-motion guard later/vscode-extension/client/src/panels/homepage/styles/homepageStyles.css:25 — `.sidebar` moves (`transition: width 0.3s ease, padding 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard later/vscode-extension/client/src/panels/homepage/styles/homepageStyles.css:73 — `.toggle-btn svg` moves (`transition: transform 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D3 · God Classes · MethodTooLong · ×2
  • MethodTooLong: BranchManagerPanel._getHtml later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts:200 — MethodTooLong — _getHtml runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BranchCommands.register later/vscode-extension/client/src/commands/branchCommands.ts:15 — MethodTooLong — register runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D30 · Dependency Vulnerabilities · Medium CVE · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×2
  • Duplicated block (24 lines × 2) backend/src/LibExecution/ProgramTypesAst.fs:118 — backend/src/LibExecution/ProgramTypesAst.fs:118-141 | backend/src/LibExecution/ProgramTypesAst.fs:227-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (24 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:396 — backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:396-421 | backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:450-473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:396` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) backend/src/Builtins/Builtins.Cli/Libs/Directory.fs:4 — backend/src/Builtins/Builtins.Cli/Libs/Directory.fs:4-18 | backend/src/Builtins/Builtins.Cli/Libs/Environment.fs:4-19 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15–16 lines × 2) backend/src/LibExecution/ProgramTypes.fs:86 — backend/src/LibExecution/ProgramTypes.fs:86-101 | backend/src/LibExecution/RuntimeTypes.fs:74-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Float.fs:54 — backend/src/Builtins/Builtins.Pure/Libs/Float.fs:54-67 | backend/src/Builtins/Builtins.Pure/Libs/Float.fs:71-85 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Float.fs:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) backend/src/LibParser/Validation.fs:112 — backend/src/LibParser/Validation.fs:112-126 | backend/src/LibParser/Validation.fs:194-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) backend/src/LibExecution/Interpreter.fs:3724 — backend/src/LibExecution/Interpreter.fs:3724-3734 | backend/src/LibExecution/Interpreter.fs:3868-3877 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibExecution/Interpreter.fs:3724` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10–11 lines × 2) backend/src/LibParser/Lexer.fs:283 — backend/src/LibParser/Lexer.fs:283-293 | backend/src/LibParser/Lexer.fs:307-316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×2
  • Duplicated block (7 lines × 2) backend/src/LibDB/Impls.fs:52 — backend/src/LibDB/Impls.fs:52-58 | backend/src/LibDB/Impls.fs:61-67 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) backend/src/LibParser/Parser.fs:1678 — backend/src/LibParser/Parser.fs:1678-1684 | backend/src/LibParser/Parser.fs:2390-2396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) REDACTED:69 — REDACTED:69-88 | REDACTED:102-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/String.fs:687 — backend/src/Builtins/Builtins.Pure/Libs/String.fs:687-703 | backend/src/Builtins/Builtins.Pure/Libs/String.fs:712-728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/String.fs:687` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:287 — backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:287-298 | backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:377-389 | backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:858-867 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:287` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/List.fs:589 — backend/src/Builtins/Builtins.Pure/Libs/List.fs:589-598 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:693-703 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:762-772 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/List.fs:589` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×2
  • Duplicated block (11 lines × 6) backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:330 — backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:330-341 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:350-360 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:370-381 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:390-400 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:411-422 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:431-441 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:330` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 6) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:355 — backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:355-365 | backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:374-384 | backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:393-403 | backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:412-422 | backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:431-441 | backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:452-463 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:355` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:313 — backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:313-324 | backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:389-400 | backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:427-438 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:313` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:277 — backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:277-288 | backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:311-322 | backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:345-356 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:277` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 4 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · NoModule.fns (cyclomatic 270) · ×1
  • NoModule.fns (cyclomatic 270) backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:116 — NoModule.fns has cyclomatic complexity 270 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Lexer.tokenize (cyclomatic 221) · ×1
  • Lexer.tokenize (cyclomatic 221) backend/src/LibParser/Lexer.fs:333 — Lexer.tokenize has cyclomatic complexity 221 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Interpreter.runSyncInstructions (cyclomatic 134) · ×1
  • Interpreter.runSyncInstructions (cyclomatic 134) backend/src/LibExecution/Interpreter.fs:4374 — Interpreter.runSyncInstructions has cyclomatic complexity 134 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · List.fns (cyclomatic 126) · ×1
  • List.fns (cyclomatic 126) backend/src/Builtins/Builtins.Pure/Libs/List.fs:197 — List.fns has cyclomatic complexity 126 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Json.parse (cyclomatic 113) · ×1
  • Json.parse (cyclomatic 113) backend/src/Builtins/Builtins.Pure/Libs/Json.fs:279 — Json.parse has cyclomatic complexity 113 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FastOps.evalNumeric (cyclomatic 103) · ×1
  • FastOps.evalNumeric (cyclomatic 103) backend/src/LibExecution/FastOps.fs:304 — FastOps.evalNumeric has cyclomatic complexity 103 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Main.runCli (cyclomatic 98) · ×1
  • Main.runCli (cyclomatic 98) backend/src/Cli/Cli.fs:411 — Main.runCli has cyclomatic complexity 98 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Interpreter.applyInstructionForced (cyclomatic 97) · ×1
  • Interpreter.applyInstructionForced (cyclomatic 97) backend/src/LibExecution/Interpreter.fs:3520 — Interpreter.applyInstructionForced has cyclomatic complexity 97 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Expr.toPT (cyclomatic 94) · ×1
  • Expr.toPT (cyclomatic 94) backend/src/LibParser/WrittenTypesToProgramTypes.fs:360 — Expr.toPT has cyclomatic complexity 94 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Expr.toRT (cyclomatic 86) · ×1
  • Expr.toRT (cyclomatic 86) backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs:547 — Expr.toRT has cyclomatic complexity 86 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Parser.parsePrimary (cyclomatic 75) · ×1
  • Parser.parsePrimary (cyclomatic 75) backend/src/LibParser/Parser.fs:2065 — Parser.parsePrimary has cyclomatic complexity 75 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Host.resolvePosix (cyclomatic 72) · ×1
  • Host.resolvePosix (cyclomatic 72) backend/src/LibExecution/Host/Host.fs:566 — Host.resolvePosix has cyclomatic complexity 72 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · String.fns (cyclomatic 71) · ×1
  • String.fns (cyclomatic 71) backend/src/Builtins/Builtins.Pure/Libs/String.fs:84 — String.fns has cyclomatic complexity 71 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PackageManager.createInMemoryOver (cyclomatic 69) · ×1
  • PackageManager.createInMemoryOver (cyclomatic 69) backend/src/LibDB/PackageManager.fs:274 — PackageManager.createInMemoryOver has cyclomatic complexity 69 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Cli.fns (cyclomatic 68) · ×1
  • Cli.fns (cyclomatic 68) backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1005 — Cli.fns has cyclomatic complexity 68 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Host.performWithSession (cyclomatic 66) · ×1
  • Host.performWithSession (cyclomatic 66) backend/src/LibExecution/Host/Host.fs:1263 — Host.performWithSession has cyclomatic complexity 66 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Int.fns (cyclomatic 62) · ×1
  • Int.fns (cyclomatic 62) backend/src/Builtins/Builtins.Pure/Libs/Int.fs:73 — Int.fns has cyclomatic complexity 62 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Parser.parsePatternBaseInner (cyclomatic 60) · ×1
  • Parser.parsePatternBaseInner (cyclomatic 60) backend/src/LibParser/Parser.fs:1164 — Parser.parsePatternBaseInner has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Packages.fns (cyclomatic 58) · ×1
  • Packages.fns (cyclomatic 58) backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:255 — Packages.fns has cyclomatic complexity 58 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TypeChecker.unifyValueType (cyclomatic 57) · ×1
  • TypeChecker.unifyValueType (cyclomatic 57) backend/src/LibExecution/TypeChecker.fs:270 — TypeChecker.unifyValueType has cyclomatic complexity 57 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Dval.equals (cyclomatic 55) · ×1
  • Dval.equals (cyclomatic 55) backend/src/LibExecution/Dval.fs:380 — Dval.equals has cyclomatic complexity 55 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Int8.fns (cyclomatic 55) · ×1
  • Int8.fns (cyclomatic 55) backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:29 — Int8.fns has cyclomatic complexity 55 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DependencyExtractor.extract (cyclomatic 52) · ×1
  • DependencyExtractor.extract (cyclomatic 52) backend/src/LibDB/DependencyExtractor.fs:46 — DependencyExtractor.extract has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Int16.fns (cyclomatic 52) · ×1
  • Int16.fns (cyclomatic 52) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:29 — Int16.fns has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MatchPattern.toRT (cyclomatic 51) · ×1
  • MatchPattern.toRT (cyclomatic 51) backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs:275 — MatchPattern.toRT has cyclomatic complexity 51 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Int32.fns (cyclomatic 51) · ×1
  • Int32.fns (cyclomatic 51) backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:29 — Int32.fns has cyclomatic complexity 51 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TraitCalls.resolveIn (cyclomatic 51) · ×1
  • TraitCalls.resolveIn (cyclomatic 51) backend/src/Builtins/Builtins.Matter/Libs/PM/TraitCalls.fs:335 — TraitCalls.resolveIn has cyclomatic complexity 51 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Interpreter.checkAndExtractMatchPattern (cyclomatic 49) · ×1
  • Interpreter.checkAndExtractMatchPattern (cyclomatic 49) backend/src/LibExecution/Interpreter.fs:509 — Interpreter.checkAndExtractMatchPattern has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Int64.fns (cyclomatic 48) · ×1
  • Int64.fns (cyclomatic 48) backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:30 — Int64.fns has cyclomatic complexity 48 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UInt8.fns (cyclomatic 48) · ×1
  • UInt8.fns (cyclomatic 48) backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:30 — UInt8.fns has cyclomatic complexity 48 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Traces.fns (cyclomatic 48) · ×1
  • Traces.fns (cyclomatic 48) backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:225 — Traces.fns has cyclomatic complexity 48 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PackageOps.fns (cyclomatic 47) · ×1
  • PackageOps.fns (cyclomatic 47) backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs:96 — PackageOps.fns has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TypeChecker.tryUnifySync (cyclomatic 46) · ×1
  • TypeChecker.tryUnifySync (cyclomatic 46) backend/src/LibExecution/TypeChecker.fs:633 — TypeChecker.tryUnifySync has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UInt16.fns (cyclomatic 46) · ×1
  • UInt16.fns (cyclomatic 46) backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:30 — UInt16.fns has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Expr.fromDT (cyclomatic 45) · ×1
  • Expr.fromDT (cyclomatic 45) backend/src/LibExecution/ProgramTypesToDarkTypes.fs:1069 — Expr.fromDT has cyclomatic complexity 45 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Parser.parseInterpString (cyclomatic 45) · ×1
  • Parser.parseInterpString (cyclomatic 45) backend/src/LibParser/Parser.fs:1888 — Parser.parseInterpString has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UInt32.fns (cyclomatic 44) · ×1
  • UInt32.fns (cyclomatic 44) backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:30 — UInt32.fns has cyclomatic complexity 44 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PackageValue.evalConstantExpr (cyclomatic 42) · ×1
  • PackageValue.evalConstantExpr (cyclomatic 42) backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs:1396 — PackageValue.evalConstantExpr has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TypeChecker.unifiesTrivially (cyclomatic 42) · ×1
  • TypeChecker.unifiesTrivially (cyclomatic 42) backend/src/LibExecution/TypeChecker.fs:27 — TypeChecker.unifiesTrivially has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Int128.fns (cyclomatic 42) · ×1
  • Int128.fns (cyclomatic 42) backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:29 — Int128.fns has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UInt64.fns (cyclomatic 42) · ×1
  • UInt64.fns (cyclomatic 42) backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:29 — UInt64.fns has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WrittenTypesToDarkTypes.exprToDT (cyclomatic 42) · ×1
  • WrittenTypesToDarkTypes.exprToDT (cyclomatic 42) backend/src/Builtins/Builtins.Language/Libs/Parser.fs:497 — WrittenTypesToDarkTypes.exprToDT has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Interpreter.executeSync (cyclomatic 39) · ×1
  • Interpreter.executeSync (cyclomatic 39) backend/src/LibExecution/Interpreter.fs:5641 — Interpreter.executeSync has cyclomatic complexity 39 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HttpServer.handleRequest (cyclomatic 39) · ×1
  • HttpServer.handleRequest (cyclomatic 39) backend/src/Builtins/Builtins.Http.Server/Libs/HttpServer.fs:489 — HttpServer.handleRequest has cyclomatic complexity 39 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HandleCommand.reachability (cyclomatic 39) · ×1
  • HandleCommand.reachability (cyclomatic 39) backend/src/LocalExec/LocalExec.fs:222 — HandleCommand.reachability has cyclomatic complexity 39 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DvalModule.toValueType (cyclomatic 37) · ×1
  • DvalModule.toValueType (cyclomatic 37) backend/src/LibExecution/RuntimeTypes.fs:2161 — DvalModule.toValueType has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Host.resolveSessionPosix (cyclomatic 37) · ×1
  • Host.resolveSessionPosix (cyclomatic 37) backend/src/LibExecution/Host/Host.fs:1141 — Host.resolveSessionPosix has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DvalModule.rewriteWith (cyclomatic 35) · ×1
  • DvalModule.rewriteWith (cyclomatic 35) backend/src/LibExecution/RuntimeTypes.fs:2322 — DvalModule.rewriteWith has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Exec.fns (cyclomatic 35) · ×1
  • Exec.fns (cyclomatic 35) backend/src/Builtins/Builtins.Language/Libs/Exec.fs:231 — Exec.fns has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Interpreter.invokeBuiltin (cyclomatic 34) · ×1
  • Interpreter.invokeBuiltin (cyclomatic 34) backend/src/LibExecution/Interpreter.fs:1391 — Interpreter.invokeBuiltin has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Cli.executeWith (cyclomatic 34) · ×1
  • Cli.executeWith (cyclomatic 34) backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:678 — Cli.executeWith has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ValueType.mergeKnownTypes (cyclomatic 33) · ×1
  • ValueType.mergeKnownTypes (cyclomatic 33) backend/src/LibExecution/ValueType.fs:54 — ValueType.mergeKnownTypes has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DvalOrdering.compare (cyclomatic 33) · ×1
  • DvalOrdering.compare (cyclomatic 33) backend/src/LibExecution/RuntimeTypes.fs:1061 — DvalOrdering.compare has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ProgramTypes.search (cyclomatic 32) · ×1
  • ProgramTypes.search (cyclomatic 32) REDACTED:238 — ProgramTypes.search has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Validation.exprIssues (cyclomatic 32) · ×1
  • Validation.exprIssues (cyclomatic 32) backend/src/LibParser/Validation.fs:213 — Validation.exprIssues has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Interpreter.beginRequest (cyclomatic 31) · ×1
  • Interpreter.beginRequest (cyclomatic 31) backend/src/LibExecution/Interpreter.fs:3267 — Interpreter.beginRequest has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Stream.fns (cyclomatic 31) · ×1
  • Stream.fns (cyclomatic 31) backend/src/Builtins/Builtins.Pure/Libs/Stream.fs:109 — Stream.fns has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WrittenTypesToDarkTypes.matchPatternToDT (cyclomatic 31) · ×1
  • WrittenTypesToDarkTypes.matchPatternToDT (cyclomatic 31) backend/src/Builtins/Builtins.Language/Libs/Parser.fs:292 — WrittenTypesToDarkTypes.matchPatternToDT has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Parser.parseItemsBody (cyclomatic 31) · ×1
  • Parser.parseItemsBody (cyclomatic 31) backend/src/LibParser/Parser.fs:3538 — Parser.parseItemsBody has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Scheduler.Subscribe (cyclomatic 30) · ×1
  • Scheduler.Subscribe (cyclomatic 30) backend/src/LibExecution/Scheduler.fs:500 — Scheduler.Subscribe has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HashStabilization.computeRealHashes (cyclomatic 30) · ×1
  • HashStabilization.computeRealHashes (cyclomatic 30) backend/src/LibDB/HashStabilization.fs:239 — HashStabilization.computeRealHashes has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DateTime.fns (cyclomatic 30) · ×1
  • DateTime.fns (cyclomatic 30) backend/src/Builtins/Builtins.Pure/Libs/DateTime.fs:45 — DateTime.fns has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UInt128.fns (cyclomatic 30) · ×1
  • UInt128.fns (cyclomatic 30) backend/src/Builtins/Builtins.Pure/Libs/UInt128.fs:30 — UInt128.fns has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Json.serialize (cyclomatic 29) · ×1
  • Json.serialize (cyclomatic 29) backend/src/Builtins/Builtins.Pure/Libs/Json.fs:88 — Json.serialize has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Instrumentation.fns (cyclomatic 29) · ×1
  • Instrumentation.fns (cyclomatic 29) backend/src/Builtins/Builtins.Language/Libs/Instrumentation.fs:30 — Instrumentation.fns has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BranchCommands.register (cyclomatic 29) · ×1
  • BranchCommands.register (cyclomatic 29) later/vscode-extension/client/src/commands/branchCommands.ts:15 — BranchCommands.register has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 122, 87, 144, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PackageCommands.register (cyclomatic 29) · ×1
  • PackageCommands.register (cyclomatic 29) later/vscode-extension/client/src/commands/packageCommands.ts:100 — PackageCommands.register has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 142, 102, 126, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · BranchManagerPanel.constructor (cyclomatic 29) · ×1
  • BranchManagerPanel.constructor (cyclomatic 29) later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts:49 — BranchManagerPanel.constructor has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to one function literal inside it that branches (line 57). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Interpreter.resolveTraitMethod (cyclomatic 28) · ×1
  • Interpreter.resolveTraitMethod (cyclomatic 28) backend/src/LibExecution/Interpreter.fs:2979 — Interpreter.resolveTraitMethod has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Lexer.findInterpExprClose (cyclomatic 28) · ×1
  • Lexer.findInterpExprClose (cyclomatic 28) backend/src/LibParser/Lexer.fs:210 — Lexer.findInterpExprClose has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HostProcess.runInWorkspace (cyclomatic 27) · ×1
  • HostProcess.runInWorkspace (cyclomatic 27) backend/src/LibExecution/Host/HostProcess.fs:282 — HostProcess.runInWorkspace has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · TypeChecker.unifyValueTypeSync (cyclomatic 26) · ×1
  • TypeChecker.unifyValueTypeSync (cyclomatic 26) backend/src/LibExecution/TypeChecker.fs:145 — TypeChecker.unifyValueTypeSync has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Float.fns (cyclomatic 26) · ×1
  • Float.fns (cyclomatic 26) backend/src/Builtins/Builtins.Pure/Libs/Float.fs:24 — Float.fns has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Lexer.decodeEscape (cyclomatic 26) · ×1
  • Lexer.decodeEscape (cyclomatic 26) backend/src/LibParser/Lexer.fs:38 — Lexer.decodeEscape has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Posix.fns (cyclomatic 26) · ×1
  • Posix.fns (cyclomatic 26) backend/src/Builtins/Builtins.Cli/Libs/Posix.fs:107 — Posix.fns has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PackagesTreeDataProvider.getChildren (cyclomatic 26) · ×1
  • PackagesTreeDataProvider.getChildren (cyclomatic 26) REDACTED:257 — PackagesTreeDataProvider.getChildren has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 300). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Main.execute (cyclomatic 25) · ×1
  • Main.execute (cyclomatic 25) backend/src/Cli/Cli.fs:175 — Main.execute has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Interpreter.callPackageViaFrame (cyclomatic 25) · ×1
  • Interpreter.callPackageViaFrame (cyclomatic 25) backend/src/LibExecution/Interpreter.fs:2501 — Interpreter.callPackageViaFrame has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Host.resolve (cyclomatic 25) · ×1
  • Host.resolve (cyclomatic 25) backend/src/LibExecution/Host/Host.fs:830 — Host.resolve has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Stdin.readKeyOrPaste (cyclomatic 25) · ×1
  • Stdin.readKeyOrPaste (cyclomatic 25) backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:85 — Stdin.readKeyOrPaste has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Stdin.keyReadToDval (cyclomatic 150) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Stream.pull (cyclomatic 24) · ×1
  • Stream.pull (cyclomatic 24) backend/src/LibExecution/Stream.fs:165 — Stream.pull has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Parser.parseTypeParamsWith (cyclomatic 24) · ×1
  • Parser.parseTypeParamsWith (cyclomatic 24) backend/src/LibParser/Parser.fs:630 — Parser.parseTypeParamsWith has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Parser.parseAtomType (cyclomatic 24) · ×1
  • Parser.parseAtomType (cyclomatic 24) backend/src/LibParser/Parser.fs:2783 — Parser.parseAtomType has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Syscall.fns (cyclomatic 24) · ×1
  • Syscall.fns (cyclomatic 24) backend/src/Builtins/Builtins.Cli/Libs/Syscall.fs:101 — Syscall.fns has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Scheduler.Step (cyclomatic 23) · ×1
  • Scheduler.Step (cyclomatic 23) backend/src/LibExecution/Scheduler.fs:799 — Scheduler.Step has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Interpreter.completePackage (cyclomatic 22) · ×1
  • Interpreter.completePackage (cyclomatic 22) backend/src/LibExecution/Interpreter.fs:2298 — Interpreter.completePackage has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DvalCreator.checkRecordFields (cyclomatic 22) · ×1
  • DvalCreator.checkRecordFields (cyclomatic 22) backend/src/LibExecution/TypeChecker.fs:1625 — DvalCreator.checkRecordFields has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PackageOp.write (cyclomatic 22) · ×1
  • PackageOp.write (cyclomatic 22) backend/src/LibSerialization/Binary/Serializers/PT/PackageOp.fs:166 — PackageOp.write 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. This shape REPEATS in the file: one other method here (PackageOp.read) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · PackageOp.read (cyclomatic 22) · ×1
  • PackageOp.read (cyclomatic 22) backend/src/LibSerialization/Binary/Serializers/PT/PackageOp.fs:250 — PackageOp.read 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. This shape REPEATS in the file: one other method here (PackageOp.write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Char.fns (cyclomatic 22) · ×1
  • Char.fns (cyclomatic 22) backend/src/Builtins/Builtins.Pure/Libs/Char.fs:31 — Char.fns has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Permissions.fns (cyclomatic 22) · ×1
  • Permissions.fns (cyclomatic 22) backend/src/Builtins/Builtins.Matter/Libs/PM/Permissions.fs:87 — Permissions.fns has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · cli.html.shell.onData() (cyclomatic 22) · ×1
  • cli.html.shell.onData() (cyclomatic 22) later/backend/src/Wasm/wwwroot/cli.html:144 — cli.html.shell.onData() has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Scheduler.Dispatch (cyclomatic 21) · ×1
  • Scheduler.Dispatch (cyclomatic 21) backend/src/LibExecution/Scheduler.fs:616 — Scheduler.Dispatch has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DvalCreator.updateRecordFields (cyclomatic 21) · ×1
  • DvalCreator.updateRecordFields (cyclomatic 21) backend/src/LibExecution/TypeChecker.fs:1755 — DvalCreator.updateRecordFields has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Traits.argsAgree (cyclomatic 21) · ×1
  • Traits.argsAgree (cyclomatic 21) backend/src/LibExecution/Traits.fs:100 — Traits.argsAgree 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. This is NOT this file's highest cyclomatic complexity: Traits.headOfKnownType (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Package.packageItem (cyclomatic 21) · ×1
  • Package.packageItem (cyclomatic 21) backend/src/LibParser/Package.fs:160 — Package.packageItem has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RuntimeChild.fns (cyclomatic 21) · ×1
  • RuntimeChild.fns (cyclomatic 21) backend/src/Builtins/Builtins.Cli/Libs/RuntimeChild.fs:39 — RuntimeChild.fns has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Random.fns (cyclomatic 21) · ×1
  • Random.fns (cyclomatic 21) backend/src/Builtins/Builtins.Random/Libs/Random.fs:14 — Random.fns has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScmCommands.register (cyclomatic 21) · ×1
  • ScmCommands.register (cyclomatic 21) later/vscode-extension/client/src/commands/scmCommands.ts:14 — ScmCommands.register has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 20, 61, 100, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PackageRefsGenerator.generate (cyclomatic 20) · ×1
  • PackageRefsGenerator.generate (cyclomatic 20) backend/src/LibDB/PackageRefsGenerator.fs:79 — PackageRefsGenerator.generate has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Blob.fns (cyclomatic 20) · ×1
  • Blob.fns (cyclomatic 20) backend/src/Builtins/Builtins.Pure/Libs/Blob.fs:17 — Blob.fns has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TerminalText.wrapAtColumn (cyclomatic 20) · ×1
  • TerminalText.wrapAtColumn (cyclomatic 20) backend/src/Builtins/Builtins.Cli/Libs/TerminalText.fs:143 — TerminalText.wrapAtColumn has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EmbeddedResources.extract (cyclomatic 19) · ×1
  • EmbeddedResources.extract (cyclomatic 19) backend/src/Cli/EmbeddedResources.fs:428 — EmbeddedResources.extract has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Interpreter.tryBuildSync (cyclomatic 19) · ×1
  • Interpreter.tryBuildSync (cyclomatic 19) backend/src/LibExecution/Interpreter.fs:4236 — Interpreter.tryBuildSync has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HostPosix.listDir (cyclomatic 19) · ×1
  • HostPosix.listDir (cyclomatic 19) backend/src/LibExecution/Host/HostPosix.fs:939 — HostPosix.listDir has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Tracing.createViewTracer (cyclomatic 19) · ×1
  • Tracing.createViewTracer (cyclomatic 19) backend/src/LibDB/Tracing.fs:1210 — Tracing.createViewTracer has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Propagation.fetchAffected (cyclomatic 19) · ×1
  • Propagation.fetchAffected (cyclomatic 19) backend/src/LibDB/Propagation.fs:260 — Propagation.fetchAffected has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Parser.parseParen (cyclomatic 19) · ×1
  • Parser.parseParen (cyclomatic 19) backend/src/LibParser/Parser.fs:2373 — Parser.parseParen has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Parser.infixOf (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Spread.ofLambdaBody (cyclomatic 18) · ×1
  • Spread.ofLambdaBody (cyclomatic 18) backend/src/LibExecution/Spread.fs:425 — Spread.ofLambdaBody has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Spread.spreadChunks (cyclomatic 18) · ×1
  • Spread.spreadChunks (cyclomatic 18) backend/src/LibExecution/Spread.fs:536 — Spread.spreadChunks has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Requirements.forExpressionWith (cyclomatic 18) · ×1
  • Requirements.forExpressionWith (cyclomatic 18) backend/src/LibExecution/CallGraph.fs:268 — Requirements.forExpressionWith has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Interpreter.runRareOpcode (cyclomatic 18) · ×1
  • Interpreter.runRareOpcode (cyclomatic 18) backend/src/LibExecution/Interpreter.fs:5282 — Interpreter.runRareOpcode has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Validation.declarationStructureIssues (cyclomatic 18) · ×1
  • Validation.declarationStructureIssues (cyclomatic 18) backend/src/LibParser/Validation.fs:328 — Validation.declarationStructureIssues has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Stdin.fns (cyclomatic 18) · ×1
  • Stdin.fns (cyclomatic 18) backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:578 — Stdin.fns 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: Stdin.keyReadToDval (cyclomatic 150) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TraitCalls.resolveTraitCalls (cyclomatic 18) · ×1
  • TraitCalls.resolveTraitCalls (cyclomatic 18) backend/src/Builtins/Builtins.Matter/Libs/PM/TraitCalls.fs:599 — TraitCalls.resolveTraitCalls has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Scheduler.Run (cyclomatic 17) · ×1
  • Scheduler.Run (cyclomatic 17) backend/src/LibExecution/Scheduler.fs:895 — Scheduler.Run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Interpreter.tryFastOp (cyclomatic 17) · ×1
  • Interpreter.tryFastOp (cyclomatic 17) backend/src/LibExecution/Interpreter.fs:1650 — Interpreter.tryFastOp has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TypeChecker.resolveType (cyclomatic 17) · ×1
  • TypeChecker.resolveType (cyclomatic 17) backend/src/LibExecution/TypeChecker.fs:502 — TypeChecker.resolveType has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Dict.fns (cyclomatic 17) · ×1
  • Dict.fns (cyclomatic 17) backend/src/Builtins/Builtins.Pure/Libs/Dict.fs:70 — Dict.fns has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Regex.fns (cyclomatic 17) · ×1
  • Regex.fns (cyclomatic 17) backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:13 — Regex.fns has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Parser.parseMatch (cyclomatic 17) · ×1
  • Parser.parseMatch (cyclomatic 17) backend/src/LibParser/Parser.fs:991 — Parser.parseMatch has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Parser.infixOf (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Scheduler.Describe (cyclomatic 16) · ×1
  • Scheduler.Describe (cyclomatic 16) backend/src/LibExecution/Scheduler.fs:763 — Scheduler.Describe has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · AccessModule.findEffectiveDenial (cyclomatic 16) · ×1
  • AccessModule.findEffectiveDenial (cyclomatic 16) backend/src/LibExecution/Permissions.fs:617 — AccessModule.findEffectiveDenial 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: RequestModule.effect (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PackagePermissions.reviewVersion (cyclomatic 16) · ×1
  • PackagePermissions.reviewVersion (cyclomatic 16) backend/src/LibDB/PackagePermissions.fs:349 — PackagePermissions.reviewVersion has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Propagation.resolveCurrentHash (cyclomatic 16) · ×1
  • Propagation.resolveCurrentHash (cyclomatic 16) backend/src/LibDB/Propagation.fs:201 — Propagation.resolveCurrentHash has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WipRefresh.compactWipOps (cyclomatic 16) · ×1
  • WipRefresh.compactWipOps (cyclomatic 16) backend/src/LibDB/WipRefresh.fs:28 — WipRefresh.compactWipOps has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Expr.pipeExprToPT (cyclomatic 16) · ×1
  • Expr.pipeExprToPT (cyclomatic 16) backend/src/LibParser/WrittenTypesToProgramTypes.fs:782 — Expr.pipeExprToPT 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: MatchPattern.toPT (cyclomatic 29) 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.
D2 · Cognitive Complexity · Interpreter.runSyncInstructions (cognitive 314) · ×1
  • Interpreter.runSyncInstructions (cognitive 314) backend/src/LibExecution/Interpreter.fs:4374 — Interpreter.runSyncInstructions has cognitive complexity 314 (threshold 15). Drivers by points: match/switch 33 (148 pts), if/else 46 (139 pts), loops 4 (16 pts), boolean chains 11 (nesting depth added 220). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Lexer.tokenize (cognitive 287) · ×1
  • Lexer.tokenize (cognitive 287) backend/src/LibParser/Lexer.fs:333 — Lexer.tokenize has cognitive complexity 287 (threshold 15). Drivers by points: if/else 84 (130 pts), match/switch 26 (67 pts), boolean chains 53, loops 10 (37 pts) (nesting depth added 114). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Interpreter.applyInstructionForced (cognitive 281) · ×1
  • Interpreter.applyInstructionForced (cognitive 281) backend/src/LibExecution/Interpreter.fs:3520 — Interpreter.applyInstructionForced has cognitive complexity 281 (threshold 15). Drivers by points: if/else 48 (146 pts), match/switch 30 (131 pts), boolean chains 4 (nesting depth added 199). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · List.fns (cognitive 214) · ×1
  • List.fns (cognitive 214) backend/src/Builtins/Builtins.Pure/Libs/List.fs:197 — List.fns has cognitive complexity 214 (threshold 15). Drivers by points: match/switch 68 (149 pts), if/else 21 (48 pts), loops 4 (11 pts), boolean chains 6 (nesting depth added 115). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Json.parse (cognitive 164) · ×1
  • Json.parse (cognitive 164) backend/src/Builtins/Builtins.Pure/Libs/Json.fs:279 — Json.parse has cognitive complexity 164 (threshold 15). Drivers by points: if/else 51 (105 pts), match/switch 12 (30 pts), error handling 6 (15 pts), boolean chains 14 (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Main.runCli (cognitive 160) · ×1
  • Main.runCli (cognitive 160) backend/src/Cli/Cli.fs:411 — Main.runCli has cognitive complexity 160 (threshold 15). Drivers by points: if/else 49 (85 pts), match/switch 23 (39 pts), loops 10 (24 pts), boolean chains 8, error handling 4 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoModule.fns (cognitive 158) · ×1
  • NoModule.fns (cognitive 158) backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:116 — NoModule.fns has cognitive complexity 158 (threshold 15). Drivers by points: if/else 86 (132 pts), match/switch 22 (23 pts), boolean chains 3 (nesting depth added 47). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FastOps.evalNumeric (cognitive 156) · ×1
  • FastOps.evalNumeric (cognitive 156) backend/src/LibExecution/FastOps.fs:304 — FastOps.evalNumeric has cognitive complexity 156 (threshold 15). Drivers by points: match/switch 49 (143 pts), if/else 10 (11 pts), boolean chains 2 (nesting depth added 95). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TraitCalls.resolveIn (cognitive 151) · ×1
  • TraitCalls.resolveIn (cognitive 151) backend/src/Builtins/Builtins.Matter/Libs/PM/TraitCalls.fs:335 — TraitCalls.resolveIn has cognitive complexity 151 (threshold 15). Drivers by points: match/switch 22 (86 pts), if/else 15 (35 pts), loops 6 (29 pts), boolean chains 1 (nesting depth added 107). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Host.performWithSession (cognitive 129) · ×1
  • Host.performWithSession (cognitive 129) backend/src/LibExecution/Host/Host.fs:1263 — Host.performWithSession has cognitive complexity 129 (threshold 15). Drivers by points: match/switch 26 (100 pts), if/else 6 (18 pts), error handling 3 (9 pts), boolean chains 2 (nesting depth added 92). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Cli.fns (cognitive 126) · ×1
  • Cli.fns (cognitive 126) backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1005 — Cli.fns has cognitive complexity 126 (threshold 15). Drivers by points: match/switch 29 (92 pts), if/else 10 (20 pts), error handling 2 (12 pts), boolean chains 2 (nesting depth added 83). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · String.fns (cognitive 119) · ×1
  • String.fns (cognitive 119) backend/src/Builtins/Builtins.Pure/Libs/String.fs:84 — String.fns has cognitive complexity 119 (threshold 15). Drivers by points: if/else 27 (50 pts), match/switch 35 (41 pts), loops 5 (16 pts), boolean chains 8, error handling 2 (4 pts) (nesting depth added 42). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseInterpString (cognitive 98) · ×1
  • Parser.parseInterpString (cognitive 98) backend/src/LibParser/Parser.fs:1888 — Parser.parseInterpString has cognitive complexity 98 (threshold 15). Drivers by points: if/else 32 (65 pts), match/switch 3 (18 pts), loops 4 (9 pts), boolean chains 6 (nesting depth added 53). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Int8.fns (cognitive 95) · ×1
  • Int8.fns (cognitive 95) backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:29 — Int8.fns has cognitive complexity 95 (threshold 15). Drivers by points: if/else 34 (56 pts), match/switch 31, boolean chains 4, error handling 2 (4 pts) (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TypeChecker.unifyValueType (cognitive 93) · ×1
  • TypeChecker.unifyValueType (cognitive 93) backend/src/LibExecution/TypeChecker.fs:270 — TypeChecker.unifyValueType has cognitive complexity 93 (threshold 15). Drivers by points: match/switch 11 (53 pts), if/else 15 (40 pts) (nesting depth added 67). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Expr.toPT (cognitive 90) · ×1
  • Expr.toPT (cognitive 90) backend/src/LibParser/WrittenTypesToProgramTypes.fs:360 — Expr.toPT has cognitive complexity 90 (threshold 15). Drivers by points: match/switch 28 (76 pts), if/else 6 (12 pts), boolean chains 2 (nesting depth added 54). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Int16.fns (cognitive 88) · ×1
  • Int16.fns (cognitive 88) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:29 — Int16.fns has cognitive complexity 88 (threshold 15). Drivers by points: if/else 30 (50 pts), match/switch 31, error handling 2 (4 pts), boolean chains 3 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Int32.fns (cognitive 86) · ×1
  • Int32.fns (cognitive 86) backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:29 — Int32.fns has cognitive complexity 86 (threshold 15). Drivers by points: if/else 28 (48 pts), match/switch 31, error handling 2 (4 pts), boolean chains 3 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Instrumentation.fns (cognitive 84) · ×1
  • Instrumentation.fns (cognitive 84) backend/src/Builtins/Builtins.Language/Libs/Instrumentation.fs:30 — Instrumentation.fns has cognitive complexity 84 (threshold 15). Drivers by points: if/else 19 (57 pts), loops 4 (12 pts), match/switch 6 (12 pts), boolean chains 3 (nesting depth added 52). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TypeChecker.unifiesTrivially (cognitive 82) · ×1
  • TypeChecker.unifiesTrivially (cognitive 82) backend/src/LibExecution/TypeChecker.fs:27 — TypeChecker.unifiesTrivially has cognitive complexity 82 (threshold 15). Drivers by points: match/switch 22 (82 pts) (nesting depth added 60). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Int.fns (cognitive 82) · ×1
  • Int.fns (cognitive 82) backend/src/Builtins/Builtins.Pure/Libs/Int.fs:73 — Int.fns has cognitive complexity 82 (threshold 15). Drivers by points: match/switch 45 (47 pts), if/else 22 (35 pts) (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · HttpServer.handleRequest (cognitive 81) · ×1
  • HttpServer.handleRequest (cognitive 81) backend/src/Builtins/Builtins.Http.Server/Libs/HttpServer.fs:489 — HttpServer.handleRequest has cognitive complexity 81 (threshold 15). Drivers by points: match/switch 14 (43 pts), if/else 12 (23 pts), error handling 5 (10 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 47). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Stdin.readKeyOrPaste (cognitive 80) · ×1
  • Stdin.readKeyOrPaste (cognitive 80) backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:85 — Stdin.readKeyOrPaste has cognitive complexity 80 (threshold 15). Drivers by points: if/else 22 (64 pts), loops 2 (8 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Int64.fns (cognitive 79) · ×1
  • Int64.fns (cognitive 79) backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:30 — Int64.fns has cognitive complexity 79 (threshold 15). Drivers by points: if/else 24 (42 pts), match/switch 31, error handling 2 (4 pts), boolean chains 2 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parsePrimary (cognitive 79) · ×1
  • Parser.parsePrimary (cognitive 79) backend/src/LibParser/Parser.fs:2065 — Parser.parsePrimary has cognitive complexity 79 (threshold 15). Drivers by points: if/else 28 (47 pts), match/switch 9 (22 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 33). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseItemsBody (cognitive 79) · ×1
  • Parser.parseItemsBody (cognitive 79) backend/src/LibParser/Parser.fs:3538 — Parser.parseItemsBody has cognitive complexity 79 (threshold 15). Drivers by points: if/else 17 (45 pts), match/switch 6 (25 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HandleCommand.reachability (cognitive 79) · ×1
  • HandleCommand.reachability (cognitive 79) backend/src/LocalExec/LocalExec.fs:222 — HandleCommand.reachability has cognitive complexity 79 (threshold 15). Drivers by points: match/switch 10 (27 pts), loops 10 (24 pts), if/else 15 (22 pts), error handling 3 (5 pts), boolean chains 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PackageOps.fns (cognitive 78) · ×1
  • PackageOps.fns (cognitive 78) backend/src/Builtins/Builtins.Matter/Libs/PM/PackageOps.fs:96 — PackageOps.fns has cognitive complexity 78 (threshold 15). Drivers by points: match/switch 31 (55 pts), if/else 6 (13 pts), error handling 5 (10 pts) (nesting depth added 36). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parsePatternBaseInner (cognitive 77) · ×1
  • Parser.parsePatternBaseInner (cognitive 77) backend/src/LibParser/Parser.fs:1164 — Parser.parsePatternBaseInner has cognitive complexity 77 (threshold 15). Drivers by points: if/else 29 (58 pts), loops 3 (8 pts), match/switch 3 (6 pts), boolean chains 5 (nesting depth added 37). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Traces.fns (cognitive 75) · ×1
  • Traces.fns (cognitive 75) backend/src/Builtins/Builtins.Matter/Libs/Traces.fs:225 — Traces.fns has cognitive complexity 75 (threshold 15). Drivers by points: match/switch 29 (41 pts), if/else 8 (22 pts), loops 2 (6 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 32). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UInt8.fns (cognitive 74) · ×1
  • UInt8.fns (cognitive 74) backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:30 — UInt8.fns has cognitive complexity 74 (threshold 15). Drivers by points: if/else 24 (37 pts), match/switch 29, boolean chains 4, error handling 2 (4 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TypeChecker.tryUnifySync (cognitive 72) · ×1
  • TypeChecker.tryUnifySync (cognitive 72) backend/src/LibExecution/TypeChecker.fs:633 — TypeChecker.tryUnifySync has cognitive complexity 72 (threshold 15). Drivers by points: match/switch 23 (67 pts), if/else 2 (5 pts) (nesting depth added 47). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.executeSync (cognitive 71) · ×1
  • Interpreter.executeSync (cognitive 71) backend/src/LibExecution/Interpreter.fs:5641 — Interpreter.executeSync has cognitive complexity 71 (threshold 15). Drivers by points: match/switch 15 (56 pts), if/else 5 (12 pts), boolean chains 2, loops 1 (nesting depth added 48). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UInt16.fns (cognitive 70) · ×1
  • UInt16.fns (cognitive 70) backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:30 — UInt16.fns has cognitive complexity 70 (threshold 15). Drivers by points: if/else 22 (34 pts), match/switch 29, error handling 2 (4 pts), boolean chains 3 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Host.resolveSessionPosix (cognitive 68) · ×1
  • Host.resolveSessionPosix (cognitive 68) backend/src/LibExecution/Host/Host.fs:1141 — Host.resolveSessionPosix has cognitive complexity 68 (threshold 15). Drivers by points: match/switch 15 (42 pts), if/else 10 (23 pts), boolean chains 3 (nesting depth added 40). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TypeChecker.unifyValueTypeSync (cognitive 66) · ×1
  • TypeChecker.unifyValueTypeSync (cognitive 66) backend/src/LibExecution/TypeChecker.fs:145 — TypeChecker.unifyValueTypeSync has cognitive complexity 66 (threshold 15). Drivers by points: match/switch 12 (47 pts), if/else 8 (19 pts) (nesting depth added 46). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UInt32.fns (cognitive 66) · ×1
  • UInt32.fns (cognitive 66) backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:30 — UInt32.fns has cognitive complexity 66 (threshold 15). Drivers by points: if/else 20 (31 pts), match/switch 29, error handling 2 (4 pts), boolean chains 2 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Packages.fns (cognitive 63) · ×1
  • Packages.fns (cognitive 63) backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:255 — Packages.fns has cognitive complexity 63 (threshold 15). Drivers by points: match/switch 33 (51 pts), if/else 6 (10 pts), error handling 1 (2 pts) (nesting depth added 23). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DvalModule.rewriteWith (cognitive 62) · ×1
  • DvalModule.rewriteWith (cognitive 62) backend/src/LibExecution/RuntimeTypes.fs:2322 — DvalModule.rewriteWith has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (50 pts), loops 4 (6 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UInt64.fns (cognitive 62) · ×1
  • UInt64.fns (cognitive 62) backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:29 — UInt64.fns has cognitive complexity 62 (threshold 15). Drivers by points: match/switch 29, if/else 18 (28 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Int128.fns (cognitive 61) · ×1
  • Int128.fns (cognitive 61) backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:29 — Int128.fns has cognitive complexity 61 (threshold 15). Drivers by points: match/switch 30, if/else 15 (26 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ProgramTypes.search (cognitive 59) · ×1
  • ProgramTypes.search (cognitive 59) REDACTED:238 — ProgramTypes.search has cognitive complexity 59 (threshold 15). Drivers by points: if/else 37 (44 pts), match/switch 4 (12 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HostPosix.listDir (cognitive 57) · ×1
  • HostPosix.listDir (cognitive 57) backend/src/LibExecution/Host/HostPosix.fs:939 — HostPosix.listDir has cognitive complexity 57 (threshold 15). Drivers by points: if/else 14 (38 pts), loops 3 (11 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PackageManager.createInMemoryOver (cognitive 57) · ×1
  • PackageManager.createInMemoryOver (cognitive 57) backend/src/LibDB/PackageManager.fs:274 — PackageManager.createInMemoryOver has cognitive complexity 57 (threshold 15). Drivers by points: match/switch 29 (35 pts), if/else 11 (13 pts), boolean chains 6, loops 3 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.invokeBuiltin (cognitive 56) · ×1
  • Interpreter.invokeBuiltin (cognitive 56) backend/src/LibExecution/Interpreter.fs:1391 — Interpreter.invokeBuiltin has cognitive complexity 56 (threshold 15). Drivers by points: if/else 28 (42 pts), match/switch 6 (8 pts), boolean chains 6 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DvalCreator.checkRecordFields (cognitive 53) · ×1
  • DvalCreator.checkRecordFields (cognitive 53) backend/src/LibExecution/TypeChecker.fs:1625 — DvalCreator.checkRecordFields has cognitive complexity 53 (threshold 15). Drivers by points: match/switch 9 (38 pts), if/else 6 (15 pts) (nesting depth added 38). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseTypeParamsWith (cognitive 53) · ×1
  • Parser.parseTypeParamsWith (cognitive 53) backend/src/LibParser/Parser.fs:630 — Parser.parseTypeParamsWith has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (34 pts), match/switch 2 (9 pts), loops 2 (7 pts), boolean chains 3 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Cli.executeWith (cognitive 52) · ×1
  • Cli.executeWith (cognitive 52) backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:678 — Cli.executeWith has cognitive complexity 52 (threshold 15). Drivers by points: match/switch 17 (37 pts), if/else 6 (13 pts), error handling 1 (2 pts) (nesting depth added 28). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.beginRequest (cognitive 51) · ×1
  • Interpreter.beginRequest (cognitive 51) backend/src/LibExecution/Interpreter.fs:3267 — Interpreter.beginRequest has cognitive complexity 51 (threshold 15). Drivers by points: match/switch 11 (29 pts), if/else 12 (22 pts) (nesting depth added 28). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DvalCreator.updateRecordFields (cognitive 51) · ×1
  • DvalCreator.updateRecordFields (cognitive 51) backend/src/LibExecution/TypeChecker.fs:1755 — DvalCreator.updateRecordFields has cognitive complexity 51 (threshold 15). Drivers by points: match/switch 9 (38 pts), if/else 5 (13 pts) (nesting depth added 37). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.checkAndExtractMatchPattern (cognitive 49) · ×1
  • Interpreter.checkAndExtractMatchPattern (cognitive 49) backend/src/LibExecution/Interpreter.fs:509 — Interpreter.checkAndExtractMatchPattern has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 22 (43 pts), if/else 2 (4 pts), boolean chains 2 (nesting depth added 23). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.completePackage (cognitive 48) · ×1
  • Interpreter.completePackage (cognitive 48) backend/src/LibExecution/Interpreter.fs:2298 — Interpreter.completePackage has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (31 pts), match/switch 3 (12 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TypeChecker.resolveType (cognitive 48) · ×1
  • TypeChecker.resolveType (cognitive 48) backend/src/LibExecution/TypeChecker.fs:502 — TypeChecker.resolveType has cognitive complexity 48 (threshold 15). Drivers by points: match/switch 6 (27 pts), if/else 7 (18 pts), boolean chains 3 (nesting depth added 32). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Exec.fns (cognitive 47) · ×1
  • Exec.fns (cognitive 47) backend/src/Builtins/Builtins.Language/Libs/Exec.fs:231 — Exec.fns has cognitive complexity 47 (threshold 15). Drivers by points: match/switch 22 (42 pts), if/else 3 (5 pts) (nesting depth added 22). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Seed.evaluateAllValues (cognitive 44) · ×1
  • Seed.evaluateAllValues (cognitive 44) backend/src/LibDB/Seed.fs:508 — Seed.evaluateAllValues has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 2 (11 pts), error handling 1 (5 pts), loops 2 (5 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scheduler.Subscribe (cognitive 43) · ×1
  • Scheduler.Subscribe (cognitive 43) backend/src/LibExecution/Scheduler.fs:500 — Scheduler.Subscribe has cognitive complexity 43 (threshold 15). Drivers by points: match/switch 9 (20 pts), if/else 8 (12 pts), loops 2 (8 pts), boolean chains 3 (nesting depth added 21). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Expr.toRT (cognitive 43) · ×1
  • Expr.toRT (cognitive 43) backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs:547 — Expr.toRT has cognitive complexity 43 (threshold 15). Drivers by points: match/switch 19 (33 pts), if/else 6 (9 pts), boolean chains 1 (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TerminalText.wrapAtColumn (cognitive 42) · ×1
  • TerminalText.wrapAtColumn (cognitive 42) backend/src/Builtins/Builtins.Cli/Libs/TerminalText.fs:143 — TerminalText.wrapAtColumn has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 6, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BranchManagerPanel.constructor (cognitive 41) · ×1
  • BranchManagerPanel.constructor (cognitive 41) later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts:49 — BranchManagerPanel.constructor has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 6 (16 pts), boolean chains 5, match/switch 1 (nesting depth added 19). None of this is in the body itself: all 41 points belong to one function literal inside it that branches (line 57). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Parser.parseLet (cognitive 40) · ×1
  • Parser.parseLet (cognitive 40) backend/src/LibParser/Parser.fs:1509 — Parser.parseLet has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (32 pts), match/switch 2 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · HostProcess.runInWorkspace (cognitive 39) · ×1
  • HostProcess.runInWorkspace (cognitive 39) backend/src/LibExecution/Host/HostProcess.fs:282 — HostProcess.runInWorkspace has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 6 (9 pts), error handling 5 (8 pts), loops 3 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EmbeddedResources.extract (cognitive 38) · ×1
  • EmbeddedResources.extract (cognitive 38) backend/src/Cli/EmbeddedResources.fs:428 — EmbeddedResources.extract has cognitive complexity 38 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 3 (11 pts), match/switch 2 (8 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Interpreter.callPackageViaFrame (cognitive 38) · ×1
  • Interpreter.callPackageViaFrame (cognitive 38) backend/src/LibExecution/Interpreter.fs:2501 — Interpreter.callPackageViaFrame has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 5 (14 pts), boolean chains 5 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UInt128.fns (cognitive 38) · ×1
  • UInt128.fns (cognitive 38) backend/src/Builtins/Builtins.Pure/Libs/UInt128.fs:30 — UInt128.fns has cognitive complexity 38 (threshold 15). Drivers by points: match/switch 24, if/else 6 (10 pts), error handling 2 (4 pts) (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.tryFastOp (cognitive 37) · ×1
  • Interpreter.tryFastOp (cognitive 37) backend/src/LibExecution/Interpreter.fs:1650 — Interpreter.tryFastOp has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 6 (25 pts), if/else 6 (11 pts), boolean chains 1 (nesting depth added 24). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseParen (cognitive 37) · ×1
  • Parser.parseParen (cognitive 37) backend/src/LibParser/Parser.fs:2373 — Parser.parseParen has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 2 (6 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Random.fns (cognitive 37) · ×1
  • Random.fns (cognitive 37) backend/src/Builtins/Builtins.Random/Libs/Random.fs:14 — Random.fns has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (27 pts), match/switch 10 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Main.execute (cognitive 36) · ×1
  • Main.execute (cognitive 36) backend/src/Cli/Cli.fs:175 — Main.execute has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 13 (27 pts), if/else 5 (9 pts) (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Scheduler.Step (cognitive 36) · ×1
  • Scheduler.Step (cognitive 36) backend/src/LibExecution/Scheduler.fs:799 — Scheduler.Step has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 4 (11 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Stream.fns (cognitive 36) · ×1
  • Stream.fns (cognitive 36) backend/src/Builtins/Builtins.Pure/Libs/Stream.fs:109 — Stream.fns has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 17 (25 pts), if/else 6 (9 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TraitCalls.resolveTraitCalls (cognitive 36) · ×1
  • TraitCalls.resolveTraitCalls (cognitive 36) backend/src/Builtins/Builtins.Matter/Libs/PM/TraitCalls.fs:599 — TraitCalls.resolveTraitCalls has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 6 (15 pts), loops 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PackagesTreeDataProvider.getChildren (cognitive 36) · ×1
  • PackagesTreeDataProvider.getChildren (cognitive 36) REDACTED:257 — PackagesTreeDataProvider.getChildren has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 3 (6 pts), error handling 3 (5 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 11). Of this number, 16 points are the body's own statements and 20 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scheduler.Run (cognitive 35) · ×1
  • Scheduler.Run (cognitive 35) backend/src/LibExecution/Scheduler.fs:895 — Scheduler.Run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (6 pts), match/switch 3 (6 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AccessModule.findEffectiveDenial (cognitive 35) · ×1
  • AccessModule.findEffectiveDenial (cognitive 35) backend/src/LibExecution/Permissions.fs:617 — AccessModule.findEffectiveDenial has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 6 (19 pts), if/else 3 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 23). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Float.fns (cognitive 35) · ×1
  • Float.fns (cognitive 35) backend/src/Builtins/Builtins.Pure/Libs/Float.fs:24 — Float.fns has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 21, if/else 6 (12 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.resolveTraitMethod (cognitive 34) · ×1
  • Interpreter.resolveTraitMethod (cognitive 34) backend/src/LibExecution/Interpreter.fs:2979 — Interpreter.resolveTraitMethod has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 14 (30 pts), if/else 2 (4 pts) (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseMatch (cognitive 33) · ×1
  • Parser.parseMatch (cognitive 33) backend/src/LibParser/Parser.fs:991 — Parser.parseMatch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Parser.parseEnumDef (cognitive 33) · ×1
  • Parser.parseEnumDef (cognitive 33) backend/src/LibParser/Parser.fs:3445 — Parser.parseEnumDef has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScmCommands.register (cognitive 33) · ×1
  • ScmCommands.register (cognitive 33) later/vscode-extension/client/src/commands/scmCommands.ts:14 — ScmCommands.register has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (19 pts), error handling 5 (7 pts), ternaries 3 (5 pts), loops 1 (2 pts) (nesting depth added 11). None of this is in the body itself: all 33 points belong to 5 function literals inside it that branch (lines 20, 61, 44, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Scheduler.Describe (cognitive 32) · ×1
  • Scheduler.Describe (cognitive 32) backend/src/LibExecution/Scheduler.fs:763 — Scheduler.Describe has cognitive complexity 32 (threshold 15). Drivers by points: match/switch 5 (20 pts), if/else 4 (10 pts), boolean chains 1, error handling 1 (nesting depth added 21). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DependencyExtractor.extract (cognitive 32) · ×1
  • DependencyExtractor.extract (cognitive 32) backend/src/LibDB/DependencyExtractor.fs:46 — DependencyExtractor.extract has cognitive complexity 32 (threshold 15). Drivers by points: match/switch 8 (22 pts), loops 4 (10 pts) (nesting depth added 20). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parsePipe (cognitive 32) · ×1
  • Parser.parsePipe (cognitive 32) backend/src/LibParser/Parser.fs:875 — Parser.parsePipe has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 2 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BranchCommands.register (cognitive 32) · ×1
  • BranchCommands.register (cognitive 32) later/vscode-extension/client/src/commands/branchCommands.ts:15 — BranchCommands.register has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (17 pts), error handling 6 (7 pts), boolean chains 6, ternaries 2 (nesting depth added 4). None of this is in the body itself: all 32 points belong to 9 function literals inside it that branch (lines 87, 122, 144, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DateTime.fns (cognitive 31) · ×1
  • DateTime.fns (cognitive 31) backend/src/Builtins/Builtins.Pure/Libs/DateTime.fs:45 — DateTime.fns has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 28, if/else 2 (3 pts) (nesting depth added 1). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · RuntimeChild.fns (cognitive 31) · ×1
  • RuntimeChild.fns (cognitive 31) backend/src/Builtins/Builtins.Cli/Libs/RuntimeChild.fs:39 — RuntimeChild.fns has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 12 (18 pts), if/else 6 (10 pts), boolean chains 3 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Host.resolvePosix (cognitive 30) · ×1
  • Host.resolvePosix (cognitive 30) backend/src/LibExecution/Host/Host.fs:566 — Host.resolvePosix has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 6 (10 pts), boolean chains 6 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PackageCommands.register (cognitive 30) · ×1
  • PackageCommands.register (cognitive 30) later/vscode-extension/client/src/commands/packageCommands.ts:100 — PackageCommands.register has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, error handling 3, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 5). None of this is in the body itself: all 30 points belong to 4 function literals inside it that branch (lines 142, 102, 126, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Prelude.floatToShortestString (cognitive 29) · ×1
  • Prelude.floatToShortestString (cognitive 29) backend/src/Prelude/Prelude.fs:328 — Prelude.floatToShortestString has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tracing.createViewTracer (cognitive 29) · ×1
  • Tracing.createViewTracer (cognitive 29) backend/src/LibDB/Tracing.fs:1210 — Tracing.createViewTracer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer.findInterpExprClose (cognitive 29) · ×1
  • Lexer.findInterpExprClose (cognitive 29) backend/src/LibParser/Lexer.fs:210 — Lexer.findInterpExprClose has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HttpServer.readRequestBodyWithLimit (cognitive 29) · ×1
  • HttpServer.readRequestBodyWithLimit (cognitive 29) backend/src/Builtins/Builtins.Http.Server/Libs/HttpServer.fs:36 — HttpServer.readRequestBodyWithLimit has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Interpreter.tryFastOpOn (cognitive 28) · ×1
  • Interpreter.tryFastOpOn (cognitive 28) backend/src/LibExecution/Interpreter.fs:1760 — Interpreter.tryFastOpOn has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 6 (20 pts), if/else 4 (8 pts) (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PackagePermissions.reviewVersion (cognitive 28) · ×1
  • PackagePermissions.reviewVersion (cognitive 28) backend/src/LibDB/PackagePermissions.fs:349 — PackagePermissions.reviewVersion has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 7 (18 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Regex.fns (cognitive 28) · ×1
  • Regex.fns (cognitive 28) backend/src/Builtins/Builtins.Pure/Libs/Regex.fs:13 — Regex.fns has cognitive complexity 28 (threshold 15). Drivers by points: error handling 8 (16 pts), if/else 4 (6 pts), match/switch 6 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseAtomType (cognitive 28) · ×1
  • Parser.parseAtomType (cognitive 28) backend/src/LibParser/Parser.fs:2783 — Parser.parseAtomType has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 4 (8 pts), boolean chains 5 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Syscall.fns (cognitive 28) · ×1
  • Syscall.fns (cognitive 28) backend/src/Builtins/Builtins.Cli/Libs/Syscall.fs:101 — Syscall.fns has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 23 (28 pts) (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PackageValue.evalConstantExpr (cognitive 27) · ×1
  • PackageValue.evalConstantExpr (cognitive 27) backend/src/LibExecution/ProgramTypesToRuntimeTypes.fs:1396 — PackageValue.evalConstantExpr has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 10 (24 pts), if/else 2 (3 pts) (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.tryFastOpDirect (cognitive 27) · ×1
  • Interpreter.tryFastOpDirect (cognitive 27) backend/src/LibExecution/Interpreter.fs:1819 — Interpreter.tryFastOpDirect has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 6 (24 pts), if/else 2, boolean chains 1 (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.tryBuildSync (cognitive 27) · ×1
  • Interpreter.tryBuildSync (cognitive 27) backend/src/LibExecution/Interpreter.fs:4236 — Interpreter.tryBuildSync has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 8 (23 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ValueType.mergeKnownTypes (cognitive 27) · ×1
  • ValueType.mergeKnownTypes (cognitive 27) backend/src/LibExecution/ValueType.fs:54 — ValueType.mergeKnownTypes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 4 (12 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Posix.fns (cognitive 27) · ×1
  • Posix.fns (cognitive 27) backend/src/Builtins/Builtins.Cli/Libs/Posix.fs:107 — Posix.fns has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 22, if/else 4 (5 pts) (nesting depth added 1). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Stream.readChunk (cognitive 26) · ×1
  • Stream.readChunk (cognitive 26) backend/src/LibExecution/Stream.fs:304 — Stream.readChunk has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 4 (13 pts), if/else 4 (8 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PackageRefsGenerator.generate (cognitive 26) · ×1
  • PackageRefsGenerator.generate (cognitive 26) backend/src/LibDB/PackageRefsGenerator.fs:79 — PackageRefsGenerator.generate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 7 (9 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Propagation.createAllItems (cognitive 26) · ×1
  • Propagation.createAllItems (cognitive 26) backend/src/LibDB/Propagation.fs:449 — Propagation.createAllItems has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Blob.fns (cognitive 26) · ×1
  • Blob.fns (cognitive 26) backend/src/Builtins/Builtins.Pure/Libs/Blob.fs:17 — Blob.fns has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 13 (16 pts), error handling 3 (6 pts), if/else 1 (2 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PinnedItemsServiceImpl.load (cognitive 26) · ×1
  • PinnedItemsServiceImpl.load (cognitive 26) later/vscode-extension/client/src/services/pinnedItemsService.ts:48 — PinnedItemsServiceImpl.load has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Spread.ofApplicable (cognitive 25) · ×1
  • Spread.ofApplicable (cognitive 25) backend/src/LibExecution/Spread.fs:344 — Spread.ofApplicable has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 4 (12 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DvalModule.toValueType (cognitive 25) · ×1
  • DvalModule.toValueType (cognitive 25) backend/src/LibExecution/RuntimeTypes.fs:2161 — DvalModule.toValueType has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (22 pts), match/switch 2 (3 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · cli.html.shell.onData() (cognitive 25) · ×1
  • cli.html.shell.onData() (cognitive 25) later/backend/src/Wasm/wwwroot/cli.html:144 — cli.html.shell.onData() has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Spread.spreadChunks (cognitive 24) · ×1
  • Spread.spreadChunks (cognitive 24) backend/src/LibExecution/Spread.fs:536 — Spread.spreadChunks has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (9 pts), if/else 6 (7 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TraceStorage.store (cognitive 24) · ×1
  • TraceStorage.store (cognitive 24) backend/src/LibDB/Tracing.fs:737 — TraceStorage.store has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 8 (18 pts), if/else 4 (6 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Char.fns (cognitive 24) · ×1
  • Char.fns (cognitive 24) backend/src/Builtins/Builtins.Pure/Libs/Char.fs:31 — Char.fns has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 14 (15 pts), if/else 4 (6 pts), boolean chains 3 (nesting depth added 3). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseLetPattern (cognitive 24) · ×1
  • Parser.parseLetPattern (cognitive 24) backend/src/LibParser/Parser.fs:1457 — Parser.parseLetPattern has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Validation.exprIssues (cognitive 24) · ×1
  • Validation.exprIssues (cognitive 24) backend/src/LibParser/Validation.fs:213 — Validation.exprIssues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 3 (5 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · docsPage.formatContent (cognitive 24) · ×1
  • docsPage.formatContent (cognitive 24) later/vscode-extension/client/src/panels/homepage/pages/docsPage.ts:34 — docsPage.formatContent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Interpreter.callBuiltinResolvedSlow (cognitive 23) · ×1
  • Interpreter.callBuiltinResolvedSlow (cognitive 23) backend/src/LibExecution/Interpreter.fs:1933 — Interpreter.callBuiltinResolvedSlow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Stream.pull (cognitive 23) · ×1
  • Stream.pull (cognitive 23) backend/src/LibExecution/Stream.fs:165 — Stream.pull has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 9 (20 pts), if/else 2 (3 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Seed.foldRead (cognitive 23) · ×1
  • Seed.foldRead (cognitive 23) backend/src/LibDB/Seed.fs:196 — Seed.foldRead has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (6 pts), match/switch 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Branches.lookupRef (cognitive 23) · ×1
  • Branches.lookupRef (cognitive 23) backend/src/LibDB/Branches.fs:137 — Branches.lookupRef has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (10 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Stdin.fns (cognitive 23) · ×1
  • Stdin.fns (cognitive 23) backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:578 — Stdin.fns has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 11 (18 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Hashing.findSCCs (cognitive 22) · ×1
  • Hashing.findSCCs (cognitive 22) backend/src/LibSerialization/Hashing/Hashing.fs:382 — Hashing.findSCCs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (5 pts), loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NameResolver.resolveGenericName (cognitive 22) · ×1
  • NameResolver.resolveGenericName (cognitive 22) backend/src/LibParser/NameResolver.fs:77 — NameResolver.resolveGenericName has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 7 (16 pts), if/else 2 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseEffectRow (cognitive 22) · ×1
  • Parser.parseEffectRow (cognitive 22) backend/src/LibParser/Parser.fs:2995 — Parser.parseEffectRow has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.parseTraitDecl (cognitive 22) · ×1
  • Parser.parseTraitDecl (cognitive 22) backend/src/LibParser/Parser.fs:3199 — Parser.parseTraitDecl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Interpreter.receiverMethod (cognitive 21) · ×1
  • Interpreter.receiverMethod (cognitive 21) backend/src/LibExecution/Interpreter.fs:5194 — Interpreter.receiverMethod has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 6 (21 pts) (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DvalCreator.checkEnumFieldsSlow (cognitive 21) · ×1
  • DvalCreator.checkEnumFieldsSlow (cognitive 21) backend/src/LibExecution/TypeChecker.fs:1273 — DvalCreator.checkEnumFieldsSlow has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (17 pts), if/else 2 (4 pts) (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ReplayCheck.difference (cognitive 21) · ×1
  • ReplayCheck.difference (cognitive 21) backend/src/LibDB/Tracing.fs:462 — ReplayCheck.difference has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (15 pts), if/else 4 (6 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Branches.restateReverts (cognitive 21) · ×1
  • Branches.restateReverts (cognitive 21) backend/src/LibDB/Branches.fs:617 — Branches.restateReverts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Expr.pipeExprToPT (cognitive 21) · ×1
  • Expr.pipeExprToPT (cognitive 21) backend/src/LibParser/WrittenTypesToProgramTypes.fs:782 — Expr.pipeExprToPT has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 4 (7 pts), boolean chains 2 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.validateLiterals (cognitive 21) · ×1
  • Parser.validateLiterals (cognitive 21) backend/src/LibParser/Parser.fs:513 — Parser.validateLiterals has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerminalText.skipEscape (cognitive 21) · ×1
  • TerminalText.skipEscape (cognitive 21) backend/src/Builtins/Builtins.Cli/Libs/TerminalText.fs:39 — TerminalText.skipEscape has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TST.remove (cognitive 20) · ×1
  • TST.remove (cognitive 20) backend/src/LibExecution/RuntimeTypes.fs:568 — TST.remove has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 2 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Host.pathContainsLink (cognitive 20) · ×1
  • Host.pathContainsLink (cognitive 20) backend/src/LibExecution/Host/Host.fs:243 — Host.pathContainsLink has cognitive complexity 20 (threshold 15). Drivers by points: error handling 3 (9 pts), if/else 5 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HostProcess.startChild (cognitive 20) · ×1
  • HostProcess.startChild (cognitive 20) backend/src/LibExecution/Host/HostProcess.fs:49 — HostProcess.startChild has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FilePath.resolve (cognitive 20) · ×1
  • FilePath.resolve (cognitive 20) backend/src/LibExecution/Host/HostSecurity.fs:38 — FilePath.resolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (6 pts), match/switch 2 (5 pts), error handling 1 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Permissions.fns (cognitive 20) · ×1
  • Permissions.fns (cognitive 20) backend/src/Builtins/Builtins.Matter/Libs/PM/Permissions.fs:87 — Permissions.fns has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 16 (20 pts) (nesting depth added 4). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.pushLambdaFrame (cognitive 19) · ×1
  • Interpreter.pushLambdaFrame (cognitive 19) backend/src/LibExecution/Interpreter.fs:3121 — Interpreter.pushLambdaFrame has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FastOps.eval1 (cognitive 19) · ×1
  • FastOps.eval1 (cognitive 19) backend/src/LibExecution/FastOps.fs:150 — FastOps.eval1 has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 6 (13 pts), if/else 6 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · HostPosix.pollDescriptors (cognitive 19) · ×1
  • HostPosix.pollDescriptors (cognitive 19) backend/src/LibExecution/Host/HostPosix.fs:490 — HostPosix.pollDescriptors has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HostPosix.tryTerminalWindowSize (cognitive 19) · ×1
  • HostPosix.tryTerminalWindowSize (cognitive 19) backend/src/LibExecution/Host/HostPosix.fs:841 — HostPosix.tryTerminalWindowSize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HashStabilization.computeRealHashes (cognitive 19) · ×1
  • HashStabilization.computeRealHashes (cognitive 19) backend/src/LibDB/HashStabilization.fs:239 — HashStabilization.computeRealHashes has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 7 (18 pts), loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · BranchSelection.fromStored (cognitive 19) · ×1
  • BranchSelection.fromStored (cognitive 19) backend/src/LibDB/BranchSelection.fs:70 — BranchSelection.fromStored has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 2 (4 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseRecordUpdate (cognitive 19) · ×1
  • Parser.parseRecordUpdate (cognitive 19) backend/src/LibParser/Parser.fs:2626 — Parser.parseRecordUpdate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Spread.ofLambdaBody (cognitive 18) · ×1
  • Spread.ofLambdaBody (cognitive 18) backend/src/LibExecution/Spread.fs:425 — Spread.ofLambdaBody has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (13 pts), boolean chains 2, if/else 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Scheduler.Dispatch (cognitive 18) · ×1
  • Scheduler.Dispatch (cognitive 18) backend/src/LibExecution/Scheduler.fs:616 — Scheduler.Dispatch has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (14 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ReplayPolicy.beforeServing (cognitive 18) · ×1
  • ReplayPolicy.beforeServing (cognitive 18) backend/src/LibExecution/Interpreter.fs:1331 — ReplayPolicy.beforeServing has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (9 pts), loops 2 (5 pts), if/else 3, boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TypeReferenceModule.unwrapAlias (cognitive 18) · ×1
  • TypeReferenceModule.unwrapAlias (cognitive 18) backend/src/LibExecution/RuntimeTypes.fs:4158 — TypeReferenceModule.unwrapAlias has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 1 (4 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TraceRetention.run (cognitive 18) · ×1
  • TraceRetention.run (cognitive 18) backend/src/LibDB/Tracing.fs:675 — TraceRetention.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WipRefresh.compactWipOps (cognitive 18) · ×1
  • WipRefresh.compactWipOps (cognitive 18) backend/src/LibDB/WipRefresh.fs:28 — WipRefresh.compactWipOps has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (6 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WipRefresh.refreshOnce (cognitive 18) · ×1
  • WipRefresh.refreshOnce (cognitive 18) backend/src/LibDB/WipRefresh.fs:173 — WipRefresh.refreshOnce has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 2 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.parseInfixRhs (cognitive 18) · ×1
  • Parser.parseInfixRhs (cognitive 18) backend/src/LibParser/Parser.fs:1636 — Parser.parseInfixRhs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.parseDict (cognitive 18) · ×1
  • Parser.parseDict (cognitive 18) backend/src/LibParser/Parser.fs:2566 — Parser.parseDict has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.parseRecordDef (cognitive 18) · ×1
  • Parser.parseRecordDef (cognitive 18) backend/src/LibParser/Parser.fs:3371 — Parser.parseRecordDef has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · collect_diagnostics.failure_databases (cognitive 18) · ×1
  • collect_diagnostics.failure_databases (cognitive 18) .circleci/collect_diagnostics.py:175 — collect_diagnostics.failure_databases has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Requirements.forExpressionWith (cognitive 17) · ×1
  • Requirements.forExpressionWith (cognitive 17) backend/src/LibExecution/CallGraph.fs:268 — Requirements.forExpressionWith has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (10 pts), boolean chains 4, if/else 2, loops 1 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interpreter.applyInstruction (cognitive 17) · ×1
  • Interpreter.applyInstruction (cognitive 17) backend/src/LibExecution/Interpreter.fs:4154 — Interpreter.applyInstruction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), match/switch 3 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DvalCreator.enumFieldsSync (cognitive 17) · ×1
  • DvalCreator.enumFieldsSync (cognitive 17) backend/src/LibExecution/TypeChecker.fs:1395 — DvalCreator.enumFieldsSync has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 2 (5 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DvalOrdering.compare (cognitive 17) · ×1
  • DvalOrdering.compare (cognitive 17) backend/src/LibExecution/RuntimeTypes.fs:1061 — DvalOrdering.compare has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · HostPosix.withParent (cognitive 17) · ×1
  • HostPosix.withParent (cognitive 17) backend/src/LibExecution/Host/HostPosix.fs:211 — HostPosix.withParent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 1 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Hashing.computeHashesWithSCCs (cognitive 17) · ×1
  • Hashing.computeHashesWithSCCs (cognitive 17) backend/src/LibSerialization/Hashing/Hashing.fs:519 — Hashing.computeHashesWithSCCs has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (7 pts), match/switch 2 (5 pts), if/else 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Base64.fns (cognitive 17) · ×1
  • Base64.fns (cognitive 17) backend/src/Builtins/Builtins.Pure/Libs/Base64.fs:15 — Base64.fns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 1 (3 pts), match/switch 3 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.floatParts (cognitive 17) · ×1
  • Parser.floatParts (cognitive 17) backend/src/LibParser/Parser.fs:456 — Parser.floatParts has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseImplDecl (cognitive 17) · ×1
  • Parser.parseImplDecl (cognitive 17) backend/src/LibParser/Parser.fs:3296 — Parser.parseImplDecl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 3 (4 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Lexer.hasInvalidEscapeInterp (cognitive 17) · ×1
  • Lexer.hasInvalidEscapeInterp (cognitive 17) backend/src/LibParser/Lexer.fs:282 — Lexer.hasInvalidEscapeInterp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · collect_diagnostics.collect (cognitive 17) · ×1
  • collect_diagnostics.collect (cognitive 17) .circleci/collect_diagnostics.py:68 — collect_diagnostics.collect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Interpreter.runFrame (cognitive 16) · ×1
  • Interpreter.runFrame (cognitive 16) backend/src/LibExecution/Interpreter.fs:5012 — Interpreter.runFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Interpreter.runRareOpcode (cognitive 16) · ×1
  • Interpreter.runRareOpcode (cognitive 16) backend/src/LibExecution/Interpreter.fs:5282 — Interpreter.runRareOpcode has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 7 (16 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · HostPosix.utimensAt (cognitive 16) · ×1
  • HostPosix.utimensAt (cognitive 16) backend/src/LibExecution/Host/HostPosix.fs:589 — HostPosix.utimensAt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TextWidth.ofCluster (cognitive 16) · ×1
  • TextWidth.ofCluster (cognitive 16) backend/src/Prelude/TextWidth.fs:12 — TextWidth.ofCluster has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tracing.executionTracingFor (cognitive 16) · ×1
  • Tracing.executionTracingFor (cognitive 16) backend/src/LibDB/Tracing.fs:497 — Tracing.executionTracingFor has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 4 (7 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PackagePermissions.purity (cognitive 16) · ×1
  • PackagePermissions.purity (cognitive 16) backend/src/LibDB/PackagePermissions.fs:165 — PackagePermissions.purity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Docs.docsForLocations (cognitive 16) · ×1
  • Docs.docsForLocations (cognitive 16) backend/src/LibDB/Docs.fs:322 — Docs.docsForLocations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 3 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dict.fns (cognitive 16) · ×1
  • Dict.fns (cognitive 16) backend/src/Builtins/Builtins.Pure/Libs/Dict.fs:70 — Dict.fns has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 14 (16 pts) (nesting depth added 2). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Math.fns (cognitive 16) · ×1
  • Math.fns (cognitive 16) backend/src/Builtins/Builtins.Pure/Libs/Math.fs:13 — Math.fns has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 10, if/else 4 (6 pts) (nesting depth added 2). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Parser.parseRecord (cognitive 16) · ×1
  • Parser.parseRecord (cognitive 16) backend/src/LibParser/Parser.fs:2517 — Parser.parseRecord has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer.hasSingleCloseBraceInterp (cognitive 16) · ×1
  • Lexer.hasSingleCloseBraceInterp (cognitive 16) backend/src/LibParser/Lexer.fs:306 — Lexer.hasSingleCloseBraceInterp has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerminalText.positionAfter (cognitive 16) · ×1
  • TerminalText.positionAfter (cognitive 16) backend/src/Builtins/Builtins.Cli/Libs/TerminalText.fs:226 — TerminalText.positionAfter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Stdin.awaitBlockingPolling (cognitive 16) · ×1
  • Stdin.awaitBlockingPolling (cognitive 16) backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:520 — Stdin.awaitBlockingPolling has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DarkFileSystemProvider.writeFile (cognitive 16) · ×1
  • DarkFileSystemProvider.writeFile (cognitive 16) later/vscode-extension/client/src/providers/darkFileSystemProvider.ts:102 — DarkFileSystemProvider.writeFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyMethods · ×1
  • TooManyMethods: Scheduler backend/src/LibExecution/Scheduler.fs:199 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:1 — backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:1-523 | backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:1-565 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:1-557 | backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:1-590 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:1-571 | backend/src/Builtins/Builtins.Pure/Libs/UInt128.fs:1-414 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:1-523 | backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:1-522 | backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:1-516 | backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:1-521 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) backend/src/LibDB/AstTransformer.fs:2 — backend/src/LibDB/AstTransformer.fs:2-592 | backend/src/LibDB/DeferredResolver.fs:10-697 | backend/src/LibDB/DependencyExtractor.fs:3-393 | backend/src/LibDB/UnresolvedCheck.fs:17-242 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×1
  • Duplicated block (47 lines × 2) backend/src/LibParser/Parser.fs:115 — backend/src/LibParser/Parser.fs:115-161 | backend/src/LibParser/Tokenizer.fs:27-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) backend/src/LibSerialization/Binary/Serializers/RT/Dval.fs:31 — backend/src/LibSerialization/Binary/Serializers/RT/Dval.fs:31-74 | backend/src/LibSerialization/Binary/Serializers/RT/ValueType.fs:21-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (40–41 lines × 2) · ×1
  • Duplicated block (40–41 lines × 2) backend/src/LibExecution/TypeChecker.fs:1650 — backend/src/LibExecution/TypeChecker.fs:1650-1690 | backend/src/LibExecution/TypeChecker.fs:1776-1815 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibExecution/TypeChecker.fs:1650` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) backend/src/LibExecution/ProgramTypesAst.fs:79 — backend/src/LibExecution/ProgramTypesAst.fs:79-109 | backend/src/LibExecution/ProgramTypesAst.fs:188-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) backend/src/LibSerialization/Binary/Serializers/PT/TypeReference.fs:102 — backend/src/LibSerialization/Binary/Serializers/PT/TypeReference.fs:102-130 | backend/src/LibSerialization/Binary/Serializers/RT/TypeReference.fs:100-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (25–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) backend/src/LibParser/Lexer.fs:952 — backend/src/LibParser/Lexer.fs:952-976 | backend/src/LibParser/Lexer.fs:988-1014 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) backend/src/LibSerialization/Binary/Serializers/RT/Dval.fs:251 — backend/src/LibSerialization/Binary/Serializers/RT/Dval.fs:251-276 | backend/src/LibSerialization/Binary/Serializers/RT/ValueType.fs:67-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (17–25 lines × 2) · ×1
  • Duplicated block (17–25 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Int.fs:33 — backend/src/Builtins/Builtins.Pure/Libs/Int.fs:33-49 | backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:41-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (22–23 lines × 3) · ×1
  • Duplicated block (22–23 lines × 3) backend/src/LibExecution/TypeChecker.fs:1303 — backend/src/LibExecution/TypeChecker.fs:1303-1325 | backend/src/LibExecution/TypeChecker.fs:1699-1721 | backend/src/LibExecution/TypeChecker.fs:1824-1845 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibExecution/TypeChecker.fs:1303` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:3 — backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:3-23 | backend/src/Builtins/Builtins.Pure/Libs/UInt128.fs:3-25 — before extracting anything, compare `backend/src/Builtins/Builtins.Pure/Libs/Int128.fs` and `backend/src/Builtins/Builtins.Pure/Libs/UInt128.fs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:477 — backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:477-498 | backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:529-549 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:477` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (20–21 lines × 7) · ×1
  • Duplicated block (20–21 lines × 7) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:3 — backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:3-22 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:3-23 | backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:3-23 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:3-23 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:3-23 | backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:3-23 | backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:3-23 — before extracting anything, compare `backend/src/Builtins/Builtins.Pure/Libs/Int16.fs` and `backend/src/Builtins/Builtins.Pure/Libs/Int32.fs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–20 lines × 4) · ×1
  • Duplicated block (19–20 lines × 4) backend/src/LibDB/AstTransformer.fs:227 — backend/src/LibDB/AstTransformer.fs:227-245 | backend/src/LibDB/DeferredResolver.fs:172-191 | backend/src/LibDB/DependencyExtractor.fs:83-102 | backend/src/LibDB/UnresolvedCheck.fs:33-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:686 — backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:686-705 | later/backend/src/Wasm/Host.fs:418-436 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Cli/Libs/Stdin.fs:686` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–19 lines × 2) · ×1
  • Duplicated block (14–19 lines × 2) backend/src/LibParser/Parser.fs:3092 — backend/src/LibParser/Parser.fs:3092-3110 | backend/src/LibParser/Parser.fs:3160-3173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibParser/Parser.fs:3092` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (17–18 lines × 4) · ×1
  • Duplicated block (17–18 lines × 4) backend/src/LibDB/AstTransformer.fs:346 — backend/src/LibDB/AstTransformer.fs:346-362 | backend/src/LibDB/DeferredResolver.fs:310-327 | backend/src/LibDB/DependencyExtractor.fs:195-212 | backend/src/LibDB/UnresolvedCheck.fs:70-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (11–18 lines × 2) · ×1
  • Duplicated block (11–18 lines × 2) backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:219 — backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:219-229 | backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:241-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/List.fs:403 — backend/src/Builtins/Builtins.Pure/Libs/List.fs:403-419 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:545-559 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/List.fs:403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:449 — backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:449-463 | backend/src/Builtins/Builtins.Matter/Libs/PM/Packages.fs:502-516 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–15 lines × 2) · ×1
  • Duplicated block (11–15 lines × 2) backend/src/LibDB/Caching.fs:57 — backend/src/LibDB/Caching.fs:57-71 | backend/src/LibDB/Caching.fs:85-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibDB/Caching.fs:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) backend/src/Cli/EmbeddedResources.fs:50 — backend/src/Cli/EmbeddedResources.fs:50-61 | backend/src/Cli/EmbeddedResources.fs:94-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–14 lines × 2) · ×1
  • Duplicated block (10–14 lines × 2) backend/src/LibExecution/TypeChecker.fs:788 — backend/src/LibExecution/TypeChecker.fs:788-797 | backend/src/LibExecution/TypeChecker.fs:820-833 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibExecution/TypeChecker.fs:788` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) backend/src/LibExecution/TypeChecker.fs:1626 — backend/src/LibExecution/TypeChecker.fs:1626-1639 | backend/src/LibExecution/TypeChecker.fs:1756-1768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) backend/src/LibParser/Parser.fs:2800 — backend/src/LibParser/Parser.fs:2800-2811 | backend/src/LibParser/Parser.fs:2815-2827 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) backend/src/LibExecution/TypeChecker.fs:902 — backend/src/LibExecution/TypeChecker.fs:902-913 | backend/src/LibExecution/TypeChecker.fs:985-995 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 10) · ×1
  • Duplicated block (10 lines × 10) backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:14 — backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:14-23 | backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:13-22 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:14-23 | backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:14-23 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:14-23 | backend/src/Builtins/Builtins.Pure/Libs/UInt128.fs:14-25 | backend/src/Builtins/Builtins.Pure/Libs/UInt16.fs:14-23 | backend/src/Builtins/Builtins.Pure/Libs/UInt32.fs:14-23 | backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:13-22 | backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:14-23 — before extracting anything, compare `backend/src/Builtins/Builtins.Pure/Libs/Int128.fs` and `backend/src/Builtins/Builtins.Pure/Libs/UInt128.fs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:84 — backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:84-93 | backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:768-775 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 7) · ×1
  • Duplicated block (9 lines × 7) backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:315 — backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:315-323 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:293-301 | backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:337-345 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:306-314 | backend/src/Builtins/Builtins.Pure/Libs/UInt128.fs:263-271 | backend/src/Builtins/Builtins.Pure/Libs/UInt64.fs:248-256 | backend/src/Builtins/Builtins.Pure/Libs/UInt8.fs:255-263 — before extracting anything, compare `backend/src/Builtins/Builtins.Pure/Libs/Int128.fs` and `backend/src/Builtins/Builtins.Pure/Libs/UInt128.fs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/Int128.fs:315` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) backend/src/Builtins/Builtins.Language/Libs/Parser.fs:400 — backend/src/Builtins/Builtins.Language/Libs/Parser.fs:400-408 | backend/src/Builtins/Builtins.Language/Libs/Parser.fs:413-421 | backend/src/Builtins/Builtins.Language/Libs/Parser.fs:600-608 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Language/Libs/Parser.fs:400` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1522 — backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1522-1529 | backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1594-1602 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) backend/src/Prelude/Task.fs:92 — backend/src/Prelude/Task.fs:92-98 | backend/src/Prelude/Task.fs:132-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Prelude/Task.fs:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `f` to `'a -> Task<'b>) (list : List<'a>) : Task<List<'b>> = list |> foldSequentially (fun (accum : List<'b>) (arg : 'a` in one and `'a -> Task<bool>) (list : List<'a>) : Task<Option<'a>> = List.fold (fun (accum : Task<Option<'a>>) (arg : 'a` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (7–8 lines × 4) · ×1
  • Duplicated block (7–8 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:139 — backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:139-145 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:139-145 | backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:183-190 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:139-145 — before extracting anything, compare `backend/src/Builtins/Builtins.Pure/Libs/Int16.fs` and `backend/src/Builtins/Builtins.Pure/Libs/Int32.fs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1794 — backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1794-1800 | backend/src/LocalExec/Builtins.fs:14-20 | backend/src/LocalExec/LocalExec.fs:568-575 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.CliHost/Libs/Cli.fs:1794` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) backend/src/LibDB/Branches.fs:285 — backend/src/LibDB/Branches.fs:285-290 | backend/src/LibDB/Branches.fs:307-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/LibDB/Branches.fs:285` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:42 — backend/src/Builtins/Builtins.Pure/Libs/Int16.fs:42-48 | backend/src/Builtins/Builtins.Pure/Libs/Int32.fs:42-48 | backend/src/Builtins/Builtins.Pure/Libs/Int64.fs:43-49 | backend/src/Builtins/Builtins.Pure/Libs/Int8.fs:42-48 — before extracting anything, compare `backend/src/Builtins/Builtins.Pure/Libs/Int16.fs` and `backend/src/Builtins/Builtins.Pure/Libs/Int32.fs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:115 — backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:115-121 | backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:134-139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Language/Libs/LanguageTools.fs:115` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) backend/src/LibExecution/Interpreter.fs:4480 — backend/src/LibExecution/Interpreter.fs:4480-4484 | backend/src/LibExecution/Interpreter.fs:4583-4587 | backend/src/LibExecution/Interpreter.fs:4927-4931 | backend/src/LibExecution/Interpreter.fs:5515-5521 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) backend/src/Prelude/Ply.fs:178 — backend/src/Prelude/Ply.fs:178-182 | backend/src/Prelude/Ply.fs:191-195 | backend/src/Prelude/Ply.fs:204-208 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Prelude/Ply.fs:178` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) backend/src/Builtins/Builtins.Language/Libs/Parser.fs:112 — backend/src/Builtins/Builtins.Language/Libs/Parser.fs:112-128 | backend/src/Builtins/Builtins.Language/Libs/Parser.fs:438-454 | backend/src/Builtins/Builtins.Language/Libs/Parser.fs:683-698 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Language/Libs/Parser.fs:112` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) backend/src/Builtins/Builtins.Pure/Libs/String.fs:628 — backend/src/Builtins/Builtins.Pure/Libs/String.fs:628-643 | backend/src/Builtins/Builtins.Pure/Libs/String.fs:711-726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/String.fs:628` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) backend/src/Builtins/Builtins.Pure/Libs/List.fs:432 — backend/src/Builtins/Builtins.Pure/Libs/List.fs:432-444 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:566-578 | backend/src/Builtins/Builtins.Pure/Libs/List.fs:624-636 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/List.fs:432` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:643 — backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:643-652 | backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:669-679 | backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:696-705 | backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:722-732 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/Builtins/Builtins.Pure/Libs/NoModule.fs:643` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) backend/src/LibParser/Parser.fs:3107 — backend/src/LibParser/Parser.fs:3107-3112 | backend/src/LibParser/Parser.fs:3170-3175 | backend/src/LibParser/Parser.fs:3202-3207 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — no coverage collector is wired up — Coverage NOT MEASURED: `--collect:"XPlat Code Coverage"` names a data collector that ships in the `coverlet.collector` package, and this repository wires up none — no test project references it and no runsettings declares one. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment: without a collector, `--collect` produces nothing even from a suite that builds and passes. Add a `coverlet.collector` PackageReference to the test project(s) (or commit the Cobertura/OpenCover/lcov report your CI produces) and real coverage will be measured. It is excluded from the score rather than counted as a near-zero defect.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging call was found in the 262 Python, JavaScript/TypeScript, F# production file(s) this check read across 24 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; F#: Microsoft.Extensions.Logging (ILogger), Serilog, NLog, log4net, Logary) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking backend/src/LibExecution/Host/Host.fs:1406 — `performWithSession` is async and calls .GetAwaiter().GetResult() — a blocking call inside async code stalls the thread-pool thread the workflow runs on, and every continuation queued behind it for as long as it runs.
R10 · Code Duplication · Duplicated block with local edits (48 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (48 matched lines × 2 locations) later/vscode-extension/client/src/commands/branchCommands.ts:105 — later/vscode-extension/client/src/commands/branchCommands.ts:105 · later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts:106 — the two spans are one implementation copied and then locally edited — 374 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (13 lines × 2 locations) · ×1
  • Duplicated block (13 lines × 2 locations) later/vscode-extension/client/src/services/pinnedItemsService.ts:153 — later/vscode-extension/client/src/services/pinnedItemsService.ts:153 · later/vscode-extension/client/src/services/pinnedItemsService.ts:201 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×1
  • Duplicated block (9 lines × 2 locations) later/vscode-extension/client/src/commands/scmCommands.ts:35 — later/vscode-extension/client/src/commands/scmCommands.ts:35 · later/vscode-extension/client/src/commands/scmCommands.ts:73 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×1
  • Duplicated block (8 lines × 2 locations) later/vscode-extension/client/src/services/pinnedItemsService.ts:30 — later/vscode-extension/client/src/services/pinnedItemsService.ts:30 · later/vscode-extension/client/src/services/recentItemsService.ts:34 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R11 · Import Boundaries · Boundary violation [package · ×1
  • Boundary violation [package:third-party-deep-import] later/vscode-extension/client/src/extension.ts:2 — later/vscode-extension/client/src/extension.ts:2 imports vscode-languageclient/lib/common/semanticTokens, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 29, cognitive 41) · ×1
  • Complex function (anonymous) (cyclomatic 29, cognitive 41) later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts:57 — (anonymous) has cyclomatic complexity 29 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 25, cognitive 26) · ×1
  • Complex function (anonymous) (cyclomatic 25, cognitive 26) later/vscode-extension/client/src/commands/packageCommands.ts:142 — (anonymous) has cyclomatic complexity 25 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 15, cognitive 15) · ×1
  • Complex function (anonymous) (cyclomatic 15, cognitive 15) REDACTED:300 — (anonymous) has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getTreeItem (cyclomatic 14, cognitive 11) · ×1
  • Complex function getTreeItem (cyclomatic 14, cognitive 11) later/vscode-extension/client/src/providers/treeviews/scmTreeDataProvider.ts:70 — getTreeItem has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function formatContent (cyclomatic 13, cognitive 24) · ×1
  • Complex function formatContent (cyclomatic 13, cognitive 24) later/vscode-extension/client/src/panels/homepage/pages/docsPage.ts:34 — formatContent has cyclomatic complexity 13 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function constructor (cyclomatic 12, cognitive 12) · ×1
  • Complex function constructor (cyclomatic 12, cognitive 12) REDACTED:28 — constructor has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · later/vscode-extension/client/src/panels/homepage/homepagePanel.ts · ×1
  • later/vscode-extension/client/src/panels/homepage/homepagePanel.ts: 402 lines of code later/vscode-extension/client/src/panels/homepage/homepagePanel.ts:1 — later/vscode-extension/client/src/panels/homepage/homepagePanel.ts has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No test or typecheck script · ×1
  • No test or typecheck script — test ✗ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~10 LoC) · ×1
  • Dead file (~10 LoC) later/vscode-extension/client/src/types/index.ts — no import path from any entry point (3 application, 2 tooling, 0 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
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity later/backend/src/Wasm/wwwroot/cli.html:40 — `https://cdn.jsdelivr.net/npm/@xterm/xterm@5.5.0/lib/xterm.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 2 such include(s) across the repository's markup.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked — No packages.lock.json and no central package management — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
Minor — 25 finding(s)
M4 · Documentation accuracy · README/code drift · ×6
  • README/code drift docs/writing-docstrings.md:37 — docs/writing-docstrings.md links to `LINK`, but `docs/LINK` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/writing-docstrings.md:53 — docs/writing-docstrings.md names `client/styles/_docs.scss`, but no file or folder `client/styles/_docs.scss` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/writing-docstrings.md:53 — docs/writing-docstrings.md names `client/src/ViewUtils.md`, but no file or folder `client/src/ViewUtils.md` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift later/README.md:272 — later/README.md names `backend/src/LibCloud/Config.fs`, but no file or folder `backend/src/LibCloud/Config.fs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift later/README.md:273 — later/README.md names `backend/static/favicon-32x32.png`, but no file or folder `backend/static/favicon-32x32.png` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift later/backend/src/Wasm/README.md:18 — later/backend/src/Wasm/README.md runs `dotnet publish backend/src/Wasm/Wasm.fsproj -c Release -o rundir/wasm-repl`, but `backend/src/Wasm/Wasm.fsproj` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 37 significant file(s) lose their only recent owner: backend/src/Builtins/Builtins.Matter/Libs/Traces.fs, backend/src/LibDB/Branches.fs, backend/src/LibExecution/Host/HostHttp.fs, scripts/perf/_bench.py, backend/src/Cli/EmbeddedResources.fs, backend/src/LibDB/Docs.fs, scripts/testing/test-build-planning.py, later/backend/src/LibSerialization/DvalReprInternalQueryable.fs (+29 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 4 significant file(s) lose their only recent owner: backend/src/LibSerialization/Binary/Serializers/Permissions.fs, backend/src/LibExecution/DvalDecoder.fs, backend/src/LibParser/Tokenizer.fs, later/vscode-extension/client/src/services/recentItemsService.ts. Pair on, review, or document these before any departure.
D19 · Documentation Quality · Documentation · ×2
  • Documentation: no installation or build instructions packages/darklang/cli/installation/README.md — The self-update install logic is written but no installation, build, or setup steps for the REDACTED CLI are present in any document. Add a short 'How to install and run REDACTED' section covering dotnet tooling, the self-updating path, and the required configuration.
  • Documentation: no usage examples packages/darklang/cli/installation/README.md — The README describes how to check for an update but provides no usage examples of the REDACTED CLI. Add a one-line 'How to run REDACTED' example showing the command and its output.
D31 · IaC & Container Security · Low IaC · ×2
  • REDACTED
  • REDACTED
X10 · Duplicated predicate · Duplicated predicate · ×2
  • Duplicated predicate backend/src/Builtins/Builtins.Cli/Libs/TerminalText.fs:78 — `c >= ' ' && c <= '~' && (i + 1 >= text.Length || text[i + 1] < '\u0080')` appears character-identically in 2 files — backend/src/Builtins/Builtins.Cli/Libs/TerminalText.fs, backend/src/Prelude/TextWidth.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 later/vscode-extension/client/src/commands/branchCommands.ts:135 — `result.conflicts && result.conflicts.length > 0` appears character-identically in 2 files — later/vscode-extension/client/src/commands/branchCommands.ts, later/vscode-extension/client/src/panels/branchManager/branchManagerPanel.ts. 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.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 22 project(s) overshoot their size bounds, lowering Project Cohesion to 9.1/10. The most over is `backend/src/LibExecution` (29836 LoC, 565 module-visible types across 2 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — 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 35209 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.
P6 · Release Hygiene · Changelog looks stale/thin · ×1
  • Changelog looks stale/thin — The changelog this check read carries 2 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch scripts/perf/_bench.py:362 — `commit` swallows every exception into `return 'unknown'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-56a122c7f130406491e78002cc5976d6/history.json --exit-code 0 --source .54artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-56a122c7f130406491e78002cc5976d6/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .11artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesdotnet—dotnet list backend/fsdark.sln package --vulnerable --include-transitive --format json4artifacts/raw/dotnet-vulnerable.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .18artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a16651-e87e-7f0f-bd51-b154711e001a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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