Public report of TheFellow/fkyeah, published 15 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 15 November 2026, 11:49 UTC · Survey ID cd_4c77847ccb914e6f9a3eb2609ec971a8
TheFellow/fkyeah
Measured 15 November 2026, 11:49 UTC, at code version ba5f386
Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
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: 22,261 lines of product code in 14 projects, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Production Readiness, 33
Findings by how serious they are
5 critical220 serious18 minor
34 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 11:49 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
43of 43 dimensions measured by tools.
232of 243 findings point to an exact file and line, so you can open each one in the code. The other 11 concern the repository as a whole, such as missing documentation.
43dimensions across 6 lenses, read from 22,261 lines of product code in 14 projects.
TheFellow/fkyeah falls short of our standard for a preview release because we found no logging, tracing or health checks in the code and no automated security scanning of the code, its secrets or its dependencies. It scores 54 out of 100 and is rated Adequate, and four of its five critical findings are security problems in the build pipeline and in its servers and containers.
Production Readiness, at 33, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the test that passed on some runs and failed on others, worth about 5 points. Adding a diagnostic log would lift Production Readiness itself, worth about 6 points. Raising Production Readiness to 62 would lift the score to about 65.
Three pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One setting leaves the servers or containers unsafe. Pinning each tool to an exact version and correcting the unsafe settings would close both risks.
The product code is 22,261 lines, about €43,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 forThe 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.
If Production Readiness rose from 33 to 62, the lowest score rated Strong, the score would rise from 54 to about 65.
Code composition: what the lines of code are
Product code 51%Tests 49%
New since the last survey: 1 finding
This critical or serious finding wasn't in the previous survey, on 31 October 2026.
Test Reliability · Flaky test: UnifiedLlm.Tests::UnifiedLlm.IntegrationTests.UnifiedLlm.IntegrationTests.circuit breaker middleware opens and later recovers after cooldown
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 1 finding
This critical or serious finding was in the previous survey, on 31 October 2026, and is gone from this one.
€14,000 to €71,000, for 236 to 749 hours of work, about 0.3 person-years for one engineer
Difficulty of the problem
Standard, 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 54. 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.
Size
Medium: 22,261 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 Flaky test finding(s) in Test Reliability.
Raises the score by about 5 points · Low effort · Test Reliability
2
Resolve the 6 Deprecated finding(s) in Dependency Hygiene — start with CodingAgent.Tests.fsproj, UnifiedLlm.Tests.fsproj, AcpRuntime.Tests.fsproj.
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag.
Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Raises the score by about 6 points · Medium effort · Observability
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.
Files that change often carry extra risk · Combined risk
One file is changed often and is hard to read, which makes it the likeliest place for a mistake. It also has under half its code tested, or was written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to this file therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (5 files) · Code Coverage (5 files under half tested) · The files: Program.fs
What to do: Add tests to these files and have a second person review every change to them, starting with Program.fs.
Where the investment is most exposed · Value at risk
This code would cost about €43,000 to build again, about 0.3 person-years of work. Its weakest lens is Production Readiness, at 33 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Flaky test finding(s) in Test Reliability. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 1 Test Reliability findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.5 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 8,830 lines over the last 90 days, which is about 35,811 lines a year. At that pace, the extra work comes to an estimated 5.5 to 33.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
95 modules, with 89 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 55 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.
1 pair of types, where a type in CodingAgent.CheckpointDto uses a type in UnifiedLlm.
The types involved
CodingAgent.CheckpointDto.Turn → UnifiedLlm.Usage
Direction
CodingAgent.CheckpointDto uses UnifiedLlm, so a change to UnifiedLlm can break CodingAgent.CheckpointDto, while a change to CodingAgent.CheckpointDto can't break UnifiedLlm.
Position
Below the diagonal: CodingAgent.CheckpointDto uses a module listed above it, which is the healthy direction.
AcpRuntime.AcpDelegateModule uses AcpRuntime, so a change to AcpRuntime can break AcpRuntime.AcpDelegateModule, while a change to AcpRuntime.AcpDelegateModule can't break AcpRuntime.
Position
Below the diagonal: AcpRuntime.AcpDelegateModule uses a module listed above it, which is the healthy direction.
AcpRuntime.AcpErrorModule uses AcpRuntime, so a change to AcpRuntime can break AcpRuntime.AcpErrorModule, while a change to AcpRuntime.AcpErrorModule can't break AcpRuntime.
Position
Below the diagonal: AcpRuntime.AcpErrorModule uses a module listed above it, which is the healthy direction.
AcpRuntime.ContentBlockModule uses AcpRuntime, so a change to AcpRuntime can break AcpRuntime.ContentBlockModule, while a change to AcpRuntime.ContentBlockModule can't break AcpRuntime.
Position
Below the diagonal: AcpRuntime.ContentBlockModule uses a module listed above it, which is the healthy direction.
AcpRuntime.DefaultDelegate uses AcpRuntime, so a change to AcpRuntime can break AcpRuntime.DefaultDelegate, while a change to AcpRuntime.DefaultDelegate can't break AcpRuntime.
Position
Below the diagonal: AcpRuntime.DefaultDelegate uses a module listed above it, which is the healthy direction.
AcpRuntime.Library uses AcpRuntime, so a change to AcpRuntime can break AcpRuntime.Library, while a change to AcpRuntime.Library can't break AcpRuntime.
Position
Below the diagonal: AcpRuntime.Library uses a module listed above it, which is the healthy direction.
AcpRuntime.Transport uses AcpRuntime, so a change to AcpRuntime can break AcpRuntime.Transport, while a change to AcpRuntime.Transport can't break AcpRuntime.
Position
Below the diagonal: AcpRuntime.Transport uses a module listed above it, which is the healthy direction.
Attractor.AcpPresets uses AcpRuntime, so a change to AcpRuntime can break Attractor.AcpPresets, while a change to Attractor.AcpPresets can't break AcpRuntime.
Position
Below the diagonal: Attractor.AcpPresets uses a module listed above it, which is the healthy direction.
CodingAgent uses CodingAgent.CheckpointDto, so a change to CodingAgent.CheckpointDto can break CodingAgent, while a change to CodingAgent can't break CodingAgent.CheckpointDto.
Position
Below the diagonal: CodingAgent uses a module listed above it, which is the healthy direction.
Attractor.AcpHandlers uses AcpRuntime, so a change to AcpRuntime can break Attractor.AcpHandlers, while a change to Attractor.AcpHandlers can't break AcpRuntime.
Position
Below the diagonal: Attractor.AcpHandlers uses a module listed above it, which is the healthy direction.
Attractor.AcpHandlers uses Attractor, so a change to Attractor can break Attractor.AcpHandlers, while a change to Attractor.AcpHandlers can't break Attractor.
Position
Below the diagonal: Attractor.AcpHandlers uses a module listed above it, which is the healthy direction.
Attractor.Conditions uses Attractor, so a change to Attractor can break Attractor.Conditions, while a change to Attractor.Conditions can't break Attractor.
Position
Below the diagonal: Attractor.Conditions uses a module listed above it, which is the healthy direction.
Attractor.ContextPrompt uses Attractor, so a change to Attractor can break Attractor.ContextPrompt, while a change to Attractor.ContextPrompt can't break Attractor.
Position
Below the diagonal: Attractor.ContextPrompt uses a module listed above it, which is the healthy direction.
Attractor.DotParser uses Attractor, so a change to Attractor can break Attractor.DotParser, while a change to Attractor.DotParser can't break Attractor.
Position
Below the diagonal: Attractor.DotParser uses a module listed above it, which is the healthy direction.
Attractor.EdgeSelection uses Attractor, so a change to Attractor can break Attractor.EdgeSelection, while a change to Attractor.EdgeSelection can't break Attractor.
Position
Below the diagonal: Attractor.EdgeSelection uses a module listed above it, which is the healthy direction.
Attractor.FidelityModeModule uses Attractor, so a change to Attractor can break Attractor.FidelityModeModule, while a change to Attractor.FidelityModeModule can't break Attractor.
Position
Below the diagonal: Attractor.FidelityModeModule uses a module listed above it, which is the healthy direction.
Attractor.FidelityResolution uses Attractor, so a change to Attractor can break Attractor.FidelityResolution, while a change to Attractor.FidelityResolution can't break Attractor.
Position
Below the diagonal: Attractor.FidelityResolution uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in Attractor.GoalGates uses a type in Attractor.
The types involved
Attractor.GoalGates.GoalGates → Attractor.Graph
Attractor.GoalGates.GoalGates → Attractor.Node
Attractor.GoalGates.GoalGates → Attractor.Outcome
Direction
Attractor.GoalGates uses Attractor, so a change to Attractor can break Attractor.GoalGates, while a change to Attractor.GoalGates can't break Attractor.
Position
Below the diagonal: Attractor.GoalGates uses a module listed above it, which is the healthy direction.
Attractor.HandlerArtifacts uses Attractor, so a change to Attractor can break Attractor.HandlerArtifacts, while a change to Attractor.HandlerArtifacts can't break Attractor.
Position
Below the diagonal: Attractor.HandlerArtifacts uses a module listed above it, which is the healthy direction.
Attractor.McpHandlers uses McpClient, so a change to McpClient can break Attractor.McpHandlers, while a change to Attractor.McpHandlers can't break McpClient.
Position
Below the diagonal: Attractor.McpHandlers uses a module listed above it, which is the healthy direction.
Attractor.McpHandlers uses Attractor, so a change to Attractor can break Attractor.McpHandlers, while a change to Attractor.McpHandlers can't break Attractor.
Position
Below the diagonal: Attractor.McpHandlers uses a module listed above it, which is the healthy direction.
Attractor.ShapeMapping uses Attractor, so a change to Attractor can break Attractor.ShapeMapping, while a change to Attractor.ShapeMapping can't break Attractor.
Position
Below the diagonal: Attractor.ShapeMapping uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in Attractor.Stylesheet uses a type in Attractor.
The types involved
Attractor.Stylesheet.Selector → Attractor.Node
Attractor.Stylesheet.Stylesheet → Attractor.Graph
Direction
Attractor.Stylesheet uses Attractor, so a change to Attractor can break Attractor.Stylesheet, while a change to Attractor.Stylesheet can't break Attractor.
Position
Below the diagonal: Attractor.Stylesheet uses a module listed above it, which is the healthy direction.
Attractor.Transforms uses Attractor, so a change to Attractor can break Attractor.Transforms, while a change to Attractor.Transforms can't break Attractor.
Position
Below the diagonal: Attractor.Transforms uses a module listed above it, which is the healthy direction.
Attractor.Validation uses Attractor, so a change to Attractor can break Attractor.Validation, while a change to Attractor.Validation can't break Attractor.
Position
Below the diagonal: Attractor.Validation uses a module listed above it, which is the healthy direction.
CodingAgent.HistoryConverter uses UnifiedLlm, so a change to UnifiedLlm can break CodingAgent.HistoryConverter, while a change to CodingAgent.HistoryConverter can't break UnifiedLlm.
Position
Below the diagonal: CodingAgent.HistoryConverter uses a module listed above it, which is the healthy direction.
CodingAgent.HistoryConverter uses CodingAgent, so a change to CodingAgent can break CodingAgent.HistoryConverter, while a change to CodingAgent.HistoryConverter can't break CodingAgent.
Position
Below the diagonal: CodingAgent.HistoryConverter uses a module listed above it, which is the healthy direction.
CodingAgent.LoopDetection uses UnifiedLlm, so a change to UnifiedLlm can break CodingAgent.LoopDetection, while a change to CodingAgent.LoopDetection can't break UnifiedLlm.
Position
Below the diagonal: CodingAgent.LoopDetection uses a module listed above it, which is the healthy direction.
CodingAgent.LoopDetection uses CodingAgent, so a change to CodingAgent can break CodingAgent.LoopDetection, while a change to CodingAgent.LoopDetection can't break CodingAgent.
Position
Below the diagonal: CodingAgent.LoopDetection uses a module listed above it, which is the healthy direction.
CodingAgent.SessionPersistenceModule uses UnifiedLlm, so a change to UnifiedLlm can break CodingAgent.SessionPersistenceModule, while a change to CodingAgent.SessionPersistenceModule can't break UnifiedLlm.
Position
Below the diagonal: CodingAgent.SessionPersistenceModule uses a module listed above it, which is the healthy direction.
CodingAgent.SessionPersistenceModule uses CodingAgent.CheckpointDto, so a change to CodingAgent.CheckpointDto can break CodingAgent.SessionPersistenceModule, while a change to CodingAgent.SessionPersistenceModule can't break CodingAgent.CheckpointDto.
Position
Below the diagonal: CodingAgent.SessionPersistenceModule uses a module listed above it, which is the healthy direction.
CodingAgent.SessionPersistenceModule uses CodingAgent, so a change to CodingAgent can break CodingAgent.SessionPersistenceModule, while a change to CodingAgent.SessionPersistenceModule can't break CodingAgent.
Position
Below the diagonal: CodingAgent.SessionPersistenceModule uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in CodingAgent.SubAgent uses a type in UnifiedLlm.
The types involved
CodingAgent.SubAgent.SubAgent → UnifiedLlm.Client
Direction
CodingAgent.SubAgent uses UnifiedLlm, so a change to UnifiedLlm can break CodingAgent.SubAgent, while a change to CodingAgent.SubAgent can't break UnifiedLlm.
Position
Below the diagonal: CodingAgent.SubAgent uses a module listed above it, which is the healthy direction.
CodingAgent.SubAgent uses CodingAgent, so a change to CodingAgent can break CodingAgent.SubAgent, while a change to CodingAgent.SubAgent can't break CodingAgent.
Position
Below the diagonal: CodingAgent.SubAgent uses a module listed above it, which is the healthy direction.
Attractor.Handlers uses UnifiedLlm, so a change to UnifiedLlm can break Attractor.Handlers, while a change to Attractor.Handlers can't break UnifiedLlm.
Position
Below the diagonal: Attractor.Handlers uses a module listed above it, which is the healthy direction.
56 pairs of types, where a type in Attractor.Handlers uses a type in Attractor. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Attractor.Handlers uses CodingAgent, so a change to CodingAgent can break Attractor.Handlers, while a change to Attractor.Handlers can't break CodingAgent.
Position
Below the diagonal: Attractor.Handlers uses a module listed above it, which is the healthy direction.
Attractor.Handlers uses Attractor.ContextPrompt, so a change to Attractor.ContextPrompt can break Attractor.Handlers, while a change to Attractor.Handlers can't break Attractor.ContextPrompt.
Position
Below the diagonal: Attractor.Handlers uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 50% · Checked 4 of 11 · gated by D1, D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
3
High / Critical
A02:2025 — Security Misconfiguration
3
High / Critical
Roadmap
Top priorities: Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce; Resolve the 1 Flaky test finding(s) in Test Reliability; Resolve the 6 Deprecated finding(s) in Dependency Hygiene — start with CodingAgent.Tests.fsproj, UnifiedLlm.Tests.fsproj, AcpRuntime.Tests.fsproj.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Flaky test finding(s) in Test Reliability.
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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 — 5
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 — 220
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 — 18
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
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 43 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 1.0, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 43 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 232 of 243 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A hotspot's complexity is meant to be the worst body its churn actually touched. For src/Attractor.Cli/Program.fs, src/McpClient/Transport.fs, src/UnifiedLlm/Caching.fs, src/UnifiedLlm/Validation.fs, src/UnifiedLlm/HttpAdapters.fs that could not be established — the complexity reader for the file reports no body extents, or the history carries no per-line attribution — so the row quotes the file's worst body, which the counted changes may never have touched. The churn count is unaffected.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-contributor repository — bus factor is not applicable (1 contributor(s) across 120 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's source is written only in languages whose packages are published through a manifest, and no manifest in the tree makes a publication act: either there is no package manifest of any ecosystem (no package.json, pyproject.toml, setup.py, gemspec, Cargo.toml, pom.xml, build.gradle, composer.json, pubspec.yaml or mix.exs), or every one present declares in its package manager's own terms that it is not published (an npm package marked "private": true, a Cargo package with publish = false, a pubspec with publish_to: none, a Composer "project", a Poetry project with package-mode = false, or the "Private :: Do Not Upload" classifier). With no publication act there is no intentionally-exposed surface for API consistency to be judged over.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in src/UnifiedLlm/Tools.fs, 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.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, 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.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — ------ REDACTED:60 -------------------- 58 | # Copy conformance tests 59 | WORKDIR /conformance 60 | >>> COPY conformance/ . 61 | 62 | # Make scripts executable -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 65d774fe-68f4-4c20-95fb-aad48bf8960f::urny51bso76bceemfgwutvt30: "/conformance": not found; runtime evidence skipped.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P8 Schema migrations — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads EF Core usage in C# and the schema tooling its file scan recognises only, and no .NET project was loaded, and this repository's language is not one the scan models, 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.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security 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 web-security controls.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X14 Bypassable address classification — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X15 Unvalidated length from an untrusted reader — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X21 Side-effecting pattern guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X26 Unsynchronised callback handoff — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X30 Support guard that admits what it rejects — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X32 Type resolved by simple name across every loaded assembly — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
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.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
48 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Engine.run at 87. A further 2 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 SessionPersistenceModule.eventKindOfString at 19 — they are counted neither in the figure above nor in this dimension's score. 2 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: src/CodingAgent/SessionPersistence.fs (SessionPersistenceModule.eventKindOfString at 19), src/UnifiedLlm/Observability.fs (ObservabilityEventModule.toPayload at 18). 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.
+ 42 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with Engine.run (cyclomatic 87), OpenAIAdapter.UnifiedLlm.IProviderAdapter.Stream (cyclomatic 80), Client.create (cyclomatic 65). — 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 3 together lifts Cyclomatic Complexity from 3.8 to about 4.7/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 58 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 12 bodies over 60 down to 60 or less in Cognitive Complexity — start with Engine.run (cognitive 309), OpenAIAdapter.UnifiedLlm.IProviderAdapter.Stream (cognitive 180), OpenRouterAdapter.UnifiedLlm.IProviderAdapter.Stream (cognitive 145). — 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 12 together lifts Cognitive Complexity from 2.0 to about 3.6/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.7 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 11 FileTooLong finding(s) in God Classes — start with HttpAdapters.fs, Engine.fs, Validation.fs. — One of this dimension's main actionable groups (11 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
73 duplicated block group(s) detected. 9.4 % of the production lines (2,083 of 22,261) are in a reported copy. One further row reports members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 41 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with Caching.fs (2), Engine.fs, Middleware.fs. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 6 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with Transport.fs, Types.fs, ProviderProfile.fs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 5 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with HttpAdapters.fs (3), Validation.fs, Session.fs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
What it measures: Whether 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.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
Resolve the 6 Low coverage finding(s) in Code Coverage — start with Library.fs (2), Observability.fs, Interviewer.fs. — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability8.0 / 10Adequategated by 1 critical finding✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
1 flaky across 1 measured tier(s). unit: measured (1 flaky).
Flaky test: UnifiedLlm.Tests::UnifiedLlm.IntegrationTests.UnifiedLlm.IntegrationTests.circuit breaker middleware opens and later recovers after cooldown
What to do
Resolve the 1 Flaky test finding(s) in Test Reliability. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d11_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
Resolve the 6 Deprecated finding(s) in Dependency Hygiene — start with CodingAgent.Tests.fsproj, UnifiedLlm.Tests.fsproj, AcpRuntime.Tests.fsproj. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 Outdated finding(s) in Dependency Hygiene — start with AcpRuntime.Tests.fsproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 128 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 6 direct `PackageReference`(s), and 102 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.
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.
Resolve the 5 Hotspot finding(s) in Churn × Complexity Hotspots — start with HttpAdapters.fs, Program.fs, Validation.fs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
0 of 1 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
3 naming inconsistencies among 109 declarations measured against a convention their peers follow.
`external shim python snippet patches checkpoint fixture without corrupting JSON` spells `JSON` where 29 names in the project spell it `Json`tests/Attractor.Tests/Sprint014ValidationTests.fs:407
`Events have correct session ID` spells `ID` where 77 names in the project spell it `Id`tests/CodingAgent.Tests/Tests.fs:1497
`OpenAI continuation sends only tool outputs with previous response ID` spells `ID` where 77 names in the project spell it `Id`tests/UnifiedLlm.Tests/CapabilityTests.fs:327
What to do
Resolve the 1 `external shim python snippet patches checkpoint fixture without… finding(s) in Naming Consistency — start with Sprint014ValidationTests.fs. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `Events have correct session ID` spells `ID` where 77 names in the… finding(s) in Naming Consistency — start with Tests.fs. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `OpenAI continuation sends only tool outputs with previous response ID`… finding(s) in Naming Consistency — start with CapabilityTests.fs. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
1 of 8 build units (MSBuild, Make) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
92 % of calls cross a namespace and 3 % 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.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
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).
3 finding(s): 0 critical, 3 high, 0 medium, 0 low. 3 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 1 file(s) — `conformance/03-execution/13-ruby-modifier-conditional/test.sh` (lines 18–79) — 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
What to do
No action in Static Analysis (SAST) — all 3 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (3 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 51 of the 59 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
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. Reported 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. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 17 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — 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.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether 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.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Code Health — Unreviewed-generation residue 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.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
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.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
What to do
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
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 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
`src/JsonRpc/JsonRpc.fsproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — src/JsonRpc/JsonRpc.fsproj:15
What to do
Add a SAST step to CI running what this repository's stack ships: `semgrep --config=auto` plus gitleaks for committed secrets (F# is not a CodeQL language and has no language-specific SAST engine) — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
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.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
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.
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.
D36 Supply-chain Provenance & Signing — 2 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
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 — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 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.
Not included — 68 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 web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
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.
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 — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
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) — ------ REDACTED:60 -------------------- 58 | # Copy conformance tests 59 | WORKDIR /conformance 60 | >>> COPY conformance/ . 61 | 62 | # Make scripts executable -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 65d774fe-68f4-4c20-95fb-aad48bf8960f::urny51bso76bceemfgwutvt30: "/conformance": not found; 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 — ~21003 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.
D16 Bus Factor — single-contributor repository — bus factor is not applicable
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.
D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .fs, .py, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
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.
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.
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 113 value object(s); 7 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 — 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
P9 Domain vs controller coverage — coverage data present for 56 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
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.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
S1 Web-Security Posture — Not assessed: these web-security 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 web-security 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.
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
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
X7 Silent fallback defaults — 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.
Flaky test: UnifiedLlm.Tests::UnifiedLlm.IntegrationTests.UnifiedLlm.IntegrationTests.circuit breaker middleware opens and later recovers after cooldown — Passed 2×, failed 1× across repeated runs.
FileTooLong: UnifiedLlm/HttpAdapters.fs src/UnifiedLlm/HttpAdapters.fs— FileTooLong — 2874 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 31 functions. The bar is 500 significant lines; this is 2374 over it, 5.75× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Attractor/Engine.fs src/Attractor/Engine.fs— FileTooLong — 1426 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 926 over it, 2.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Attractor/Validation.fs src/Attractor/Validation.fs— FileTooLong — 1352 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 852 over it, 2.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Attractor/Handlers.fs src/Attractor/Handlers.fs— FileTooLong — 1242 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 742 over it, 2.48× 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: Attractor.Cli/Program.fs src/Attractor.Cli/Program.fs— FileTooLong — 1179 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 679 over it, 2.36× 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: CodingAgent/Session.fs src/CodingAgent/Session.fs— FileTooLong — 961 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 461 over it, 1.92× 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: UnifiedLlm/Caching.fs src/UnifiedLlm/Caching.fs— FileTooLong — 819 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 319 over it, 1.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Attractor/Types.fs src/Attractor/Types.fs— FileTooLong — 752 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 252 over it, 1.50× 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: AcpRuntime/Transport.fs src/AcpRuntime/Transport.fs— FileTooLong — 740 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 240 over it, 1.48× 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: AcpRuntime/Client.fs src/AcpRuntime/Client.fs— FileTooLong — 538 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 38 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: UnifiedLlm/ModelCatalogData.fs src/UnifiedLlm/ModelCatalogData.fs— FileTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 26 over it, 1.05× 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.
Duplicated block (8 lines × 2) src/Attractor/Engine.fs:1298— src/Attractor/Engine.fs:1298-1305 | src/Attractor/Engine.fs:1763-1770 — both copies are in the same file, so extract the 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) src/UnifiedLlm/Caching.fs:74— src/UnifiedLlm/Caching.fs:74-81 | src/UnifiedLlm/Caching.fs:351-358 — both copies are in the same file, so extract the 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) src/UnifiedLlm/Middleware.fs:82— src/UnifiedLlm/Middleware.fs:82-89 | src/UnifiedLlm/Middleware.fs:106-113 — both copies are in the same file, so extract the 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) src/UnifiedLlm/Caching.fs:84— src/UnifiedLlm/Caching.fs:84-91 | src/UnifiedLlm/Caching.fs:356-363 — both copies are in the same file, so extract the 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) src/UnifiedLlm/HttpAdapters.fs:1319— src/UnifiedLlm/HttpAdapters.fs:1319-1326 | src/UnifiedLlm/HttpAdapters.fs:1359-1366 — both copies are in the same file, so extract the 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) src/Attractor/Conditions.fs:59— src/Attractor/Conditions.fs:59-66 | src/Attractor/Conditions.fs:68-75 — both copies are in the same file, so extract the 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) src/Attractor/Handlers.fs:249— src/Attractor/Handlers.fs:249-256 | src/Attractor/Handlers.fs:298-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Deprecated: xunit tests/CodingAgent.Tests/CodingAgent.Tests.fsproj:19— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit tests/UnifiedLlm.Tests/UnifiedLlm.Tests.fsproj:36— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit tests/AcpRuntime.Tests/AcpRuntime.Tests.fsproj:17— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit tests/Attractor.Tests/Attractor.Tests.fsproj:23— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit tests/JsonRpc.Tests/JsonRpc.Tests.fsproj:15— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Deprecated: xunit tests/McpClient.Tests/McpClient.Tests.fsproj:16— xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
Duplicated block (11 lines × 2) src/AcpRuntime/Transport.fs:330— src/AcpRuntime/Transport.fs:330-340 | src/McpClient/Transport.fs:181-191 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/AcpRuntime/Transport.fs:330` it does not close everything it opens, so those 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) src/Attractor/Types.fs:277— src/Attractor/Types.fs:277-287 | src/Attractor/Types.fs:416-426 — both copies are in the same file, so extract the 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) src/CodingAgent/ProviderProfile.fs:275— src/CodingAgent/ProviderProfile.fs:275-285 | src/CodingAgent/ProviderProfile.fs:329-339 — both copies are in the same file, so extract the 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) src/UnifiedLlm/Generation.fs:496— src/UnifiedLlm/Generation.fs:496-506 | src/UnifiedLlm/Generation.fs:824-834 — both copies are in the same file, so extract the 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) src/UnifiedLlm/HttpAdapters.fs:2275— src/UnifiedLlm/HttpAdapters.fs:2275-2285 | src/UnifiedLlm/HttpAdapters.fs:2806-2816 — both copies are in the same file, so extract the 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, `src/UnifiedLlm/HttpAdapters.fs:2273` calls `Add` and `src/UnifiedLlm/HttpAdapters.fs:2804` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) src/CodingAgent/Session.fs:250— src/CodingAgent/Session.fs:250-260 | src/CodingAgent/Session.fs:262-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.
Hotspot: src/UnifiedLlm/HttpAdapters.fs src/UnifiedLlm/HttpAdapters.fs:1740— src/UnifiedLlm/HttpAdapters.fs changed 5 times in last 90 days, max cyclomatic complexity 80 in OpenAIAdapter.UnifiedLlm.IProviderAdapter.Stream at line 1740. 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-06-14..2026-09-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-14 17:55:49 -07:00' --until='2026-09-12 17:55:49 -07:00' --full-history --no-merges -- src/UnifiedLlm/HttpAdapters.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: src/Attractor.Cli/Program.fs src/Attractor.Cli/Program.fs:1098— src/Attractor.Cli/Program.fs changed 7 times in last 90 days, max cyclomatic complexity 34 in Program.serve at line 1098. 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-06-14..2026-09-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-14 17:55:49 -07:00' --until='2026-09-12 17:55:49 -07:00' --full-history --no-merges -- src/Attractor.Cli/Program.fs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/UnifiedLlm/Validation.fs src/UnifiedLlm/Validation.fs:121— src/UnifiedLlm/Validation.fs changed 3 times in last 90 days, max cyclomatic complexity 34 in RequestValidatorModule.fromCatalog at line 121. 1 of those changes was a fix/bug commit, and the other 2 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-06-14..2026-09-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-14 17:55:49 -07:00' --until='2026-09-12 17:55:49 -07:00' --full-history --no-merges -- src/UnifiedLlm/Validation.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: src/UnifiedLlm/Caching.fs src/UnifiedLlm/Caching.fs:767— src/UnifiedLlm/Caching.fs changed 3 times in last 90 days, max cyclomatic complexity 26 in CacheStoreModule.fileSystem at line 767. 1 of those changes was a fix/bug commit, and the other 2 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-06-14..2026-09-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-14 17:55:49 -07:00' --until='2026-09-12 17:55:49 -07:00' --full-history --no-merges -- src/UnifiedLlm/Caching.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: src/McpClient/Transport.fs src/McpClient/Transport.fs:279— src/McpClient/Transport.fs changed 3 times in last 90 days, max cyclomatic complexity 25 in Transport.createStdioTransport at line 279. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-14..2026-09-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-14 17:55:49 -07:00' --until='2026-09-12 17:55:49 -07:00' --full-history --no-merges -- src/McpClient/Transport.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.
Duplicated block (10 lines × 2) src/Attractor/Validation.fs:760— src/Attractor/Validation.fs:760-769 | src/Attractor/Validation.fs:777-786 — both copies are in the same file, so extract the 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) src/UnifiedLlm/HttpAdapters.fs:613— src/UnifiedLlm/HttpAdapters.fs:613-622 | src/UnifiedLlm/HttpAdapters.fs:760-769 — both copies are in the same file, so extract the 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 `src/UnifiedLlm/HttpAdapters.fs:613` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) src/UnifiedLlm/HttpAdapters.fs:1257— src/UnifiedLlm/HttpAdapters.fs:1257-1266 | src/UnifiedLlm/HttpAdapters.fs:1422-1431 — both copies are in the same file, so extract the 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 `src/UnifiedLlm/HttpAdapters.fs:1257` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) src/CodingAgent/Session.fs:692— src/CodingAgent/Session.fs:692-701 | src/CodingAgent/Session.fs:717-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.
Duplicated block (10 lines × 2) src/UnifiedLlm/HttpAdapters.fs:1278— src/UnifiedLlm/HttpAdapters.fs:1278-1287 | src/UnifiedLlm/HttpAdapters.fs:1323-1332 — both copies are in the same file, so extract the 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) src/Attractor/Engine.fs:931— src/Attractor/Engine.fs:931-936 | src/Attractor/Engine.fs:1138-1142 — both copies are in the same file, so extract the 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 `src/Attractor/Engine.fs:931` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) src/Attractor/Engine.fs:962— src/Attractor/Engine.fs:962-969 | src/Attractor/Engine.fs:1650-1654 — both copies are in the same file, so extract the 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 `src/Attractor/Engine.fs:962` it does not close everything it opens, so those 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) src/Attractor/Handlers.fs:52— src/Attractor/Handlers.fs:52-56 | src/CodingAgent/Session.fs:397-401 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/UnifiedLlm/HttpAdapters.fs:1178— src/UnifiedLlm/HttpAdapters.fs:1178-1183 | src/UnifiedLlm/HttpAdapters.fs:1725-1729 — both copies are in the same file, so extract the 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 (5 lines × 2) src/UnifiedLlm/HttpAdapters.fs:2298— src/UnifiedLlm/HttpAdapters.fs:2298-2302 | src/UnifiedLlm/HttpAdapters.fs:2824-2828 — both copies are in the same file, so extract the 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 `src/UnifiedLlm/HttpAdapters.fs:2298` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/Attractor/Engine.fs:1112— src/Attractor/Engine.fs:1112-1123 | src/Attractor/Engine.fs:1614-1625 — both copies are in the same file, so extract the 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 `src/Attractor/Engine.fs:1112` it does not close everything it opens, so those 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) src/UnifiedLlm/Generation.fs:752— src/UnifiedLlm/Generation.fs:752-763 | src/UnifiedLlm/Generation.fs:927-938 — both copies are in the same file, so extract the 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) src/UnifiedLlm/HttpAdapters.fs:898— src/UnifiedLlm/HttpAdapters.fs:898-909 | src/UnifiedLlm/HttpAdapters.fs:1516-1527 — both copies are in the same file, so extract the 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) src/UnifiedLlm/HttpAdapters.fs:1896— src/UnifiedLlm/HttpAdapters.fs:1896-1907 | src/UnifiedLlm/HttpAdapters.fs:1915-1926 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Transport.parseSseStreamWithIdleTimeout (cyclomatic 24) src/AcpRuntime/Transport.fs:270— Transport.parseSseStreamWithIdleTimeout 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.
Transport.parseSseStreamWithIdleTimeout (cyclomatic 24) src/McpClient/Transport.fs:121— Transport.parseSseStreamWithIdleTimeout 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.
Transport.parseSseStreamWithIdleTimeout (cognitive 45) src/AcpRuntime/Transport.fs:270— Transport.parseSseStreamWithIdleTimeout has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (31 pts), match/switch 3 (10 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Transport.parseSseStreamWithIdleTimeout (cognitive 45) src/McpClient/Transport.fs:121— Transport.parseSseStreamWithIdleTimeout has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (31 pts), match/switch 3 (10 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (20 lines × 2) src/AcpRuntime/Client.fs:390— src/AcpRuntime/Client.fs:390-409 | src/AcpRuntime/Client.fs:426-445 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) src/UnifiedLlm/Caching.fs:218— src/UnifiedLlm/Caching.fs:218-237 | src/UnifiedLlm/Caching.fs:387-406 — both copies are in the same file, so extract the 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 (15–16 lines × 2) src/AcpRuntime/Transport.fs:846— src/AcpRuntime/Transport.fs:846-860 | src/McpClient/Transport.fs:547-562 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/AcpRuntime/Transport.fs:846` 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 (15–16 lines × 2) src/UnifiedLlm/Generation.fs:721— src/UnifiedLlm/Generation.fs:721-736 | src/UnifiedLlm/Generation.fs:1006-1020 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/Attractor/Engine.fs:868— src/Attractor/Engine.fs:868-881 | src/Attractor/Engine.fs:1072-1085 — both copies are in the same file, so extract the 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) src/UnifiedLlm/Client.fs:133— src/UnifiedLlm/Client.fs:133-146 | src/UnifiedLlm/Client.fs:159-172 — both copies are in the same file, so extract the 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) src/AcpRuntime/Transport.fs:754— src/AcpRuntime/Transport.fs:754-766 | src/McpClient/Transport.fs:443-455 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (13 lines × 2) src/UnifiedLlm/HttpAdapters.fs:841— src/UnifiedLlm/HttpAdapters.fs:841-853 | src/UnifiedLlm/HttpAdapters.fs:2160-2172 — both copies are in the same file, so extract the 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–12 lines × 2) src/Attractor/Engine.fs:855— src/Attractor/Engine.fs:855-866 | src/Attractor/Engine.fs:1050-1059 — both copies are in the same file, so extract the 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 `src/Attractor/Engine.fs:855` 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–12 lines × 2) src/Attractor/Interviewer.fs:326— src/Attractor/Interviewer.fs:326-335 | src/Attractor/Interviewer.fs:347-358 — both copies are in the same file, so extract the 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–12 lines × 2) src/Attractor/Engine.fs:1015— src/Attractor/Engine.fs:1015-1026 | src/Attractor/Engine.fs:1726-1734 — both copies are in the same file, so extract the 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 (9–12 lines × 2) src/UnifiedLlm/HttpAdapters.fs:1202— src/UnifiedLlm/HttpAdapters.fs:1202-1213 | src/UnifiedLlm/HttpAdapters.fs:1743-1751 — both copies are in the same file, so extract the 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 `src/UnifiedLlm/HttpAdapters.fs:1202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Engine.run (cyclomatic 87) src/Attractor/Engine.fs:788— Engine.run has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OpenAIAdapter.UnifiedLlm.IProviderAdapter.Stream (cyclomatic 80) src/UnifiedLlm/HttpAdapters.fs:1740— OpenAIAdapter.UnifiedLlm.IProviderAdapter.Stream has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Client.create (cyclomatic 65) src/AcpRuntime/Client.fs:296— Client.create has cyclomatic complexity 65 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Engine.resumeFromCheckpoint (cyclomatic 58) src/Attractor/Engine.fs:1512— Engine.resumeFromCheckpoint has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Server.createServerWithTransport (cyclomatic 52) src/McpClient/Server.fs:54— Server.createServerWithTransport 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.
AnthropicAdapter.UnifiedLlm.IProviderAdapter.Stream (cyclomatic 45) src/UnifiedLlm/HttpAdapters.fs:1198— AnthropicAdapter.UnifiedLlm.IProviderAdapter.Stream 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.
Validation.generateSynopsis (cyclomatic 39) src/Attractor/Validation.fs:870— Validation.generateSynopsis has cyclomatic complexity 39 (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.
OpenRouterAdapter.UnifiedLlm.IProviderAdapter.Stream (cyclomatic 39) src/UnifiedLlm/HttpAdapters.fs:3252— OpenRouterAdapter.UnifiedLlm.IProviderAdapter.Stream has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PatchApplier.applyPatch (cyclomatic 38) src/CodingAgent/Session.fs:135— PatchApplier.applyPatch has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CodingAgentHandler.Attractor.IHandler.Execute (cyclomatic 37) src/Attractor/Handlers.fs:514— CodingAgentHandler.Attractor.IHandler.Execute has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConsoleInterviewer.Attractor.IInterviewer.Ask (cyclomatic 37) src/Attractor/Interviewer.fs:120— ConsoleInterviewer.Attractor.IInterviewer.Ask has cyclomatic complexity 37 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
DefaultDelegate.createDefaultDelegate (cyclomatic 36) src/AcpRuntime/DefaultDelegate.fs:183— DefaultDelegate.createDefaultDelegate has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Program.serve (cyclomatic 34) src/Attractor.Cli/Program.fs:1098— Program.serve 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.
RequestValidatorModule.fromCatalog (cyclomatic 34) src/UnifiedLlm/Validation.fs:121— RequestValidatorModule.fromCatalog has cyclomatic complexity 34 (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.
Transport.createStdioTransport (cyclomatic 31) src/AcpRuntime/Transport.fs:427— Transport.createStdioTransport 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.
GeminiAdapter.UnifiedLlm.IProviderAdapter.Stream (cyclomatic 31) src/UnifiedLlm/HttpAdapters.fs:2597— GeminiAdapter.UnifiedLlm.IProviderAdapter.Stream 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.
Transport.createHttpSseTransport (cyclomatic 28) src/AcpRuntime/Transport.fs:752— Transport.createHttpSseTransport has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Checkpoint.dispatch (cyclomatic 27) src/Attractor.Cli/Checkpoint.fs:376— Checkpoint.dispatch has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Codec.decode (cyclomatic 26) src/JsonRpc/Codec.fs:105— Codec.decode 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.
CacheStoreModule.fileSystem (cyclomatic 26) src/UnifiedLlm/Caching.fs:767— CacheStoreModule.fileSystem 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.
LlmBackend.Attractor.ICodergenBackend.Run (cyclomatic 25) src/Attractor.Cli/Program.fs:46— LlmBackend.Attractor.ICodergenBackend.Run 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.
Lexer.tokenize (cyclomatic 25) src/Attractor/DotParser.fs:171— Lexer.tokenize 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.
HttpAdapterHelpers.responseFromOpenAI (cyclomatic 25) src/UnifiedLlm/HttpAdapters.fs:615— HttpAdapterHelpers.responseFromOpenAI 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.
Transport.createStdioTransport (cyclomatic 25) src/McpClient/Transport.fs:279— Transport.createStdioTransport 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.
Program.parseArgs (cyclomatic 24) src/Attractor.Cli/Program.fs:607— Program.parseArgs 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.
Context.Project (cyclomatic 24) src/Attractor/Types.fs:752— Context.Project 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.
ConsoleEventObserver.Attractor.IEventObserver.OnEvent (cyclomatic 23) src/Attractor.Cli/Program.fs:201— ConsoleEventObserver.Attractor.IEventObserver.OnEvent 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.
Lexer.readNumber (cyclomatic 23) src/Attractor/DotParser.fs:129— Lexer.readNumber has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Session.ProcessInput (cyclomatic 23) src/CodingAgent/Session.fs:1119— Session.ProcessInput 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.
Generation.generateInternal (cyclomatic 23) src/UnifiedLlm/Generation.fs:632— Generation.generateInternal has cyclomatic complexity 23 (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.
Transport.createHttpSseTransport (cyclomatic 23) src/McpClient/Transport.fs:440— Transport.createHttpSseTransport has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Transport.createWebSocketTransport (cyclomatic 22) src/AcpRuntime/Transport.fs:624— Transport.createWebSocketTransport has cyclomatic complexity 22 (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.
Program.main (cyclomatic 22) src/Attractor.Cli/Program.fs:1305— Program.main has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ToolHandler.Attractor.IHandler.Execute (cyclomatic 22) src/Attractor/Handlers.fs:1096— ToolHandler.Attractor.IHandler.Execute 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.
WaitForHumanHandler.Attractor.IHandler.Execute (cyclomatic 21) src/Attractor/Handlers.fs:783— WaitForHumanHandler.Attractor.IHandler.Execute 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.
McpToolHandler.Attractor.IHandler.Execute (cyclomatic 21) src/Attractor/McpHandlers.fs:164— McpToolHandler.Attractor.IHandler.Execute 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.
HttpAdapterHelpers.responseFromGemini (cyclomatic 20) src/UnifiedLlm/HttpAdapters.fs:762— HttpAdapterHelpers.responseFromGemini 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.
Lexer.stripComments (cyclomatic 19) src/Attractor/DotParser.fs:37— Lexer.stripComments 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.
DotParser.buildGraph (cyclomatic 19) src/Attractor/DotParser.fs:466— DotParser.buildGraph 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.
Generation.streamWithControl (cyclomatic 19) src/UnifiedLlm/Generation.fs:926— Generation.streamWithControl 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.
Engine.executeWithRetry (cyclomatic 18) src/Attractor/Engine.fs:517— Engine.executeWithRetry 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.
ContextPrompt.preparePromptContext (cyclomatic 17) src/Attractor/ContextPrompt.fs:30— ContextPrompt.preparePromptContext 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.
ledger.main (cyclomatic 17) docs/sprints/ledger.py:223— ledger.main 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.
Checkpoint.setOutcome (cyclomatic 16) src/Attractor.Cli/Checkpoint.fs:163— Checkpoint.setOutcome 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.
LocalExecutionEnvironment.CodingAgent.IExecutionEnvironment.Grep (cyclomatic 16) src/CodingAgent/ExecutionEnvironment.fs:270— LocalExecutionEnvironment.CodingAgent.IExecutionEnvironment.Grep has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SseParsing.parseWithIdleTimeout (cyclomatic 16) src/UnifiedLlm/HttpAdapters.fs:54— SseParsing.parseWithIdleTimeout has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Engine.run (cognitive 309) src/Attractor/Engine.fs:788— Engine.run has cognitive complexity 309 (threshold 15). Drivers by points: if/else 58 (184 pts), match/switch 23 (105 pts), boolean chains 11, loops 2 (9 pts) (nesting depth added 215). 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.
OpenAIAdapter.UnifiedLlm.IProviderAdapter.Stream (cognitive 180) src/UnifiedLlm/HttpAdapters.fs:1740— OpenAIAdapter.UnifiedLlm.IProviderAdapter.Stream has cognitive complexity 180 (threshold 15). Drivers by points: if/else 30 (118 pts), match/switch 9 (39 pts), boolean chains 9, loops 3 (9 pts), error handling 1 (5 pts) (nesting depth added 128). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenRouterAdapter.UnifiedLlm.IProviderAdapter.Stream (cognitive 145) src/UnifiedLlm/HttpAdapters.fs:3252— OpenRouterAdapter.UnifiedLlm.IProviderAdapter.Stream has cognitive complexity 145 (threshold 15). Drivers by points: if/else 27 (82 pts), match/switch 9 (48 pts), loops 6 (15 pts) (nesting depth added 103). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Engine.resumeFromCheckpoint (cognitive 126) src/Attractor/Engine.fs:1512— Engine.resumeFromCheckpoint has cognitive complexity 126 (threshold 15). Drivers by points: match/switch 15 (60 pts), if/else 28 (56 pts), loops 6, boolean chains 4 (nesting depth added 73). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AnthropicAdapter.UnifiedLlm.IProviderAdapter.Stream (cognitive 116) src/UnifiedLlm/HttpAdapters.fs:1198— AnthropicAdapter.UnifiedLlm.IProviderAdapter.Stream has cognitive complexity 116 (threshold 15). Drivers by points: if/else 17 (70 pts), match/switch 10 (44 pts), boolean chains 1, loops 1 (nesting depth added 87). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeminiAdapter.UnifiedLlm.IProviderAdapter.Stream (cognitive 104) src/UnifiedLlm/HttpAdapters.fs:2597— GeminiAdapter.UnifiedLlm.IProviderAdapter.Stream has cognitive complexity 104 (threshold 15). Drivers by points: if/else 14 (51 pts), match/switch 8 (46 pts), loops 3 (7 pts) (nesting depth added 79). 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.
Client.create (cognitive 90) src/AcpRuntime/Client.fs:296— Client.create has cognitive complexity 90 (threshold 15). Drivers by points: match/switch 25 (81 pts), if/else 2 (6 pts), loops 1 (3 pts) (nesting depth added 62). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PatchApplier.applyPatch (cognitive 88) src/CodingAgent/Session.fs:135— PatchApplier.applyPatch has cognitive complexity 88 (threshold 15). Drivers by points: if/else 21 (46 pts), match/switch 11 (34 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.createServerWithTransport (cognitive 79) src/McpClient/Server.fs:54— Server.createServerWithTransport has cognitive complexity 79 (threshold 15). Drivers by points: match/switch 22 (69 pts), if/else 3 (8 pts), boolean chains 2 (nesting depth added 52). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Engine.executeWithRetry (cognitive 76) src/Attractor/Engine.fs:517— Engine.executeWithRetry has cognitive complexity 76 (threshold 15). Drivers by points: if/else 22 (64 pts), loops 2 (7 pts), match/switch 1 (3 pts), boolean chains 2 (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.
CodingAgentHandler.Attractor.IHandler.Execute (cognitive 69) src/Attractor/Handlers.fs:514— CodingAgentHandler.Attractor.IHandler.Execute has cognitive complexity 69 (threshold 15). Drivers by points: if/else 32 (50 pts), match/switch 3 (7 pts), boolean chains 6, error handling 3 (6 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Transport.createStdioTransport (cognitive 63) src/AcpRuntime/Transport.fs:427— Transport.createStdioTransport has cognitive complexity 63 (threshold 15). Drivers by points: if/else 18 (40 pts), error handling 6 (14 pts), match/switch 6 (8 pts), boolean chains 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DefaultDelegate.createDefaultDelegate (cognitive 59) src/AcpRuntime/DefaultDelegate.fs:183— DefaultDelegate.createDefaultDelegate has cognitive complexity 59 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 14 (22 pts), loops 2 (7 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 29). 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.
McpToolHandler.Attractor.IHandler.Execute (cognitive 58) src/Attractor/McpHandlers.fs:164— McpToolHandler.Attractor.IHandler.Execute has cognitive complexity 58 (threshold 15). Drivers by points: match/switch 8 (38 pts), if/else 7 (20 pts) (nesting depth added 43). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ToolHandler.Attractor.IHandler.Execute (cognitive 56) src/Attractor/Handlers.fs:1096— ToolHandler.Attractor.IHandler.Execute has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (31 pts), match/switch 5 (16 pts), error handling 2 (6 pts), loops 1 (3 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Checkpoint.dispatch (cognitive 54) src/Attractor.Cli/Checkpoint.fs:376— Checkpoint.dispatch has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (26 pts), match/switch 6 (22 pts), loops 2 (6 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WaitForHumanHandler.Attractor.IHandler.Execute (cognitive 54) src/Attractor/Handlers.fs:783— WaitForHumanHandler.Attractor.IHandler.Execute has cognitive complexity 54 (threshold 15). Drivers by points: if/else 23 (43 pts), error handling 2 (6 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Codec.decode (cognitive 49) src/JsonRpc/Codec.fs:105— Codec.decode has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 9 (38 pts), if/else 4 (8 pts), error handling 3 (nesting depth added 33). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ConsoleInterviewer.Attractor.IInterviewer.Ask (cognitive 49) src/Attractor/Interviewer.fs:120— ConsoleInterviewer.Attractor.IInterviewer.Ask has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (24 pts), match/switch 6 (13 pts), boolean chains 8, loops 2 (4 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.
RequestValidatorModule.fromCatalog (cognitive 49) src/UnifiedLlm/Validation.fs:121— RequestValidatorModule.fromCatalog has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 8 (16 pts), boolean chains 8, loops 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Transport.createStdioTransport (cognitive 48) src/McpClient/Transport.fs:279— Transport.createStdioTransport has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (28 pts), error handling 5 (12 pts), match/switch 5 (7 pts), boolean chains 1 (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.
Session.ProcessInput (cognitive 47) src/CodingAgent/Session.fs:1119— Session.ProcessInput has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (36 pts), boolean chains 7, match/switch 1 (3 pts), loops 1 (nesting depth added 21). 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.
Program.serve (cognitive 46) src/Attractor.Cli/Program.fs:1098— Program.serve has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 8 (14 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Program.main (cognitive 46) src/Attractor.Cli/Program.fs:1305— Program.main has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (31 pts), error handling 3 (9 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Engine.loadCheckpoint (cognitive 45) src/Attractor/Engine.fs:1388— Engine.loadCheckpoint has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (39 pts), match/switch 1 (4 pts), error handling 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.
CacheStoreModule.fileSystem (cognitive 44) src/UnifiedLlm/Caching.fs:767— CacheStoreModule.fileSystem has cognitive complexity 44 (threshold 15). Drivers by points: match/switch 9 (18 pts), if/else 10 (13 pts), error handling 2 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Validation.generateSynopsis (cognitive 43) src/Attractor/Validation.fs:870— Validation.generateSynopsis has cognitive complexity 43 (threshold 15). Drivers by points: if/else 23 (26 pts), boolean chains 9, loops 2 (5 pts), match/switch 2 (3 pts) (nesting depth added 7). 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.
HttpAdapterHelpers.responseFromGemini (cognitive 43) src/UnifiedLlm/HttpAdapters.fs:762— HttpAdapterHelpers.responseFromGemini has cognitive complexity 43 (threshold 15). Drivers by points: match/switch 9 (38 pts), loops 1 (3 pts), if/else 2 (nesting depth added 31). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ContextPrompt.preparePromptContext (cognitive 39) src/Attractor/ContextPrompt.fs:30— ContextPrompt.preparePromptContext has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 2, match/switch 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.
Transport.createHttpSseTransport (cognitive 38) src/AcpRuntime/Transport.fs:752— Transport.createHttpSseTransport has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (26 pts), match/switch 4 (5 pts), loops 2 (3 pts), boolean chains 2, error handling 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Generation.validateJsonAgainstSchema (cognitive 36) src/UnifiedLlm/Generation.fs:810— Generation.validateJsonAgainstSchema has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 2 (5 pts) (nesting depth added 22). 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.
EdgeSelection.selectEdge (cognitive 35) src/Attractor/Engine.fs:94— EdgeSelection.selectEdge has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (27 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LlmBackend.Attractor.ICodergenBackend.Run (cognitive 34) src/Attractor.Cli/Program.fs:46— LlmBackend.Attractor.ICodergenBackend.Run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (18 pts), match/switch 5 (11 pts), error handling 3, boolean chains 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Context.Project (cognitive 34) src/Attractor/Types.fs:752— Context.Project has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 5 (9 pts), boolean chains 2, match/switch 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Generation.generateInternal (cognitive 34) src/UnifiedLlm/Generation.fs:632— Generation.generateInternal has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 8 (13 pts), loops 2 (4 pts), boolean chains 3 (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.
Conditions.validate (cognitive 33) src/Attractor/Conditions.fs:90— Conditions.validate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 19). 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.
SseParsing.parseWithIdleTimeout (cognitive 33) src/UnifiedLlm/HttpAdapters.fs:54— SseParsing.parseWithIdleTimeout has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (30 pts), error handling 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Engine.executePrimaryWithRetry (cognitive 31) src/Attractor/Engine.fs:438— Engine.executePrimaryWithRetry has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 2 (5 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Generation.validateToolArguments (cognitive 31) src/UnifiedLlm/Generation.fs:482— Generation.validateToolArguments has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (30 pts), match/switch 1 (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.
DotParser.buildGraph (cognitive 30) src/Attractor/DotParser.fs:466— DotParser.buildGraph has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 4 (11 pts), loops 4 (10 pts), if/else 3 (9 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Transport.createWebSocketTransport (cognitive 29) src/AcpRuntime/Transport.fs:624— Transport.createWebSocketTransport has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 6 (8 pts), error handling 2 (4 pts), loops 2 (4 pts), boolean chains 3 (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.
Generation.streamWithControl (cognitive 29) src/UnifiedLlm/Generation.fs:926— Generation.streamWithControl has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 7 (21 pts), loops 3 (7 pts), 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.
Checkpoint.setOutcome (cognitive 28) src/Attractor.Cli/Checkpoint.fs:163— Checkpoint.setOutcome has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 8 (25 pts), if/else 2 (3 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.
Lexer.stripComments (cognitive 27) src/Attractor/DotParser.fs:37— Lexer.stripComments has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (7 pts), boolean chains 6 (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.
Transport.createHttpSseTransport (cognitive 27) src/McpClient/Transport.fs:440— Transport.createHttpSseTransport has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (18 pts), match/switch 4 (5 pts), error handling 2, boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AcpHandlers.buildEndpoint (cognitive 26) src/Attractor/AcpHandlers.fs:152— AcpHandlers.buildEndpoint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 4 (8 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.
Lexer.readNumber (cognitive 26) src/Attractor/DotParser.fs:129— Lexer.readNumber has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Retry.executeWithHooks (cognitive 24) src/UnifiedLlm/Retry.fs:86— Retry.executeWithHooks has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 4 (13 pts), if/else 2 (5 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Checkpoint.markDone (cognitive 23) src/Attractor.Cli/Checkpoint.fs:89— Checkpoint.markDone has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (11 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HttpAdapterHelpers.responseFromOpenAI (cognitive 23) src/UnifiedLlm/HttpAdapters.fs:615— HttpAdapterHelpers.responseFromOpenAI has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 6 (11 pts), if/else 5 (8 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ConsoleEventObserver.Attractor.IEventObserver.OnEvent (cognitive 22) src/Attractor.Cli/Program.fs:201— ConsoleEventObserver.Attractor.IEventObserver.OnEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Checkpoint.diff (cognitive 22) src/Attractor.Cli/Checkpoint.fs:317— Checkpoint.diff has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 12). 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.
Validation.hasUnguardedPathToCommit (cognitive 22) src/Attractor/Validation.fs:842— Validation.hasUnguardedPathToCommit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalExecutionEnvironment.CodingAgent.IExecutionEnvironment.Grep (cognitive 22) src/CodingAgent/ExecutionEnvironment.fs:270— LocalExecutionEnvironment.CodingAgent.IExecutionEnvironment.Grep has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalExecutionEnvironment.CodingAgent.IExecutionEnvironment.ExecCommand (cognitive 21) src/CodingAgent/ExecutionEnvironment.fs:178— LocalExecutionEnvironment.CodingAgent.IExecutionEnvironment.ExecCommand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 2 (5 pts), loops 2 (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.
Program.validate (cognitive 19) src/Attractor.Cli/Program.fs:695— Program.validate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Duration.TryParse (cognitive 17) src/Attractor/Types.fs:20— Duration.TryParse has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 6, boolean chains 1 (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.
CacheKeyModule.writeProviderOptions (cognitive 17) src/UnifiedLlm/Caching.fs:111— CacheKeyModule.writeProviderOptions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), error handling 1 (5 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Program.makeRegistry (cognitive 16) src/Attractor.Cli/Program.fs:777— Program.makeRegistry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 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.
Validation.suggestAttribute (cognitive 16) src/Attractor/Validation.fs:571— Validation.suggestAttribute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProjectDocs.discover (cognitive 16) src/CodingAgent/SystemPrompt.fs:81— ProjectDocs.discover has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JsonSchemaValidation.validatePropertyTypes (cognitive 16) src/CodingAgent/ToolRegistry.fs:74— JsonSchemaValidation.validatePropertyTypes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (5 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.
Near-duplicate member pair (392 shared lines) src/AcpRuntime/Transport.fs:1— src/AcpRuntime/Transport.fs:1-929 | src/McpClient/Transport.fs:1-617 — These two members are variants of one another: 392 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Duplicated block (77–78 lines × 2) src/AcpRuntime/Transport.fs:343— src/AcpRuntime/Transport.fs:343-419 | src/McpClient/Transport.fs:195-272 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/AcpRuntime/Transport.fs:343` 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, `src/AcpRuntime/Transport.fs:420` calls `Cancel` and `src/McpClient/Transport.fs:273` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (77 lines × 2) src/AcpRuntime/Transport.fs:249— src/AcpRuntime/Transport.fs:249-325 | src/McpClient/Transport.fs:100-176 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/AcpRuntime/Transport.fs:249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (55 lines × 2) src/Attractor/Engine.fs:543— src/Attractor/Engine.fs:543-597 | src/Attractor/Engine.fs:598-652 — both copies are in the same file, so extract the 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 `src/Attractor/Engine.fs:543` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (47–49 lines × 2) src/Attractor.Cli/Checkpoint.fs:177— src/Attractor.Cli/Checkpoint.fs:177-225 | src/Attractor.Cli/Checkpoint.fs:229-275 — both copies are in the same file, so extract the 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 (45–48 lines × 2) src/AcpRuntime/Transport.fs:503— src/AcpRuntime/Transport.fs:503-547 | src/McpClient/Transport.fs:343-390 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/AcpRuntime/Transport.fs:503` it does not close everything it opens, so those 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 (38 lines × 2) src/AcpRuntime/Transport.fs:569— src/AcpRuntime/Transport.fs:569-606 | src/McpClient/Transport.fs:394-431 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/AcpRuntime/Transport.fs:569` 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 (31–32 lines × 2) src/Attractor.Cli/Checkpoint.fs:97— src/Attractor.Cli/Checkpoint.fs:97-128 | src/Attractor.Cli/Checkpoint.fs:131-161 — both copies are in the same file, so extract the 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 (25–27 lines × 2) src/AcpRuntime/Transport.fs:817— src/AcpRuntime/Transport.fs:817-843 | src/McpClient/Transport.fs:519-543 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (20–26 lines × 2) src/AcpRuntime/Transport.fs:82— src/AcpRuntime/Transport.fs:82-101 | src/McpClient/Transport.fs:63-88 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/McpClient/Transport.fs:60` calls `stderrText`, `buffer`, `fun` and `src/AcpRuntime/Transport.fs:80` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (24–25 lines × 2) src/AcpRuntime/Transport.fs:904— src/AcpRuntime/Transport.fs:904-928 | src/McpClient/Transport.fs:593-616 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/AcpRuntime/Transport.fs:904` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/AcpRuntime/Transport.fs:902` calls `Cancel` and `src/McpClient/Transport.fs:591` 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 (25 lines × 2) src/Attractor/AcpHandlers.fs:49— src/Attractor/AcpHandlers.fs:49-73 | src/Attractor/Handlers.fs:123-147 — 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 (24 lines × 3) src/Attractor/AcpHandlers.fs:14— src/Attractor/AcpHandlers.fs:14-37 | src/Attractor/Handlers.fs:149-172 | src/Attractor/McpHandlers.fs:11-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Attractor/AcpHandlers.fs:12` calls `JsonSerializerOptions` and `src/Attractor/McpHandlers.fs:9` 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 (23–24 lines × 2) src/Attractor/Engine.fs:1256— src/Attractor/Engine.fs:1256-1279 | src/Attractor/Engine.fs:1557-1579 — both copies are in the same file, so extract the 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) src/Attractor/Engine.fs:1365— src/Attractor/Engine.fs:1365-1388 | src/Attractor/Engine.fs:1778-1801 — both copies are in the same file, so extract the 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 (22–24 lines × 2) src/Attractor/Engine.fs:1694— src/Attractor/Engine.fs:1694-1715 | src/Attractor/Engine.fs:1746-1769 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Attractor/Engine.fs:1771` calls `Fail` and `src/Attractor/Engine.fs:1716` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (22 lines × 3) src/AcpRuntime/Transport.fs:238— src/AcpRuntime/Transport.fs:238-259 | src/McpClient/Transport.fs:89-110 | src/UnifiedLlm/HttpAdapters.fs:20-41 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (17–20 lines × 2) src/AcpRuntime/Transport.fs:794— src/AcpRuntime/Transport.fs:794-810 | src/McpClient/Transport.fs:493-512 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/AcpRuntime/Transport.fs:794` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–19 lines × 3) src/Attractor/Engine.fs:943— src/Attractor/Engine.fs:943-961 | src/Attractor/Engine.fs:1207-1224 | src/Attractor/Engine.fs:1634-1649 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Attractor/Engine.fs:1207` calls `Set` and `src/Attractor/Engine.fs:943` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19 lines × 2) src/UnifiedLlm/Caching.fs:264— src/UnifiedLlm/Caching.fs:264-282 | src/UnifiedLlm/Caching.fs:428-446 — both copies are in the same file, so extract the 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) src/Attractor.Cli/Checkpoint.fs:411— src/Attractor.Cli/Checkpoint.fs:411-428 | src/Attractor.Cli/Checkpoint.fs:445-462 — both copies are in the same file, so extract the 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 `src/Attractor.Cli/Checkpoint.fs:411` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) src/UnifiedLlm/HttpAdapters.fs:1621— src/UnifiedLlm/HttpAdapters.fs:1621-1637 | src/UnifiedLlm/HttpAdapters.fs:3015-3031 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–16 lines × 2) src/AcpRuntime/Transport.fs:65— src/AcpRuntime/Transport.fs:65-80 | src/McpClient/Transport.fs:45-58 — `src/AcpRuntime/Transport.fs` and `src/McpClient/Transport.fs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 417 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/McpClient/Transport.fs:60` calls `stderrText`, `buffer`, `fun` and `src/AcpRuntime/Transport.fs:82` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) src/CodingAgent/ProviderProfile.fs:241— src/CodingAgent/ProviderProfile.fs:241-254 | src/CodingAgent/ProviderProfile.fs:293-306 | src/CodingAgent/ProviderProfile.fs:347-360 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13–14 lines × 2) src/Attractor/Handlers.fs:477— src/Attractor/Handlers.fs:477-489 | src/Attractor/Handlers.fs:494-507 — both copies are in the same file, so extract the 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–12 lines × 2) src/AcpRuntime/Client.fs:238— src/AcpRuntime/Client.fs:238-248 | src/JsonRpc/Correlator.fs:42-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 (10–11 lines × 2) src/Attractor/Engine.fs:968— src/Attractor/Engine.fs:968-978 | src/Attractor/Engine.fs:1232-1241 — both copies are in the same file, so extract the 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 (10 lines × 3) src/UnifiedLlm/HttpAdapters.fs:1207— src/UnifiedLlm/HttpAdapters.fs:1207-1216 | src/UnifiedLlm/HttpAdapters.fs:1745-1754 | src/UnifiedLlm/HttpAdapters.fs:2608-2617 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) src/CodingAgent/ProviderProfile.fs:230— src/CodingAgent/ProviderProfile.fs:230-238 | src/CodingAgent/ProviderProfile.fs:282-290 | src/CodingAgent/ProviderProfile.fs:336-344 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14–15 lines × 3) src/UnifiedLlm/HttpAdapters.fs:1014— src/UnifiedLlm/HttpAdapters.fs:1014-1028 | src/UnifiedLlm/HttpAdapters.fs:1624-1637 | src/UnifiedLlm/HttpAdapters.fs:3018-3031 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (16 lines × 3) src/UnifiedLlm/ProviderAdapter.fs:87— src/UnifiedLlm/ProviderAdapter.fs:87-102 | src/UnifiedLlm/ProviderAdapter.fs:134-149 | src/UnifiedLlm/ProviderAdapter.fs:181-196 — 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 `src/UnifiedLlm/ProviderAdapter.fs:87` 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) src/UnifiedLlm/HttpAdapters.fs:1621— src/UnifiedLlm/HttpAdapters.fs:1621-1631 | src/UnifiedLlm/HttpAdapters.fs:2478-2488 | src/UnifiedLlm/HttpAdapters.fs:3015-3025 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) src/CodingAgent/Session.fs:160— src/CodingAgent/Session.fs:160-165 | src/CodingAgent/Session.fs:169-174 | src/CodingAgent/Session.fs:178-183 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 2) src/UnifiedLlm/Caching.fs:500— src/UnifiedLlm/Caching.fs:500-505 | src/UnifiedLlm/Caching.fs:513-518 — both copies are in the same file, so extract the 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 × 3) src/UnifiedLlm/ProviderAdapter.fs:79— src/UnifiedLlm/ProviderAdapter.fs:79-83 | src/UnifiedLlm/ProviderAdapter.fs:126-130 | src/UnifiedLlm/ProviderAdapter.fs:173-177 — 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 `src/UnifiedLlm/ProviderAdapter.fs:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
No structured logging — No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
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.
Duplicated predicate src/AcpRuntime/Transport.fs:521— `completed || effectiveToken.IsCancellationRequested` appears character-identically in 2 files — src/AcpRuntime/Transport.fs, src/McpClient/Transport.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 src/AcpRuntime/Transport.fs:340— `keepReading && nextEvent.IsNone && not effectiveToken.IsCancellationRequested` appears character-identically in 2 files — src/AcpRuntime/Transport.fs, src/McpClient/Transport.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 src/CodingAgent/ExecutionEnvironment.fs:141— `not (String.IsNullOrEmpty(dir)) && not (Directory.Exists(dir))` appears character-identically in 2 files — src/CodingAgent/ExecutionEnvironment.fs, src/CodingAgent/Session.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 src/AcpRuntime/DefaultDelegate.fs:220— `not (String.IsNullOrWhiteSpace(dir)) && not (Directory.Exists(dir))` appears character-identically in 3 files — src/AcpRuntime/DefaultDelegate.fs, src/CodingAgent/SessionPersistence.fs, src/UnifiedLlm/Observability.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.
Outdated: coverlet.collector tests/AcpRuntime.Tests/AcpRuntime.Tests.fsproj:15— coverlet.collector 6.0.4 → 10.1.0 available (referenced by CodingAgent.Tests).
D21 · Naming Consistency· `external shim python snippet patches checkpoint fixture without corrupting JSON` spells `JSON` where 29 names in the project spell it `Json` · ×1
`external shim python snippet patches checkpoint fixture without corrupting JSON` spells `JSON` where 29 names in the project spell it `Json` tests/Attractor.Tests/Sprint014ValidationTests.fs:407— 29 of 30 names in project analyzers spell the token `Json` (29 of 30; unit: names in project analyzers containing `Json`). Peers: PromptMetadata.McpServersJson (src/AcpRuntime/Types.fs:89); Program.writeJson (src/Attractor.Cli/Program.fs:1079); AcpHandlers.parseArgsJson (src/Attractor/AcpHandlers.fs:92); AcpHandlers.resolveMcpServersJson (src/Attractor/AcpHandlers.fs:121); Engine.tryGetJsonString (src/Attractor/Engine.fs:687). Rename to `external shim python snippet patches checkpoint fixture without corrupting Json`. [rule N6]
D21 · Naming Consistency· `Events have correct session ID` spells `ID` where 77 names in the project spell it `Id` · ×1
`Events have correct session ID` spells `ID` where 77 names in the project spell it `Id` tests/CodingAgent.Tests/Tests.fs:1497— 77 of 79 names in project analyzers spell the token `Id` (77 of 79; unit: names in project analyzers containing `Id`). Peers: ClientState.NextId (src/AcpRuntime/Client.fs:44); AcpClient.Prompt(sessionId) (src/AcpRuntime/Client.fs:53); AcpClient.Cancel(sessionId) (src/AcpRuntime/Client.fs:58); Client.serializePromptRequest(sessionId) (src/AcpRuntime/Client.fs:77); Client.serializeCancelRequest(sessionId) (src/AcpRuntime/Client.fs:97). Rename to `Events have correct session Id`. [rule N6]
D21 · Naming Consistency· `OpenAI continuation sends only tool outputs with previous response ID` spells `ID` where 77 names in the project spell it `Id` · ×1
`OpenAI continuation sends only tool outputs with previous response ID` spells `ID` where 77 names in the project spell it `Id` tests/UnifiedLlm.Tests/CapabilityTests.fs:327— 77 of 79 names in project analyzers spell the token `Id` (77 of 79; unit: names in project analyzers containing `Id`). Peers: ClientState.NextId (src/AcpRuntime/Client.fs:44); AcpClient.Prompt(sessionId) (src/AcpRuntime/Client.fs:53); AcpClient.Cancel(sessionId) (src/AcpRuntime/Client.fs:58); Client.serializePromptRequest(sessionId) (src/AcpRuntime/Client.fs:77); Client.serializeCancelRequest(sessionId) (src/AcpRuntime/Client.fs:97). Rename to `OpenAI continuation sends only tool outputs with previous response Id`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 8 project(s) overshoot their size bounds, lowering Project Cohesion to 8.3/10. The most over is `src/UnifiedLlm` (7545 LoC, 139 module-visible types across 1 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.
No SAST REDACTED:6— 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 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation src/JsonRpc/JsonRpc.fsproj:15— `src/JsonRpc/JsonRpc.fsproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Outdated: FSharp.Core — FSharp.Core 10.1.400 → 11.0.101 available (referenced by CodingAgent).
Outdated: Microsoft.NET.Test.Sdk — Microsoft.NET.Test.Sdk 17.14.1 → 18.12.0 available (referenced by CodingAgent.Tests).
Outdated: xunit.runner.visualstudio — xunit.runner.visualstudio 3.1.4 → 4.0.1 available (referenced by CodingAgent.Tests).
Outdated: Microsoft.Extensions.TimeProvider.Testing — Microsoft.Extensions.TimeProvider.Testing 10.0.0 → 11.0.0 available (referenced by UnifiedLlm.Tests).
Outdated: FSharp.Control.TaskSeq — FSharp.Control.TaskSeq 1.0.0 → 1.1.1 available (referenced by JsonRpc).
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.
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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1df0a-8f55-724b-a415-1bd2155c4234 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 5 · Warnings: 220 · Recommendations: 13 · Info: 5 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 15-11-2026 @ 11:49 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.