Public report of apple/container, published 11 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.2). 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, 11 November 2026, 07:28 UTC · Survey ID cd_b6dbd7db010b463ab95b259641afba14
apple/container
Measured 11 November 2026, 07:27 UTC, at code version d6f107c
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 2 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: 43,031 lines of product code in 43 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Security and Compliance, 55
Findings by how serious they are
13 critical420 serious20 minor
38 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
11 November 2026, 07:27 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 ▸
41of 41 dimensions measured by tools.
429of 453 findings point to an exact file and line, so you can open each one in the code. The other 24 concern the repository as a whole, such as missing documentation.
41dimensions across 6 lenses, read from 43,031 lines of product code in 43 projects.
apple/container falls short of our standard for production, in part because it has secrets exposed to more of the pipeline than needed. It scores 63 out of 100 and is rated Adequate, and all 13 of its critical findings are security problems.
Security and Compliance, at 55, is the weakest lens and counts most in the score. The best first step is fixing the product with no limit on what it can connect to, worth about 3 points. Fixing the four secrets exposed to more of the pipeline than needed would lift Security and Compliance itself, also worth about 3. Raising Security and Compliance to 70 would lift the score to about 68.
Four secrets can leak from the build pipeline. Four settings leave the servers or containers unsafe, and two pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Limiting each secret to its own step, correcting the unsafe settings and pinning each tool to an exact version would close these risks. Correcting the flagged pipeline settings would fix the two weaknesses in the build pipeline's configuration, and setting a waiting period for automatic updates would deal with the automatic dependency update that takes a new release at once.
The product code is 43,031 lines, about €77,000 to rebuild. Two of our security checks couldn't finish, among them the one for known security holes in its packages, so those results are missing, not clean passes.
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.
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: 54 findings
These 54 critical or serious findings were in the previous survey, on 23 October 2026, and are gone from this one.
€25,000 to €130,000, for 425 to 1,348 hours of work, about 0.5 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.9 at a score of 63. 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: 43,031 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 No network policy finding(s) in Network Egress Confinement.
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 3 points · Low effort · ADR Quality
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €77,000 to build again, about 0.5 person-years of work. Its weakest lens is Security and Compliance, at 55 (Adequate). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No network policy finding(s) in Network Egress Confinement. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 Network Egress Confinement findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — 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.
19 modules, with 68 dependencies between them. One loop runs through 11 of the modules, marked above the diagonal.
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.
TerminalProgress uses ContainerBuild, so a change to ContainerBuild can break TerminalProgress, while a change to TerminalProgress can't break ContainerBuild.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ContainerCluster uses TerminalProgress, so a change to TerminalProgress can break ContainerCluster, while a change to ContainerCluster can't break TerminalProgress.
Position
Below the diagonal: ContainerCluster uses a module listed above it, which is the healthy direction.
ContainerCluster uses ContainerResource, so a change to ContainerResource can break ContainerCluster, while a change to ContainerCluster can't break ContainerResource.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→11 ContainerCluster uses ContainerBuildpart of a loop✕
Connections
25 pairs of types, where a type in ContainerCluster uses a type in ContainerBuild.
ContainerCluster uses ContainerBuild, so a change to ContainerBuild can break ContainerCluster, while a change to ContainerCluster can't break ContainerBuild.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→12 ContainerCluster uses ContainerPersistencepart of a loop✕
Connections
3 pairs of types, where a type in ContainerCluster uses a type in ContainerPersistence.
ContainerCluster uses ContainerPersistence, so a change to ContainerPersistence can break ContainerCluster, while a change to ContainerCluster can't break ContainerPersistence.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1 pair of types, where a type in ContainerPlugin uses a type in TerminalProgress.
The types involved
ContainerPlugin.Plugin → TerminalProgress.Int
Direction
ContainerPlugin uses TerminalProgress, so a change to TerminalProgress can break ContainerPlugin, while a change to ContainerPlugin can't break TerminalProgress.
Position
Below the diagonal: ContainerPlugin uses a module listed above it, which is the healthy direction.
4→11 ContainerPlugin uses ContainerBuildpart of a loop✕
Connections
24 pairs of types, where a type in ContainerPlugin uses a type in ContainerBuild.
ContainerPlugin uses ContainerBuild, so a change to ContainerBuild can break ContainerPlugin, while a change to ContainerPlugin can't break ContainerBuild.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4→12 ContainerPlugin uses ContainerPersistencepart of a loop✕
Connections
2 pairs of types, where a type in ContainerPlugin uses a type in ContainerPersistence.
ContainerPlugin uses ContainerPersistence, so a change to ContainerPersistence can break ContainerPlugin, while a change to ContainerPlugin can't break ContainerPersistence.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
2 pairs of types, where a type in ContainerXPC uses a type in TerminalProgress.
The types involved
ContainerXPC.XPCMessage → TerminalProgress.Int
ContainerXPC.XPCMessage → TerminalProgress.Int64
Direction
ContainerXPC uses TerminalProgress, so a change to TerminalProgress can break ContainerXPC, while a change to ContainerXPC can't break TerminalProgress.
Position
Below the diagonal: ContainerXPC uses a module listed above it, which is the healthy direction.
ContainerXPC uses ContainerResource, so a change to ContainerResource can break ContainerXPC, while a change to ContainerXPC can't break ContainerResource.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5→11 ContainerXPC uses ContainerBuildpart of a loop✕
Connections
8 pairs of types, where a type in ContainerXPC uses a type in ContainerBuild.
SocketForwarder uses TerminalProgress, so a change to TerminalProgress can break SocketForwarder, while a change to SocketForwarder can't break TerminalProgress.
Position
Below the diagonal: SocketForwarder uses a module listed above it, which is the healthy direction.
52 pairs of types, where a type in cluster-shim~ClusterShim uses a type in TerminalProgress. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
cluster-shim~ClusterShim uses TerminalProgress, so a change to TerminalProgress can break cluster-shim~ClusterShim, while a change to cluster-shim~ClusterShim can't break TerminalProgress.
Position
Below the diagonal: cluster-shim~ClusterShim uses a module listed above it, which is the healthy direction.
7→11 cluster-shim~ClusterShim uses ContainerBuildpart of a loop✕
Connections
231 pairs of types, where a type in cluster-shim~ClusterShim uses a type in ContainerBuild. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
cluster-shim~ClusterShim uses ContainerBuild, so a change to ContainerBuild can break cluster-shim~ClusterShim, while a change to cluster-shim~ClusterShim can't break ContainerBuild.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→12 cluster-shim~ClusterShim uses ContainerPersistencepart of a loop✕
Connections
28 pairs of types, where a type in cluster-shim~ClusterShim uses a type in ContainerPersistence. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
cluster-shim~ClusterShim uses ContainerPersistence, so a change to ContainerPersistence can break cluster-shim~ClusterShim, while a change to cluster-shim~ClusterShim can't break ContainerPersistence.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
41 pairs of types, where a type in Services uses a type in ContainerXPC. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Services uses DNSServer, so a change to DNSServer can break Services, while a change to Services can't break DNSServer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→10 Services uses ContainerResourcepart of a loop✕
Connections
78 pairs of types, where a type in Services uses a type in ContainerResource. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
110 pairs of types, where a type in Services uses a type in ContainerBuild. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Services uses ContainerBuild, so a change to ContainerBuild can break Services, while a change to Services can't break ContainerBuild.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→12 Services uses ContainerPersistencepart of a loop✕
Connections
26 pairs of types, where a type in Services uses a type in ContainerPersistence. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Services uses ContainerPersistence, so a change to ContainerPersistence can break Services, while a change to Services can't break ContainerPersistence.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ContainerResource uses TerminalProgress, so a change to TerminalProgress can break ContainerResource, while a change to ContainerResource can't break TerminalProgress.
Position
Below the diagonal: ContainerResource uses a module listed above it, which is the healthy direction.
ContainerResource uses DNSServer, so a change to DNSServer can break ContainerResource, while a change to ContainerResource can't break DNSServer.
Position
Below the diagonal: ContainerResource uses a module listed above it, which is the healthy direction.
10→11 ContainerResource uses ContainerBuildpart of a loop✕
Connections
67 pairs of types, where a type in ContainerResource uses a type in ContainerBuild. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ContainerResource uses ContainerBuild, so a change to ContainerBuild can break ContainerResource, while a change to ContainerResource can't break ContainerBuild.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→12 ContainerResource uses ContainerPersistencepart of a loop✕
Connections
3 pairs of types, where a type in ContainerResource uses a type in ContainerPersistence.
ContainerResource uses ContainerPersistence, so a change to ContainerPersistence can break ContainerResource, while a change to ContainerResource can't break ContainerPersistence.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ContainerBuild uses TerminalProgress, so a change to TerminalProgress can break ContainerBuild, while a change to ContainerBuild can't break TerminalProgress.
Position
Below the diagonal: ContainerBuild uses a module listed above it, which is the healthy direction.
ContainerBuild uses cluster-shim~ClusterShim, so a change to cluster-shim~ClusterShim can break ContainerBuild, while a change to ContainerBuild can't break cluster-shim~ClusterShim.
Position
Below the diagonal: ContainerBuild uses a module listed above it, which is the healthy direction.
ContainerBuild uses ContainerResource, so a change to ContainerResource can break ContainerBuild, while a change to ContainerBuild can't break ContainerResource.
Position
Below the diagonal: ContainerBuild uses a module listed above it, which is the healthy direction.
11→12 ContainerBuild uses ContainerPersistencepart of a loop✕
Connections
9 pairs of types, where a type in ContainerBuild uses a type in ContainerPersistence.
ContainerBuild uses ContainerPersistence, so a change to ContainerPersistence can break ContainerBuild, while a change to ContainerBuild can't break ContainerPersistence.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ContainerPersistence uses TerminalProgress, so a change to TerminalProgress can break ContainerPersistence, while a change to ContainerPersistence can't break TerminalProgress.
Position
Below the diagonal: ContainerPersistence uses a module listed above it, which is the healthy direction.
ContainerPersistence uses DNSServer, so a change to DNSServer can break ContainerPersistence, while a change to ContainerPersistence can't break DNSServer.
Position
Below the diagonal: ContainerPersistence uses a module listed above it, which is the healthy direction.
ContainerPersistence uses ContainerResource, so a change to ContainerResource can break ContainerPersistence, while a change to ContainerPersistence can't break ContainerResource.
Position
Below the diagonal: ContainerPersistence uses a module listed above it, which is the healthy direction.
ContainerPersistence uses ContainerBuild, so a change to ContainerBuild can break ContainerPersistence, while a change to ContainerPersistence can't break ContainerBuild.
Position
Below the diagonal: ContainerPersistence uses a module listed above it, which is the healthy direction.
cluster-shim~cluster-shim uses ContainerBuild, so a change to ContainerBuild can break cluster-shim~cluster-shim, while a change to cluster-shim~cluster-shim can't break ContainerBuild.
Position
Below the diagonal: cluster-shim~cluster-shim uses a module listed above it, which is the healthy direction.
ContainerCommands uses TerminalProgress, so a change to TerminalProgress can break ContainerCommands, while a change to ContainerCommands can't break TerminalProgress.
Position
Below the diagonal: ContainerCommands uses a module listed above it, which is the healthy direction.
ContainerCommands uses ContainerPlugin, so a change to ContainerPlugin can break ContainerCommands, while a change to ContainerCommands can't break ContainerPlugin.
Position
Below the diagonal: ContainerCommands uses a module listed above it, which is the healthy direction.
ContainerCommands uses ContainerResource, so a change to ContainerResource can break ContainerCommands, while a change to ContainerCommands can't break ContainerResource.
Position
Below the diagonal: ContainerCommands uses a module listed above it, which is the healthy direction.
ContainerCommands uses ContainerBuild, so a change to ContainerBuild can break ContainerCommands, while a change to ContainerCommands can't break ContainerBuild.
Position
Below the diagonal: ContainerCommands uses a module listed above it, which is the healthy direction.
ContainerCommands uses ContainerPersistence, so a change to ContainerPersistence can break ContainerCommands, while a change to ContainerCommands can't break ContainerPersistence.
Position
Below the diagonal: ContainerCommands uses a module listed above it, which is the healthy direction.
ContainerLog uses ContainerPersistence, so a change to ContainerPersistence can break ContainerLog, while a change to ContainerLog can't break ContainerPersistence.
Position
Below the diagonal: ContainerLog uses a module listed above it, which is the healthy direction.
ContainerOS uses ContainerPersistence, so a change to ContainerPersistence can break ContainerOS, while a change to ContainerOS can't break ContainerPersistence.
Position
Below the diagonal: ContainerOS uses a module listed above it, which is the healthy direction.
ContainerVersion uses ContainerBuild, so a change to ContainerBuild can break ContainerVersion, while a change to ContainerVersion can't break ContainerBuild.
Position
Below the diagonal: ContainerVersion uses a module listed above it, which is the healthy direction.
ContainerVersion uses ContainerPersistence, so a change to ContainerPersistence can break ContainerVersion, while a change to ContainerVersion can't break ContainerPersistence.
Position
Below the diagonal: ContainerVersion uses a module listed above it, which is the healthy direction.
APIServer uses ContainerPersistence, so a change to ContainerPersistence can break APIServer, while a change to APIServer can't break ContainerPersistence.
Position
Below the diagonal: APIServer uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A02:2025 — Security Misconfiguration
31
High / Critical
A05:2025 — Injection
10
High / Critical
A03:2025 — Software Supply Chain Failures
3
Medium
Roadmap
Top priorities: Resolve the 1 No network policy finding(s) in Network Egress Confinement; Resolve the 1 No seccomp profile finding(s) in Kernel & Syscall Confinement — start with REDACTED; Resolve the 1 No ADRs found finding(s) in ADR Quality.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No network policy finding(s) in Network Egress Confinement.
Code Duplication: Members sharing a duplicated core (5 members, 50+ identical tokens)
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 13
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 — 420
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 — 20
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 38
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 41 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, 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 — 41 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, 429 of 453 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.
D8 Code Coverage — 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. Coverage NOT MEASURED: the Swift half could not be measured — the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
D11 Test Reliability — 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. Test source is present (.swift) and this repository declares a SwiftPM test suite (2 packages), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — 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. Dependency Hygiene couldn't be assessed within its 5-minute budget on a solution this large — not included in this run.
D21 Naming Consistency — 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. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — 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. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
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.
D30 Dependency Vulnerabilities — 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. Osv: osv-scanner exited 127 with no findings — dependency CVEs were not measured. 'osv-scanner' exited 127 and produced no findings, and that exit code has no documented repo-side meaning — so this run measured nothing, and nothing here is a statement about the repository.
D32 Data Compliance (PII/GDPR) — 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. `Sources/APIServer/APIServer+Start.swift`, `Sources/ContainerBuild/BuildFSSync.swift`, `Sources/ContainerBuild/Builder+Start.swift`, `Sources/ContainerBuild/Builder.pb.swift`, `Sources/ContainerBuild/Globber.swift`, … (+39 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D43 Malicious 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. Osv: osv-scanner exited 127 with no findings — dependency CVEs were not measured. 'osv-scanner' exited 127 and produced no findings, and that exit code has no documented repo-side meaning — so this run measured nothing, and nothing here is a statement about the repository.
D44 Platform End-of-Life — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a REDACTED) is simply not read here yet.
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) — 5 | ARG SWIFT_VERSION=6.3.0 6 | >>> FROM swift:${SWIFT_VERSION}-noble 7 | 8 | ARG SWIFT_SDK_URL -------------------- ERROR: failed to solve: swift:6.3.0-noble: failed to resolve source metadata for docker.io/library/swift:6.3.0-noble: failed to do request: Head "https://registry-1.docker.io/v2/library/swift/manifests/6.3.0-noble": proxyconnect tcp: dial tcp 172.31.7.2:3128: i/o timeout; 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.
GD1 Unfinished & placeholder code — 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 C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Swift, c is not read 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.
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 reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Swift, c is not read 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.
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.
P5 DR & Backup — 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. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
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 reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust and Dart source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust or Dart was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python or Rust was found in this repository, 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.
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 reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's C, Swift is not read 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.
X23 Unguarded diagnostic materialisation — 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 C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, 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.
X27 Collection changed while being enumerated — 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 C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's C is not read 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.
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 reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
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 reads C# syntax, and Scala, JavaScript/TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart and Ruby source only, and no C# was loaded and no Scala, JavaScript, TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart or Ruby was found in this repository, 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.
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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala or Rust was found in this repository, 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.
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 reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's C, Swift is not read 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.
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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 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").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
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.
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").
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.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
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".
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.
12 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ProgressBar.draw at 50. 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 ProgressUpdateService.handler at 18 — 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: Sources/Services/ContainerAPIService/Client/ProgressUpdateService.swift (ProgressUpdateService.handler at 18), Sources/TerminalProgress/ProgressBar+Add.swift (ProgressBar.handler 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.
+ 7 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with ProgressBar.draw (cyclomatic 50), Parser.mount (cyclomatic 31). — 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 2 together lifts Cyclomatic Complexity from 7.8 to about 8.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 29 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 60 down to 60 or less in Cognitive Complexity — start with ProgressBar.draw (cognitive 105), BuildOptions.runLinuxBuild (cognitive 69). — 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 2 together lifts Cognitive Complexity from 6.0 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.8 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 7 TooManyMethods finding(s) in God Classes — start with XPCMessage.swift, RuntimeService.swift, ContainersService.swift. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 5 MethodTooLong finding(s) in God Classes — start with Builder+Start.swift, Utility.swift, RuntimeService.swift. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 3 FileTooLong finding(s) in God Classes — start with RuntimeService.swift, ContainersService.swift, Parser.swift. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
70 duplicated block group(s) detected. A further 14 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 52 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with Message.swift, HostDNSResolver.swift, Parser.swift. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 4 Duplicated block (16 lines × 2) finding(s) in Code Duplication — start with TableOutput.swift, ContainersService.swift, ContentStoreService.swift. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with BuildFSSync.swift, DNSServer.swift, RemoteContentStoreClient.swift. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling7.6 / 10Strong✓ 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.
43 production modules (SwiftPM), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 13 module(s) off the main sequence, with abstractness counted on 40 of the 43 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: ContainerLog · ×13
What to do
Resolve the 13 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (13 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with ContainerFixture.swift, URL+Extensions.swift. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
1516 test methods: 1105 unit, 411 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality8.2 / 10Strong✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
1 skipped (1 with a documented reason), 183 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 1516 tests.
No assertions: totalAtLimitIsAccepted · ×183Tests/ClusterPluginTests/ClusterCreateWorkersTests.swift:44
Resolve the 183 No assertions finding(s) in Test Quality — start with ParserTest.swift (47), TestCLIBuilder.swift (35), AttachmentNameValidatorTests.swift (33). — One of this dimension's main actionable groups (183 warning-level).
Detailed fixes: d10_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: 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 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with RuntimeService.swift, BuildOptions+LinuxBuild.swift, Utility.swift. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
11 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is Sources/ContainerPersistence/ConfigSnapshotDecoderContainers.swift. Counted over 237 of the 364 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
27 deducted task-comment markers across 43031 LoC (0.1/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 22 TodoComment finding(s) in Explicit Debt — start with APIServer+Start.swift (4), ImagesHelper.swift (2), DNSServer.swift (2). — One of this dimension's main actionable groups (22 warning-level).
Resolve the 5 FixmeComment finding(s) in Explicit Debt — start with VolumesService.swift, ContainersService.swift, RuntimeLinuxHelper+Start.swift. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
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.
1 of 2 build units (SwiftPM) 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.
28 % of calls cross a namespace and 0 % 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).
10 finding(s): 0 critical, 9 high, 1 medium, 0 low. 1 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.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 26 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (25), REDACTED. — One of this dimension's main actionable groups (26 warning-level).
Resolve the 4 High IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-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.
2 of 237 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Sources/Services/ContainerAPIService/Server/Volumes/VolumesHarness.swift. Counted over 237 of the 364 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 8 Change coupling finding(s) in Change Coupling — start with XPC+.swift (2), Package.swift (2), RuntimeClient.swift. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with ContainerClient.swift. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
0/1 workload(s) run every container under a seccomp profile; 0/1 declare an AppArmor/SELinux profile.
No seccomp profileREDACTED:61
What to do
Resolve the 1 No seccomp profile finding(s) in Kernel & Syscall Confinement — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d41_recommendation.md · top locations in Appendix A, every location in findings.md.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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 · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Describe the projects a newcomer cannot place from the root README: 1 of 1 have no README of their own, in their folder or in their family's project (`cluster-shim`).
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability8.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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 CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 8 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:7
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
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.
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.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×10) — Sources/Services/RuntimeLinux/Server/RuntimeService.swift:1704, Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:606, Sources/Services/ContainerAPIService/Client/ClientImage+ImageResource.swift:41, …
What to do
Swallowed exception (caught, then discarded)
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 — 2 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.
X10 Duplicated predicate — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 75 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.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's Swift imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state 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
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) — 5 | ARG SWIFT_VERSION=6.3.0 6 | >>> FROM swift:${SWIFT_VERSION}-noble 7 | 8 | ARG SWIFT_SDK_URL -------------------- ERROR: failed to solve: swift:6.3.0-noble: failed to resolve source metadata for docker.io/library/swift:6.3.0-noble: failed to do request: Head "https://registry-1.docker.io/v2/library/swift/manifests/6.3.0-noble": proxyconnect tcp: dial tcp 172.31.7.2:3128: i/o timeout; 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.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — Test reliability not included — the .swift suite was found but not re-run
D12 Dependency Hygiene — Dependency Hygiene not included (time budget)
D14 License Compliance — Not scored — this repository's SwiftPM files bring in 35 third-party package(s), but the licence of 35 of them could be read neither from its repository at the pinned revision nor from api.deps.dev (TaskCanceledException: A task was canceled.), and a licence verdict over part of a dependency graph is not a licence verdict. NOT a finding that this repository's licences are compliant: this dimension asserts nothing about its licensing in either direction.
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, 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.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Swift not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Swift surface was not measured.
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 .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D30 Dependency Vulnerabilities — Scanner failed to run — not a clean result
D32 Data Compliance (PII/GDPR) — 44 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
D43 Malicious Dependencies — Scanner failed to run — not a clean result
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — Swift suite
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
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
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
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 applicable — no HTTP server, API framework or worker entry point was found in the Swift source, so there is no service whose uptime a failing dependency could take down
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 — no coverage report found on disk — produce a coverage report in a standard format (lcov — `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, 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 — 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
X13 Undrained process stream — 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
X15 Unvalidated length from an untrusted reader — 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
X16 Unfloored truncation loop — 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
X17 Uncapped recursion over a caller-supplied document — 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
X18 Disposal-pattern 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
X19 Unrestored process-global state — 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
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 — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — Not applicable: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. In C a `case` label must be a constant expression, and a switch has no guards, so no label can change state. Swift has no `++` or `--`, and an assignment yields `()`, which cannot be an operand of `&&`, `||` or `?:` nor the Bool a `case … where` clause needs. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — 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
X23 Unguarded diagnostic materialisation — 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
X24 Document value interpolated into markup unescaped — 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
X25 Inert configuration knob — 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
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — 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
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — 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 — 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
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
No assertions: totalAtLimitIsAccepted Tests/ClusterPluginTests/ClusterCreateWorkersTests.swift:44— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: initAcceptsLimits Tests/ClusterPluginTests/ClusterWorkerGroupTests.swift:64— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: noopWhenFileDoesNotExist Tests/ClusterPluginTests/KubeconfigMergeTests.swift:542— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: forwardedSignalRejectsHostOnlySignal Tests/ContainerAPIClientTests/ClientProcessTests.swift:56— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testFromEnvironmentInvalidPlatformThrows Tests/ContainerAPIClientTests/DefaultPlatformTests.swift:59— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testHostDNSCreateAlreadyExists Tests/ContainerAPIClientTests/HostDNSResolverTest.swift:58— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testHostDNSDeleteNotFound Tests/ContainerAPIClientTests/HostDNSResolverTest.swift:107— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testInvalidSizeThrowsError Tests/ContainerAPIClientTests/Measurement+ParseTests.swift:141— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testInvalidSymbolThrowsError Tests/ContainerAPIClientTests/Measurement+ParseTests.swift:162— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testEmptyStringThrowsError Tests/ContainerAPIClientTests/Measurement+ParseTests.swift:183— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortInvalidProtocol Tests/ContainerAPIClientTests/ParserTest.swift:113— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortInvalidValue Tests/ContainerAPIClientTests/ParserTest.swift:125— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortMissingPort Tests/ContainerAPIClientTests/ParserTest.swift:137— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishInvalidIPv4Address Tests/ContainerAPIClientTests/ParserTest.swift:149— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishInvalidIPv6Address Tests/ContainerAPIClientTests/ParserTest.swift:161— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortInvalidHostPort Tests/ContainerAPIClientTests/ParserTest.swift:178— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortInvalidContainerPort Tests/ContainerAPIClientTests/ParserTest.swift:190— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortRangeMismatch Tests/ContainerAPIClientTests/ParserTest.swift:202— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortRangeInvalidHostPortStart Tests/ContainerAPIClientTests/ParserTest.swift:214— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortRangeZeroHostPortStart Tests/ContainerAPIClientTests/ParserTest.swift:226— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortRangeInvalidHostPortEnd Tests/ContainerAPIClientTests/ParserTest.swift:238— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortRangeInvalidHostPortRange Tests/ContainerAPIClientTests/ParserTest.swift:250— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortRangeNegativeHostPortRange Tests/ContainerAPIClientTests/ParserTest.swift:262— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortRangeInvalidContainerPortStart Tests/ContainerAPIClientTests/ParserTest.swift:274— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPublishPortRangeZeroContainerPortStart Tests/ContainerAPIClientTests/ParserTest.swift:286— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
TodoComment Tests/IntegrationTests/Containers/TestCLIExportCommand.swift:48— // TODO: verify foo bar baz are in tar file. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/Services/Runtime/RuntimeClient/RuntimeConfiguration.swift:26— // TODO: Remove runtime-specific fields (initialFilesystem, kernel, containerRootFilesystem). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:1086— // TODO: Change this so we don't have to reread the config — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/Services/ContainerAPIService/Client/ClientImage.swift:337— // TODO: Improve error handling here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/Services/ContainerAPIService/Client/Utility+PluginLoader.swift:26— // TODO: Remove when we convert PluginLoader to FilePath. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/Plugins/CoreImages/ImagesHelper.swift:95— // TODO: remove as part of ImageStore URL removal PR — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/Plugins/CoreImages/ImagesHelper.swift:125— // TODO: remove as part of ImageStore URL removal PR — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/DNSServer/DNSServer.swift:39— // TODO: TCP server — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/DNSServer/DNSServer.swift:62— // TODO: TCP server — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/DNSServer/Records/UInt8+Binding.swift:19— // TODO: This copies some of the Bindable code from Containerization, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/ContainerResource/Volume/VolumeConfiguration.swift:63— // TODO: retain for deserialization compatibility, remove in next major version — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/ContainerResource/Network/NetworkConfiguration.swift:84— // TODO: retain for deserialization compatibility, remove in next major version — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/ContainerResource/Registry/RegistryResource.swift:73— // TODO: if we have domain IP validation API, use that instead — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/ContainerResource/Network/Attachment.swift:68— // TODO: retain for deserialization compatibility for now, remove later — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/ContainerCommands/DefaultCommand.swift:56— // TODO: Remove when we convert PluginLoader to FilePath — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/APIServer/APIServer+Start.swift:184— // TODO: Remove when we convert PluginLoader to FilePath — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/ContainerCommands/System/SystemStart.swift:92— // TODO: Can we use the plugin loader to bootstrap the API server? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/ContainerBuild/Builder.swift:109— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/ContainerBuild/Globber.swift:92— // TODO: modifying object state and returning results is odd, rework — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/APIServer/APIServer+Start.swift:251— // TODO: Remove when we convert HealthCheckHarness to FilePath — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/APIServer/APIServer+Start.swift:266— // TODO: Remove when we convert KernelService to FilePath — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/APIServer/APIServer+Start.swift:282— // TODO: Remove when we convert ContainersService to FilePath — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Off the main sequence: ContainerLog — ContainerLog: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
Off the main sequence: ContainerOS — ContainerOS: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: ContainerRuntimeLinuxClient — ContainerRuntimeLinuxClient: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: ContainerXPC — ContainerXPC: abstractness 0.00, instability 0.05, distance 0.95 — zone of pain — concrete and depended on by 21 project(s), so it's rigid to change.
Off the main sequence: ContainerVersion — ContainerVersion: abstractness 0.00, instability 0.08, distance 0.92 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
Off the main sequence: SocketForwarder — SocketForwarder: abstractness 0.08, instability 0.00, distance 0.92 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: ClusterShim — ClusterShim: abstractness 0.09, instability 0.00, distance 0.91 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: ContainerPlugin — ContainerPlugin: abstractness 0.07, instability 0.08, distance 0.85 — zone of pain — concrete and depended on by 11 project(s), so it's rigid to change.
Off the main sequence: ContainerResource — ContainerResource: abstractness 0.06, instability 0.13, distance 0.81 — zone of pain — concrete and depended on by 20 project(s), so it's rigid to change.
Off the main sequence: DNSServer — DNSServer: abstractness 0.23, instability 0.00, distance 0.77 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: TerminalProgress — TerminalProgress: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
Off the main sequence: ContainerImagesServiceClient — ContainerImagesServiceClient: abstractness 0.00, instability 0.29, distance 0.71 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: ContainerNetworkClient — ContainerNetworkClient: abstractness 0.00, instability 0.29, distance 0.71 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Swallowed exception (caught, then discarded) Sources/Services/RuntimeLinux/Server/RuntimeService.swift:1704— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:606— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/Services/ContainerAPIService/Client/ClientImage+ImageResource.swift:41— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/Services/ContainerAPIService/Client/ClientImage.swift:220— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/ContainerResource/Volume/VolumeConfiguration.swift:147— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/ContainerResource/Volume/VolumeResource.swift:66— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/ContainerCommands/System/SystemStart.swift:212— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/ContainerCommands/System/SystemStart.swift:221— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/ContainerCommands/System/SystemVersion.swift:56— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/ContainerCommands/Image/ImagePrune.swift:92— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Change coupling: XPC+.swift ↔ ContainersHarness.swift Sources/Services/ContainerAPIService/Client/XPC+.swift:1— `Sources/Services/ContainerAPIService/Client/XPC+.swift` and `Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift` change together 82% of the time (14 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `b8ffd38c` [container]: add clean command (#1949); `9895ba8d` Add container copy/cp command for host-container file transfer (#1190); `521df518` Add `variant` Support (#1548) — run `git show` on any of them.
Change coupling: RuntimeClient.swift ↔ RuntimeService.swift Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:1— `Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift` and `Sources/Services/RuntimeLinux/Server/RuntimeService.swift` change together 80% of the time (12 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `b8ffd38c` [container]: add clean command (#1949); `da8bec62` [container]: add `container export` for live containers (#1630); `79663025` kill: Wait for container to exit after sigkill (#1589) — run `git show` on any of them.
Change coupling: Package.swift ↔ ImagesHelper.swift Package.swift:1— `Package.swift` and `Sources/Plugins/CoreImages/ImagesHelper.swift` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `98520f0a` Infer platform and runtime from OCI image (#2422); `7358102c` Fix system df to count content blobs and deduplicate shared storage (…; `ca3a4d66` Use FilePath for app, install, and log roots. (#1558) — run `git show` on any of them.
Change coupling: ClientImage.swift ↔ ImagesService.swift Sources/Services/ContainerAPIService/Client/ClientImage.swift:1— `Sources/Services/ContainerAPIService/Client/ClientImage.swift` and `Sources/Services/ContainerImagesService/Server/ImagesService.swift` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `98520f0a` Infer platform and runtime from OCI image (#2422); `6553f9c9` [deps]: bump containerization to 0.25.0 (#1161) (at that commit the file was still `Sources/Services/ContainerImagesService/Server/ImageService.swift`); `744e7f7c` Update for containerization 0.21.0. (#1056) (at that commit the file was still `Sources/Services/ContainerImagesService/Server/ImageService.swift`) — run `git show` on any of them.
Change coupling: ContainerConfiguration.swift ↔ Flags.swift Sources/ContainerResource/Container/ContainerConfiguration.swift:1— `Sources/ContainerResource/Container/ContainerConfiguration.swift` and `Sources/Services/ContainerAPIService/Client/Flags.swift` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `06c00a93` CLI: Support --shm-size (#1488); `a557ce80` Add capabilities support (#1383); `899081d0` cli: Add --init to run/create (#1244) — run `git show` on any of them.
Change coupling: XPC+.swift ↔ ContainersService.swift Sources/Services/ContainerAPIService/Client/XPC+.swift:1— `Sources/Services/ContainerAPIService/Client/XPC+.swift` and `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift` change together 62% of the time (16 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `b8ffd38c` [container]: add clean command (#1949); `9895ba8d` Add container copy/cp command for host-container file transfer (#1190); `521df518` Add `variant` Support (#1548) — run `git show` on any of them.
Change coupling: Package.swift ↔ ImagesService.swift Package.swift:1— `Package.swift` and `Sources/Services/ContainerImagesService/Server/ImagesService.swift` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `98520f0a` Infer platform and runtime from OCI image (#2422); `a9a62e28` Update to containerization 0.42.0 (#2207); `7358102c` Fix system df to count content blobs and deduplicate shared storage (… — run `git show` on any of them.
Change coupling: RuntimeLinuxHelper+Start.swift ↔ ContainersService.swift Sources/Plugins/RuntimeLinux/RuntimeLinuxHelper+Start.swift:1— `Sources/Plugins/RuntimeLinux/RuntimeLinuxHelper+Start.swift` and `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `b8ffd38c` [container]: add clean command (#1949); `da8bec62` [container]: add `container export` for live containers (#1630); `9895ba8d` Add container copy/cp command for host-container file transfer (#1190) — run `git show` on any of them.
TooManyMethods: XPCMessage Sources/ContainerXPC/XPCMessage.swift:22— TooManyMethods — 102 methods, declared across 13 files: ContainerXPC/XPCMessage.swift (27), Client/XPC+.swift (22), Client/ImageServiceXPCKeys.swift (11), Client/ClientImage.swift (8), +9 more file(s). The bar is 30 methods; this is 72 over it, 3.40× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RuntimeService Sources/Services/RuntimeLinux/Server/RuntimeService.swift:40— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ContainersService Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:34— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ProgressBar Sources/TerminalProgress/ProgressBar.swift:21— TooManyMethods — 38 methods, declared across 4 files: TerminalProgress/ProgressBar+Add.swift (15), TerminalProgress/ProgressBar.swift (15), TerminalProgress/ProgressBar+Terminal.swift (7), TerminalProgress/ProgressBar+RestoreCursor.swift (1). The bar is 30 methods; this is 8 over it, 1.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Parser Sources/Services/ContainerAPIService/Client/Parser.swift:57— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: KeyedContainer Sources/ContainerPersistence/ConfigSnapshotDecoderContainers.swift:42— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ClientImage Sources/Services/ContainerAPIService/Client/ClientImage.swift:30— TooManyMethods — 31 methods, declared across 2 files: Client/ClientImage.swift (29), Client/ClientImage+ImageResource.swift (2). The bar is 30 methods; this is 1 over it, 1.03× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (7 lines × 2) Sources/DNSServer/Records/Message.swift:116— Sources/DNSServer/Records/Message.swift:116-123 | Sources/DNSServer/Records/Message.swift:145-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) Sources/Services/ContainerAPIService/Client/HostDNSResolver.swift:39— Sources/Services/ContainerAPIService/Client/HostDNSResolver.swift:39-45 | Sources/Services/ContainerAPIService/Client/HostDNSResolver.swift:80-86 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) Sources/Services/ContainerAPIService/Client/Parser.swift:535— Sources/Services/ContainerAPIService/Client/Parser.swift:535-541 | Sources/Services/ContainerAPIService/Client/Parser.swift:637-643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:788— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:788-794 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:800-806 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) Sources/Services/ContainerImagesService/Server/ImagesService.swift:85— Sources/Services/ContainerImagesService/Server/ImagesService.swift:85-91 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:136-142 — 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 `Sources/Services/ContainerImagesService/Server/ImagesService.swift:85` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Sources/Services/ContainerAPIService/Client/ContainerClient.swift:39— Sources/Services/ContainerAPIService/Client/ContainerClient.swift:39-45 | Sources/Services/ContainerAPIService/Client/NetworkClient.swift:59-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
FixmeComment Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:249— // FIXME: These don't guarantee that name doesn't have component separators. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:65— // FIXME: Find a better mechanism for services running on the APIServer to work with each other — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Sources/Plugins/RuntimeLinux/RuntimeLinuxHelper+Start.swift:67— // FIXME: The network plugins that the runtime supports should be configurable elsewhere — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Sources/ContainerTestSupport/BuildFixture.swift:189— /// - FIXME: This duplicates logic in `ContainerBuild/URL+Extensions.swift`. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Sources/APIServer/APIServer+Start.swift:346— // FIXME: default network should be configurable elsewhere — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
MethodTooLong: Builder.start Sources/ContainerBuild/Builder+Start.swift:31— MethodTooLong — start runs 170 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Utility.containerConfigFromFlags Sources/Services/ContainerAPIService/Client/Utility.swift:69— MethodTooLong — containerConfigFromFlags runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RuntimeService.bootstrap Sources/Services/RuntimeLinux/Server/RuntimeService.swift:137— MethodTooLong — bootstrap runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BuildFSSync.walk Sources/ContainerBuild/BuildFSSync.swift:251— MethodTooLong — walk runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MachinesService.boot Sources/Services/MachineAPIService/Server/MachinesService.swift:328— MethodTooLong — boot runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (16 lines × 2) Sources/ContainerCluster/Support/TableOutput.swift:38— Sources/ContainerCluster/Support/TableOutput.swift:38-53 | Sources/ContainerResource/Output/TableOutput.swift:32-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:272— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:272-287 | Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift:129-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (16 lines × 2) Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:36— Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:36-51 | Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:58-73 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (16 lines × 2) Sources/Services/MachineAPIService/Client/MachineClient.swift:215— Sources/Services/MachineAPIService/Client/MachineClient.swift:215-230 | Sources/Services/MachineAPIService/Client/MachineClient.swift:271-286 — 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 `Sources/Services/MachineAPIService/Client/MachineClient.swift:215` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) Sources/ContainerBuild/BuildFSSync.swift:299— Sources/ContainerBuild/BuildFSSync.swift:299-311 | Sources/ContainerBuild/BuildFSSync.swift:378-390 — 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 `Sources/ContainerBuild/BuildFSSync.swift:299` 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 (13 lines × 2) Sources/DNSServer/DNSServer.swift:43— Sources/DNSServer/DNSServer.swift:43-55 | Sources/DNSServer/DNSServer.swift:65-77 — 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 `Sources/DNSServer/DNSServer.swift:43` 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 (13 lines × 2) Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:70— Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:70-82 | Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:89-101 — 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 `Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 2) Sources/Services/ContainerImagesService/Server/ImagesServiceHarness.swift:38— Sources/Services/ContainerImagesService/Server/ImagesServiceHarness.swift:38-50 | Sources/Services/ContainerImagesService/Server/ImagesServiceHarness.swift:79-91 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) Sources/ContainerCluster/Provisioners/LinuxNodeProvisioner.swift:232— Sources/ContainerCluster/Provisioners/LinuxNodeProvisioner.swift:232-240 | Sources/ContainerCluster/Provisioners/LinuxNodeProvisioner.swift:260-268 — 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 `Sources/ContainerCluster/Provisioners/LinuxNodeProvisioner.swift:232` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/ContainerCluster/Support/ClusterHelper+Readiness.swift:52— Sources/ContainerCluster/Support/ClusterHelper+Readiness.swift:52-61 | Sources/ContainerCluster/Support/ClusterHelper+Readiness.swift:79-87 — 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 `Sources/ContainerCluster/Support/ClusterHelper+Readiness.swift:52` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/Services/ContainerImagesService/Server/ImagesServiceHarness.swift:257— Sources/Services/ContainerImagesService/Server/ImagesServiceHarness.swift:257-265 | Sources/Services/ContainerImagesService/Server/ImagesServiceHarness.swift:277-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:1166— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:1166-1175 | Sources/Services/MachineAPIService/Server/MachinesService.swift:279-287 — 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) Sources/APIServer/LocalhostDNSHandler.swift:77— Sources/APIServer/LocalhostDNSHandler.swift:77-81 | Sources/DNSServer/Handlers/HostTableResolver.swift:39-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/APIServer/LocalhostDNSHandler.swift:77` 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) Sources/Services/ClusterHostStoreService/HostStoreServer.swift:150— Sources/Services/ClusterHostStoreService/HostStoreServer.swift:150-154 | Sources/Services/ClusterHostStoreService/HostStoreServer.swift:169-173 — 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 `Sources/Services/ClusterHostStoreService/HostStoreServer.swift:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) Sources/Services/ContainerImagesService/Server/ContentServiceHarness.swift:52— Sources/Services/ContainerImagesService/Server/ContentServiceHarness.swift:52-56 | Sources/Services/ContainerImagesService/Server/ContentServiceHarness.swift:67-71 — 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) Sources/ContainerResource/Cluster/ClusterResource.swift:88— Sources/ContainerResource/Cluster/ClusterResource.swift:88-92 | Sources/ContainerResource/Network/NetworkResource.swift:91-95 — 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.
Hotspot: Sources/Services/RuntimeLinux/Server/RuntimeService.swift Sources/Services/RuntimeLinux/Server/RuntimeService.swift:137— Sources/Services/RuntimeLinux/Server/RuntimeService.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in RuntimeService.bootstrap at line 137. 1 of those changes was a fix/bug commit, and the other 3 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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 00:10:58 -03:00' --until='2026-11-11 00:10:58 -03:00' --full-history --no-merges -- Sources/Services/RuntimeLinux/Server/RuntimeService.swift`: 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: Sources/ContainerCommands/Build/BuildOptions+LinuxBuild.swift Sources/ContainerCommands/Build/BuildOptions+LinuxBuild.swift:85— Sources/ContainerCommands/Build/BuildOptions+LinuxBuild.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in BuildOptions.runLinuxBuild at line 85. 1 of those changes was a fix/bug commit, and the other 1 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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 00:10:58 -03:00' --until='2026-11-11 00:10:58 -03:00' --full-history --no-merges -- Sources/ContainerCommands/Build/BuildOptions+LinuxBuild.swift`: 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: Sources/Services/ContainerAPIService/Client/Utility.swift Sources/Services/ContainerAPIService/Client/Utility.swift:69— Sources/Services/ContainerAPIService/Client/Utility.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in Utility.containerConfigFromFlags at line 69. 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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 00:10:58 -03:00' --until='2026-11-11 00:10:58 -03:00' --full-history --no-merges -- Sources/Services/ContainerAPIService/Client/Utility.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FileTooLong: Server/RuntimeService.swift Sources/Services/RuntimeLinux/Server/RuntimeService.swift— FileTooLong — 1046 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 546 over it, 2.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Containers/ContainersService.swift Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift— FileTooLong — 778 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 278 over it, 1.56× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Client/Parser.swift Sources/Services/ContainerAPIService/Client/Parser.swift— FileTooLong — 746 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 246 over it, 1.49× 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 (15 lines × 2) Sources/Services/ContainerAPIService/Client/ContainerClient.swift:130— Sources/Services/ContainerAPIService/Client/ContainerClient.swift:130-144 | Sources/Services/ContainerAPIService/Client/ContainerClient.swift:240-254 — 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 lines × 2) Sources/Services/ContainerAPIService/Client/ProcessIO.swift:99— Sources/Services/ContainerAPIService/Client/ProcessIO.swift:99-113 | Sources/Services/ContainerAPIService/Client/ProcessIO.swift:125-139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) Sources/Services/RuntimeLinux/Server/RuntimeService.swift:713— Sources/Services/RuntimeLinux/Server/RuntimeService.swift:713-727 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:758-772 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/RuntimeLinux/Server/RuntimeService.swift:713` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/Services/RuntimeLinux/Server/RuntimeService.swift:728` calls `UInt32` and `Sources/Services/RuntimeLinux/Server/RuntimeService.swift:774` 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 (14 lines × 2) Sources/ContainerCluster/Provisioners/LinuxNodeProvisioner.swift:242— Sources/ContainerCluster/Provisioners/LinuxNodeProvisioner.swift:242-255 | Sources/ContainerCluster/Provisioners/LinuxNodeProvisioner.swift:270-283 — 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 `Sources/ContainerCluster/Provisioners/LinuxNodeProvisioner.swift:242` 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 (14 lines × 2) Sources/Services/ContainerAPIService/Client/PacketFilter.swift:46— Sources/Services/ContainerAPIService/Client/PacketFilter.swift:46-59 | Sources/Services/ContainerAPIService/Client/PacketFilter.swift:76-89 — 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) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:458— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:458-471 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:817-830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:458` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (12 lines × 2) Sources/Services/ContainerAPIService/Client/ProcessIO.swift:332— Sources/Services/ContainerAPIService/Client/ProcessIO.swift:332-343 | Sources/Services/ContainerAPIService/Client/ProcessIO.swift:363-374 — 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 `Sources/Services/ContainerAPIService/Client/ProcessIO.swift:332` 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) Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift:375— Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift:375-386 | Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift:395-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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift:375` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:292— Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:292-303 | Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:309-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:292` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:291` calls `set`, `UInt64` and `Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:308` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (18 lines × 2) Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:315— Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:315-332 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:342-359 — 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) Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:47— Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:47-64 | Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:224-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note first that the copies are not typed on the same thing: the declarations holding them bind `platform` to `SystemPlatform = .linuxArm` in one and `SystemPlatform` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) Sources/ContainerCluster/Support/TableOutput.swift:55— Sources/ContainerCluster/Support/TableOutput.swift:55-64 | Sources/ContainerResource/Output/TableOutput.swift:50-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) Sources/Services/RuntimeLinux/Server/RuntimeService.swift:1506— Sources/Services/RuntimeLinux/Server/RuntimeService.swift:1506-1515 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:1517-1526 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) Sources/ContainerResource/Cluster/ClusterResource.swift:81— Sources/ContainerResource/Cluster/ClusterResource.swift:81-86 | Sources/ContainerResource/Container/ManagedContainer.swift:73-78 | Sources/ContainerResource/Network/NetworkResource.swift:84-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (6 lines × 3) Sources/Services/ContainerImagesService/Server/ImagesService.swift:136— Sources/Services/ContainerImagesService/Server/ImagesService.swift:136-141 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:357-362 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:381-386 — 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 `Sources/Services/ContainerImagesService/Server/ImagesService.swift:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) Sources/ContainerCluster/Bootstrapper/ClusterBootstrapper+ControlPlane.swift:76— Sources/ContainerCluster/Bootstrapper/ClusterBootstrapper+ControlPlane.swift:76-81 | Sources/ContainerCluster/Provisioners/LinuxNodeProvisioner.swift:319-324 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/ContainerCluster/Bootstrapper/ClusterBootstrapper+ControlPlane.swift:76` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) Sources/Services/Network/Server/DefaultNetworkService.swift:65— Sources/Services/Network/Server/DefaultNetworkService.swift:65-70 | Sources/Services/Network/Server/DefaultNetworkService.swift:135-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Low cohesion: ContainerFixture (LCOM4 6) Sources/ContainerTestSupport/ContainerFixture.swift:59— ContainerFixture's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: BufferedCopyReader (LCOM4 4) Sources/ContainerBuild/URL+Extensions.swift:145— BufferedCopyReader's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
ProgressBar.draw (cyclomatic 50) Sources/TerminalProgress/ProgressBar.swift:225— ProgressBar.draw has cyclomatic complexity 50 (threshold 15). Of this number, 49 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.mount (cyclomatic 31) Sources/Services/ContainerAPIService/Client/Parser.swift:454— Parser.mount 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.
Builder.start (cyclomatic 29) Sources/ContainerBuild/Builder+Start.swift:31— Builder.start has cyclomatic complexity 29 (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.
BuildOptions.runLinuxBuild (cyclomatic 29) Sources/ContainerCommands/Build/BuildOptions+LinuxBuild.swift:85— BuildOptions.runLinuxBuild has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Message.serialize (cyclomatic 28) Sources/DNSServer/Records/Message.swift:185— Message.serialize has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Parser.publishPort (cyclomatic 27) Sources/Services/ContainerAPIService/Client/Parser.swift:709— Parser.publishPort 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.
RuntimeService.bootstrap (cyclomatic 20) Sources/Services/RuntimeLinux/Server/RuntimeService.swift:137— RuntimeService.bootstrap has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NetworksService.registerService (cyclomatic 20) Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift:342— NetworksService.registerService has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BuildOptions.validate (cyclomatic 18) Sources/ContainerCommands/Build/BuildOptions.swift:147— BuildOptions.validate 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.
AttachmentAllocator.allocate (cyclomatic 17) Sources/Services/Network/Server/AttachmentAllocator.swift:64— AttachmentAllocator.allocate 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.
Parser.process (cyclomatic 16) Sources/Services/ContainerAPIService/Client/Parser.swift:330— Parser.process has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ProgressUpdateClient.handleProgressUpdate (cyclomatic 16) Sources/Services/ContainerAPIService/Client/ProgressUpdateClient.swift:98— ProgressUpdateClient.handleProgressUpdate has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ProgressBar.draw (cognitive 105) Sources/TerminalProgress/ProgressBar.swift:225— ProgressBar.draw has cognitive complexity 105 (threshold 15). Drivers by points: if/else 36 (82 pts), boolean chains 15, ternaries 5 (8 pts) (nesting depth added 49). Of this number, 104 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
BuildOptions.runLinuxBuild (cognitive 69) Sources/ContainerCommands/Build/BuildOptions+LinuxBuild.swift:85— BuildOptions.runLinuxBuild has cognitive complexity 69 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 6 (18 pts), match/switch 3 (7 pts), error handling 2 (4 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.mount (cognitive 48) Sources/Services/ContainerAPIService/Client/Parser.swift:454— Parser.mount has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (36 pts), match/switch 4 (10 pts), loops 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.publishPort (cognitive 35) Sources/Services/ContainerAPIService/Client/Parser.swift:709— Parser.publishPort has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 6, match/switch 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Builder.start (cognitive 34) Sources/ContainerBuild/Builder+Start.swift:31— Builder.start has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (13 pts), error handling 2 (5 pts), match/switch 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Message.serialize (cognitive 32) Sources/DNSServer/Records/Message.swift:185— Message.serialize has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 10 (15 pts), if/else 11, loops 6 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
RuntimeService.bootstrap (cognitive 30) Sources/Services/RuntimeLinux/Server/RuntimeService.swift:137— RuntimeService.bootstrap has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 3 (5 pts), error handling 3 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AttachmentAllocator.allocate (cognitive 29) Sources/Services/Network/Server/AttachmentAllocator.swift:64— AttachmentAllocator.allocate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 2 (4 pts), boolean chains 3, loops 2 (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.
BuildOptions.validate (cognitive 26) Sources/ContainerCommands/Build/BuildOptions.swift:147— BuildOptions.validate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 1 (3 pts), boolean chains 2, loops 2, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DNSName.bindBuffer (cognitive 26) Sources/DNSServer/Records/DNSName.swift:142— DNSName.bindBuffer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 2, loops 1, ternaries 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.
AttachmentNameValidator.validate (cognitive 25) Sources/Services/ContainerAPIService/Server/Containers/AttachmentNameValidator.swift:43— AttachmentNameValidator.validate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (7 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NetworksService.registerService (cognitive 25) Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift:342— NetworksService.registerService has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SnapshotStore.unpack (cognitive 24) Sources/Services/ContainerImagesService/Server/SnapshotStore.swift:70— SnapshotStore.unpack has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeService.startSocketForwarders (cognitive 24) Sources/Services/RuntimeLinux/Server/RuntimeService.swift:1015— RuntimeService.startSocketForwarders has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (6 pts), loops 3 (4 pts), error handling 1 (3 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.
AliasPolicy.validate (cognitive 23) Sources/DNSServer/AliasPolicy.swift:58— AliasPolicy.validate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3, error handling 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginLoader.findPlugins (cognitive 22) Sources/ContainerPlugin/PluginLoader.swift:100— PluginLoader.findPlugins has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Archiver.compress (cognitive 21) Sources/Services/ContainerAPIService/Client/Archiver.swift:46— Archiver.compress has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (5 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.publishSocket (cognitive 21) Sources/Services/ContainerAPIService/Client/Parser.swift:843— Parser.publishSocket has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
WorkerGroup.init (cognitive 20) Sources/ContainerCluster/WorkerGroup.swift:56— WorkerGroup.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (3 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClusterBootstrapper.create (cognitive 20) Sources/ContainerCluster/Bootstrapper/ClusterBootstrapper.swift:93— ClusterBootstrapper.create has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), error handling 2 (3 pts) (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.
Parser.network (cognitive 20) Sources/Services/ContainerAPIService/Client/Parser.swift:926— Parser.network has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 1 (3 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContainerizationProgressAdapter.handler (cognitive 19) Sources/Services/ContainerAPIService/Client/ContainerizationProgressAdapter.swift:21— ContainerizationProgressAdapter.handler has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.envFile (cognitive 19) Sources/Services/ContainerAPIService/Client/Parser.swift:212— Parser.envFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeService.snapshotDisk (cognitive 19) Sources/Services/RuntimeLinux/Server/RuntimeService.swift:803— RuntimeService.snapshotDisk has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (6 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.
ProcessIO.create (cognitive 18) Sources/Services/ContainerAPIService/Client/ProcessIO.swift:45— ProcessIO.create has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 2 (4 pts), boolean chains 2 (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.
ProcessIO.handleProcess (cognitive 18) Sources/Services/ContainerAPIService/Client/ProcessIO.swift:158— ProcessIO.handleProcess has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 2 (6 pts), loops 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Utility.containerConfigFromFlags (cognitive 18) Sources/Services/ContainerAPIService/Client/Utility.swift:69— Utility.containerConfigFromFlags has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Utility.getAttachmentConfigurations (cognitive 18) Sources/Services/ContainerAPIService/Client/Utility.swift:272— Utility.getAttachmentConfigurations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BuildFSSync.walk (cognitive 17) Sources/ContainerBuild/BuildFSSync.swift:251— BuildFSSync.walk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DNSServer.handle (cognitive 17) Sources/DNSServer/DNSServer+Handle.swift:26— DNSServer.handle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (4 pts), error handling 3, match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.process (cognitive 17) Sources/Services/ContainerAPIService/Client/Parser.swift:330— Parser.process has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 1 (nesting depth added 1). 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.
MachinesService.boot (cognitive 17) Sources/Services/MachineAPIService/Server/MachinesService.swift:328— MachinesService.boot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5, error handling 2 (4 pts), loops 2 (4 pts), match/switch 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClusterDelete.run (cognitive 16) Sources/ContainerCluster/Commands/ClusterDelete.swift:37— ClusterDelete.run has cognitive complexity 16 (threshold 15). Drivers by points: error handling 6 (8 pts), if/else 4 (5 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.volume (cognitive 16) Sources/Services/ContainerAPIService/Client/Parser.swift:597— Parser.volume has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 1 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Change-coupling hub: ContainerClient.swift → ContainersHarness.swift, ContainersService.swift, RuntimeClient.swift Sources/Services/ContainerAPIService/Client/ContainerClient.swift— `Sources/Services/ContainerAPIService/Client/ContainerClient.swift` changes together with 3 other files — `Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift`, `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift`, `Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication· Near-duplicate member family (3 members, 17 shared lines) · ×1
Near-duplicate member family (3 members, 17 shared lines) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:547— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:547-578 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:625-648 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:652-675 — These 3 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 10 shared lines) · ×1
Near-duplicate member family (3 members, 10 shared lines) Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:46— Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:46-85 | Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:90-182 | Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:223-251 — These 3 members are variants of one another: a block of 10 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) Sources/Services/ContainerImagesService/Server/ImagesService.swift:356— Sources/Services/ContainerImagesService/Server/ImagesService.swift:356-378 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:380-402 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (14 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (14 members, 50+ identical tokens) Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:100— Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:100-116 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:63-80 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:272-292 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:120-129 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:137-324 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:334-351 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:362-388 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:396-415 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:429-473 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:483-518 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:529-564 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:574-616 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:684-700 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:921-948 — These 14 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 14 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 14 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:101— Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:101-123 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:125-151 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:153-175 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:211-238 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:240-263 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:48— Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:48-67 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:265-277 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:295-311 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:383-406 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:66— Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:66-82 | Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:84-101 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) Sources/ContainerPersistence/ConfigSnapshotDecoderContainers.swift:191— Sources/ContainerPersistence/ConfigSnapshotDecoderContainers.swift:191-221 | Sources/ContainerPersistence/ConfigSnapshotDecoderContainers.swift:352-382 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) Sources/Services/ContainerImagesService/Server/ContentServiceHarness.swift:50— Sources/Services/ContainerImagesService/Server/ContentServiceHarness.swift:50-63 | Sources/Services/ContainerImagesService/Server/ContentServiceHarness.swift:65-78 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) Sources/Services/ContainerAPIService/Client/ProcessIO.swift:324— Sources/Services/ContainerAPIService/Client/ProcessIO.swift:324-353 | Sources/Services/ContainerAPIService/Client/ProcessIO.swift:355-384 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:56— Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:56-76 | Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:78-98 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:367— Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:367-381 | Sources/Services/ContainerAPIService/Server/Plugin/PluginsHarness.swift:43-56 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×1
Edited copy of a member (10 corresponding lines) Sources/ContainerResource/Container/Filesystem.swift:93— Sources/ContainerResource/Container/Filesystem.swift:93-103 | Sources/ContainerResource/Container/Filesystem.swift:106-116 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) Sources/Services/ContainerAPIService/Server/Networks/NetworksHarness.swift:59— Sources/Services/ContainerAPIService/Server/Networks/NetworksHarness.swift:59-68 | Sources/Services/MachineAPIService/Server/MachinesHarness.swift:53-61 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (24–26 lines × 2) Sources/Services/ContainerAPIService/Client/Utility.swift:93— Sources/Services/ContainerAPIService/Client/Utility.swift:93-118 | Sources/Services/MachineAPIService/Client/MachineClient.swift:47-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Client/Utility.swift:93` 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 (22–23 lines × 2) Sources/Services/ContainerAPIService/Client/Parser.swift:748— Sources/Services/ContainerAPIService/Client/Parser.swift:748-769 | Sources/Services/ContainerAPIService/Client/Parser.swift:771-793 — 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 (22 lines × 3) Sources/APIServer/ContainerDNSHandler.swift:55— Sources/APIServer/ContainerDNSHandler.swift:55-76 | Sources/APIServer/LocalhostDNSHandler.swift:100-121 | Sources/DNSServer/Handlers/HostTableResolver.swift:65-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/APIServer/ContainerDNSHandler.swift:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 3) Sources/Services/ContainerImagesService/Server/ImagesService.swift:358— Sources/Services/ContainerImagesService/Server/ImagesService.swift:358-376 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:382-400 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:406-424 — 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 `Sources/Services/ContainerImagesService/Server/ImagesService.swift:358` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (18–19 lines × 2) Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:70— Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:70-88 | Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:136-153 — 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 `Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (17 lines × 2) Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:87— Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:87-103 | Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:140-156 — 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 `Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 7) Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:80— Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:80-95 | Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:119-134 | Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:140-155 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:187-202 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:208-223 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:237-252 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:297-312 — there are 7 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/Services/ContainerImagesService/Server/ImagesService.swift:254` calls `ArchiveReader` and `Sources/Services/ContainerImagesService/Server/ImagesService.swift:225` 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 (14 lines × 5) Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:103— Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:103-116 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:127-140 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:155-168 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:213-226 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:242-255 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12–14 lines × 2) Sources/Services/ContainerAPIService/Client/Parser.swift:1134— Sources/Services/ContainerAPIService/Client/Parser.swift:1134-1147 | Sources/Services/ContainerAPIService/Client/Parser.swift:1149-1160 — 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 × 10) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:583— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:583-595 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:705-717 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:812-824 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:899-911 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:1042-1054 | Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift:208-220 | Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:71-83 | Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:94-106 | Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:136-148 | Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:160-172 — there are 10 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:583` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (13 lines × 4) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:458— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:458-470 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:588-600 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:817-829 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:842-854 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:458` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (13 lines × 3) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:554— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:554-566 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:631-643 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:658-670 — 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 `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:554` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (10–13 lines × 2) Sources/ContainerPlugin/PluginFactory.swift:80— Sources/ContainerPlugin/PluginFactory.swift:80-89 | Sources/ContainerPlugin/PluginFactory.swift:130-142 — 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 `Sources/ContainerPlugin/PluginFactory.swift:80` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (2–13 lines × 14) Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:101— Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:101-113 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:64-77 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:273-285 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:122-123 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:139-140 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:336-337 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:364-365 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:398-399 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:431-432 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:485-486 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:531-532 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:576-577 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:686-687 | Sources/Services/RuntimeLinux/Server/RuntimeService.swift:923-924 — there are 14 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 14 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/Services/RuntimeLinux/Server/RuntimeService.swift:534` calls `stopOptions`, `Signal`, `seconds` and `Sources/Services/RuntimeLinux/Server/RuntimeService.swift:401` 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 (12 lines × 12) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:373— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:373-384 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:587-598 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:709-720 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:816-827 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:841-852 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:903-914 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:1046-1057 | Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift:212-223 | Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:75-86 | Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:98-109 | Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:140-151 | Sources/Services/ContainerAPIService/Server/Volumes/VolumesService.swift:164-175 — there are 12 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 12 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:373` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (12 lines × 4) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:369— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:369-380 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:627-638 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:654-665 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:837-848 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:369` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (19 lines × 2) Sources/DNSServer/Records/Question.swift:56— Sources/DNSServer/Records/Question.swift:56-74 | Sources/DNSServer/Records/ResourceRecord.swift:58-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/DNSServer/Records/Question.swift:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–12 lines × 2) Sources/Services/MachineAPIService/Server/MachinesHarness.swift:34— Sources/Services/MachineAPIService/Server/MachinesHarness.swift:34-45 | Sources/Services/MachineAPIService/Server/MachinesHarness.swift:139-146 — 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 × 4) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:559— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:559-569 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:636-646 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:663-673 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:689-699 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:559` 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 (10 lines × 5) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:372— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:372-381 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:553-562 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:630-639 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:657-666 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:840-849 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:372` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (10 lines × 3) Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:51— Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:51-60 | Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:103-112 | Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:228-237 — 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 `Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note first that the copies are not typed on the same thing: the declarations holding them bind `platform` to `SystemPlatform = .linuxArm` in one and `SystemPlatform` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 10) Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:84— Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:84-92 | Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:123-131 | Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:144-152 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:92-100 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:142-150 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:168-176 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:191-199 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:212-220 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:241-249 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:301-309 — there are 10 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerImagesService/Server/ContentStoreService.swift:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 3) Sources/Services/ContainerAPIService/Client/Utility.swift:104— Sources/Services/ContainerAPIService/Client/Utility.swift:104-115 | Sources/Services/ContainerAPIService/Client/Utility.swift:136-144 | Sources/Services/MachineAPIService/Client/MachineClient.swift:56-67 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Client/Utility.swift:104` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 8) Sources/Services/ContainerImagesService/Server/ImagesService.swift:96— Sources/Services/ContainerImagesService/Server/ImagesService.swift:96-103 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:146-153 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:357-364 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:366-373 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:381-388 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:390-397 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:405-412 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:414-421 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 6) Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:56— Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:56-64 | Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:233-241 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:97-104 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:367-374 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:391-398 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:415-422 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `platform` to `SystemPlatform = .linuxArm` in one and `SystemPlatform` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 5) Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:47— Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:47-55 | Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:224-232 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:358-365 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:382-389 | Sources/Services/ContainerImagesService/Server/ImagesService.swift:406-413 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note first that the copies are not typed on the same thing: the declarations holding them bind `platform` to `SystemPlatform = .linuxArm` in one and `SystemPlatform` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7–8 lines × 3) Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:72— Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:72-79 | Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:91-98 | Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:130-136 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:70` calls `encode` and `Sources/Services/ContainerImagesService/Client/RemoteContentStoreClient.swift:126` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 4) Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:50— Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:50-59 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:267-273 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:297-306 | Sources/Services/ContainerAPIService/Server/Containers/ContainersHarness.swift:385-394 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 4) Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:451— Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:451-456 | Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:548-553 | Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:98-103 | Sources/Services/ContainerAPIService/Server/Kernel/KernelService.swift:108-113 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift:451` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 5) Sources/ContainerCommands/AsyncLoggableCommand.swift:28— Sources/ContainerCommands/AsyncLoggableCommand.swift:28-34 | Sources/Plugins/ContainerBuilder/BuilderDelete.swift:41-45 | Sources/Plugins/ContainerBuilder/BuilderStart.swift:50-54 | Sources/Plugins/ContainerBuilder/BuilderStatus.swift:52-56 | Sources/Plugins/ContainerBuilder/BuilderStop.swift:37-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 3) Sources/Services/Network/Client/NetworkClient.swift:136— Sources/Services/Network/Client/NetworkClient.swift:136-142 | Sources/Services/Network/Client/NetworkClient.swift:144-150 | Sources/Services/Runtime/RuntimeClient/RuntimeClient.swift:379-388 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated predicate Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift:343— `configuration.mode == .nat || configuration.mode == .hostOnly` appears character-identically in 2 files — Sources/Services/ContainerAPIService/Server/Networks/NetworksService.swift, Sources/Services/NetworkVmnet/Server/ReservedVmnetNetwork.swift. 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 Sources/Plugins/ClusterHostStore/ClusterHostStore.swift:50— `debug || (ProcessInfo.processInfo.environment["CONTAINER_DEBUG"] != nil)` appears character-identically in 2 files — Sources/Plugins/ClusterHostStore/ClusterHostStore.swift, Sources/Plugins/MachineAPIServer/MachineAPIServer+Start.swift. 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 Sources/ContainerResource/Container/Bundle.swift:145— `readonly && !mutableFs.options.contains("ro")` appears character-identically in 2 files — Sources/ContainerResource/Container/Bundle.swift, Sources/Services/MachineAPIService/Client/MachineBundle.swift. 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.
Orphaned file Sources/Services/ContainerAPIService/Server/Volumes/VolumesHarness.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Services/ContainerAPIService/Server/DiskUsage/DiskUsageService.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 6 significant file(s) lose their only recent owner: Sources/Services/ContainerAPIService/Client/NetworkClient.swift, Sources/ContainerResource/Network/NetworkResource.swift, Sources/ContainerResource/Container/PublishPort.swift, Sources/ContainerLog/FileLogHandler.swift, Sources/Services/Network/Server/NetworkHarness.swift, Sources/ContainerResource/Common/ManagedResource.swift. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 4 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (11 single-owned of 237 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 237 of the 364 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: Sources/ContainerPersistence/ConfigSnapshotDecoderContainers.swift, Sources/ContainerPersistence/ConfigSnapshotDecoder.swift, Sources/ContainerCommands/Image/OCIImageArchive.swift, Sources/Services/Runtime/RuntimeClient/RuntimeConfiguration.swift, Sources/Services/ContainerAPIService/Client/ClientImage+ImageResource.swift.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (42178 LoC, 414 module-visible types across 65 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.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 2 of 237 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 237 of the 364 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: Sources/Services/ContainerAPIService/Server/Volumes/VolumesHarness.swift, Sources/Services/ContainerAPIService/Server/DiskUsage/DiskUsageService.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D40 · Network Egress Confinement· No network policy · ×1
No network policy — No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need.
No seccomp profile REDACTED:61— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No SAST REDACTED:7— No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 8 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 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.)
Silent fallback default in catch Sources/Services/ContainerAPIService/Client/HostDNSResolver.swift:110— `listDomains` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Skipped (documented): testIsolatedNetwork Tests/IntegrationTests/Network/TestCLINetwork.swift:126— Skipped with a documented reason — a deferral, not lazy debt: wrapped in withKnownIssue — the body is expected to fail, so its failure is not reported
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. semgrep could not parse 44 file(s) — `Sources/APIServer/APIServer+Start.swift`, `Sources/ContainerBuild/BuildFSSync.swift`, `Sources/ContainerBuild/Builder+Start.swift`, `Sources/ContainerBuild/Builder.pb.swift`, `Sources/ContainerBuild/Globber.swift`, … (+39 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
Run 01a1c980-ff1e-7fcb-92c9-d6664293de0d · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 13 · Warnings: 420 · Recommendations: 19 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 11-11-2026 @ 07:27 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.