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

apple/containerization

Measured 26 October 2026, 08:59 UTC, at code version 72298de

No regression since the last survey

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

CAI score 62out of 100 Adequate
CriticalWeakAdequateStrongExemplary
No change 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: 50,742 lines of product code in 17 projects, tests not counted · Estimated rebuild effort: about 0.6 person-years · Weakest lens: Production Readiness, 54

Findings by how serious they are

14 critical 280 serious 53 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 October 2026, 08:59 UTC

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

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

45of 45 dimensions measured by tools.
314of 347 findings point to an exact file and line, so you can open each one in the code. The other 33 concern the repository as a whole, such as missing documentation.
45dimensions across 6 lenses, read from 50,742 lines of product code in 17 projects.
Chapters

Executive summary

apple/containerization falls short of our standard for a preview release because we found no automated security scanning of the code, its secrets or its dependencies. It scores 62 out of 100 and is rated Adequate, and all 14 of its critical findings are security problems.

Production Readiness, at 54, is the weakest lens and counts most in the score. The best first step is adding automated security scanning, worth about 7 points. Keeping a changelog comes next, worth about 3 points. Raising Production Readiness to 62 would lift the score to about 66.

Five settings leave the servers or containers unsafe. Four pipeline steps run downloads nobody checks, and three secrets can leak from the build pipeline. Correcting the unsafe settings, checking each download against a checksum and limiting each secret to its own step would close these risks. Fixing the weaknesses the scanner points to would fix the two security weaknesses in the code.

The product code is 50,742 lines, about €90,000 to rebuild.

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

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

If Production Readiness rose from 54 to 62, the lowest score rated Strong, the score would rise from 62 to about 66.

Code composition: what the lines of code are
Product code 63%Tests 37%
New since the last survey: 6 findings

These 6 critical or serious findings weren't in the previous survey, on 12 October 2026.

  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) Sources/ContainerizationOCI/Client/RegistryClient+Catalog.swift
  • Code Duplication · Duplicated block (6 lines × 2) Sources/ContainerizationOS/Linux/ProcNetSnmp.swift
  • Churn × Complexity Hotspots · Hotspot: vminitd/Sources/VminitdCore/Server+GRPC.swift vminitd/Sources/VminitdCore/Server+GRPC.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/Containerization/Vminitd.swift Sources/Containerization/Vminitd.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/Containerization/CHVirtualMachineInstance.swift Sources/Containerization/CHVirtualMachineInstance.swift
  • Churn × Complexity Hotspots · Repeated repair: Sources/ContainerizationEXT4/EXT4+Formatter.swift Sources/ContainerizationEXT4/EXT4+Formatter.swift

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

Fixed since the last survey: 1 finding

This critical or serious finding was in the previous survey, on 12 October 2026, and is gone from this one.

  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) Sources/ContainerizationOCI/Client/RegistryClient+Catalog.swift
Rebuild cost: about €90,000 · Estimate
Cost to rebuild€30,000 to €150,000, for 498 to 1,580 hours of work, about 0.6 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 62. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 50,742 lines of product code
What it is notNot 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: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

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

1
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.
Raises the score by about 7 points · Medium effort · Security & performance tooling
2
Keep a changelog (e.g.
Keep-a-Changelog) recording what shipped in each release.
Raises the score by about 3 points · Medium effort · Release Hygiene
3
Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.
Raises the score by about 3 points · Medium effort · Async & latency hygiene

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 €90,000 to build again, about 0.6 person-years of work. Its weakest lens is Production Readiness, at 54 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
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. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

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.

arch CArchive CArchive CShim CShim Cgroup Cgroup ContainerizationOCI ContainerizationOCI Cgroup->ContainerizationOCI ContainerizationOS ContainerizationOS Cgroup->ContainerizationOS LCShim LCShim Cgroup->LCShim CloudHypervisor CloudHypervisor Containerization Containerization Containerization->CShim Containerization->CloudHypervisor ContainerizationArchive ContainerizationArchive Containerization->ContainerizationArchive ContainerizationEXT4 ContainerizationEXT4 Containerization->ContainerizationEXT4 ContainerizationExtras ContainerizationExtras Containerization->ContainerizationExtras ContainerizationIO ContainerizationIO Containerization->ContainerizationIO ContainerizationNetlink ContainerizationNetlink Containerization->ContainerizationNetlink Containerization->ContainerizationOCI Containerization->ContainerizationOS ContainerizationArchive->CArchive ContainerizationArchive->ContainerizationExtras ContainerizationArchive->ContainerizationOS ContainerizationEXT4->ContainerizationArchive ContainerizationEXT4->ContainerizationOS ContainerizationError ContainerizationError ContainerizationExtras->ContainerizationError ContainerizationIO->ContainerizationOS ContainerizationNetlink->ContainerizationExtras ContainerizationNetlink->ContainerizationOS ContainerizationOCI->ContainerizationError ContainerizationOCI->ContainerizationExtras ContainerizationOCI->ContainerizationOS ContainerizationOS->CShim ContainerizationOS->ContainerizationError VminitdCore VminitdCore VminitdCore->Cgroup VminitdCore->Containerization VminitdCore->ContainerizationArchive VminitdCore->ContainerizationIO VminitdCore->ContainerizationNetlink VminitdCore->ContainerizationOS VminitdCore->LCShim cctl cctl cctl->Containerization cctl->ContainerizationArchive cctl->ContainerizationEXT4 cctl->ContainerizationExtras cctl->ContainerizationOCI cctl->ContainerizationOS containerization-integration containerization-integration containerization-integration->Containerization

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.

4 modules, with 1 dependency between them. Every module uses only modules listed above it, so there are no loops.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 vminitd~Cgroup2 vminitd~vmexec3 vminitd~vminitd4 vminitd~VminitdCore
1 vminitd~Cgroup
2 vminitd~vmexec
3 vminitd~vminitd
4 vminitd~VminitdCore7
Uses a module listed above itPart of a loopThe module itself
1 vminitd~Cgroup2 vminitd~vmexec3 vminitd~vminitd4 vminitd~VminitdCorevminitd~Cgroup1vminitd~vmexec2vminitd~vminitd3vminitd~VminitdCore47

At a glance — Code Health · 79% · Strong ·

At a glance — Architecture · 89% · Adequate · gated by D26 ·

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

At a glance — Readiness · 54% · Adequate · gated by P3 ·

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

At a glance — Performance · 63% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A02:2025 — Security Misconfiguration12High / Critical
A05:2025 — Injection9High / Critical
A03:2025 — Software Supply Chain Failures4Medium

Roadmap

First, integrate automated security scanning into the CI pipeline to block regressions and maintain a changelog to track release history. Next, replace blocking thread waits with proper async patterns to improve latency and reduce allocation density on hot paths. Finally, implement observability through distributed tracing and health-check endpoints to enhance operational visibility.

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

Do thisHelpsEffortDimension
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.+6.5 ptsMediumSecurity & performance tooling
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+3.3 ptsMediumRelease Hygiene
Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.+2.8 ptsMediumAsync & latency hygiene
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.3 ptsLowADR Quality
Raise allocation-aware density on the hot paths — currently 69 use(s) across 52,143 production line(s) (~1.3/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.+2.5 ptsMediumAllocation hygiene
Consider OpenTelemetry tracing/metrics (swift-otel with swift-distributed-tracing) and a health-check endpoint (a /health route on your Vapor/Hummingbird router) for operability.+1.4 ptsMediumObservability
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+1.2 ptsMediumArchitecture documentation
Resolve the 26 No assertions finding(s) in Test Quality — start with TestEXT4Reader+IO.swift (6), ClientTests.swift (4), TestEXT4Journal.swift (3).+1.0 ptsMediumTest Quality

File quality

Per-file score 0–10 — a quality signature. Of 95 files carrying findings, judged against the Preview bar: 1% slop · 12% mixed · 87% near-clean.

FileScoreBandWorst signal
REDACTED2.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.0MixedIaC & Container Security: High IaC: REDACTED
vminitd/Sources/vmexec/ExecCommand.swift5.6MixedCognitive Complexity: ExecCommand.execInNamespaces (cognitive 21)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
Sources/ContainerizationExtras/IPv4Address.swift6.0MixedExplicit Debt: TodoComment
vminitd/Sources/VminitdCore/Server+GRPC.swift6.0MixedExplicit Debt: TodoComment
Sources/Integration/Suite.swift6.0MixedExplicit Debt: TodoComment
examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift6.0MixedExplicit Debt: TodoComment
Sources/Containerization/VZVirtualMachineInstance.swift6.3MixedCyclomatic Complexity: Configuration.toVZ (cyclomatic 20)
Sources/ContainerizationExtras/IPv6Address+Parse.swift6.7MixedExplicit Debt: TodoComment
Sources/Containerization/Image/InitImage.swift6.7MixedExplicit Debt: TodoComment
Sources/Containerization/LinuxPod.swift7.0Near-cleanCyclomatic Complexity: LinuxPod.create (cyclomatic 34)
Sources/ContainerizationNetlink/Types.swift7.0Near-cleanCyclomatic Complexity: LinkStatistics64.appendBuffer (cyclomatic 24)
Sources/Containerization/LinuxContainer.swift7.0Near-cleanCyclomatic Complexity: LinuxContainer.stop (cyclomatic 16)
Sources/ContainerizationArchive/ArchiveWriter.swift7.0Near-cleanCognitive Complexity: ArchiveWriter.archive (cognitive 22)
Sources/ContainerizationNetlink/NetlinkSession.swift7.0Near-cleanCognitive Complexity: NetlinkSession.linkSetAttributes (cognitive 18)
vminitd/Sources/VminitdCore/Runc/RuncIO.swift7.0Near-cleanCode Duplication: Duplicated block (21–22 lines × 2)
vminitd/Sources/VminitdCore/Runc/Runc.swift7.0Near-cleanCyclomatic Complexity: Runc.execute (cyclomatic 23)
Sources/ContainerizationEXT4/EXT4Reader+IO.swift7.1Near-cleanCyclomatic Complexity: EXT4Reader.performRead (cyclomatic 23)

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

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

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

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

Could not be resolved — 35

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

Methodology & how to trust this report

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

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

What we checked — 45 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D14D15D16D17D20D26D28D29D30D31D34D35D36D43AX10AX3AX4AX8AX9M1M2M3M4P1P10P2P3P4P6PF2PF3X14X26X28X3

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1776f-9e4c-70bc-a7cb-f3cec19fff8b.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — a coverage step in CI (`swift test --enable-code-coverage`) shows coverage is measured in your own CI. Commit the lcov/Cobertura report it 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.swift) and this repository declares a SwiftPM test suite (containerization), 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.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22'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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `Sources/Containerization/CHHotplugProvider.swift`, `Sources/Containerization/CHVirtualMachineInstance.swift`, `Sources/Containerization/Image/ImageStore/ImageStore+Import.swift`, `Sources/Containerization/Image/ImageStore/ImageStore+Platforms.swift`, `Sources/Containerization/LinuxContainer.swift`, … (+29 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.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — ------ REDACTED:2 -------------------- 1 | ARG SWIFT_VERSION=6.3.0 2 | >>> FROM swift:${SWIFT_VERSION}-noble 3 | 4 | RUN apt-get update \ -------------------- 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": Forbidden; runtime evidence skipped.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • 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 is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • 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: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.8 / 10Adequate✓ Tool-verified

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

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

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

28 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was NBDConnectionHandler.processBuffer at 46. A further 6 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 CapabilityName.capValue at 42 — they are counted neither in the figure above nor in this dimension's score. 5 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/ContainerizationOS/Linux/Capabilities.swift (CapabilityName.capValue at 42), Sources/ContainerizationArchive/ArchiveError.swift (ArchiveError.description at 20), vminitd/Sources/vmexec/vmexec.swift (App.setRLimits at 19), Sources/Containerization/LinuxProcessConfiguration.swift (Kind.description at 17), Sources/ContainerizationArchive/ArchiveWriterConfiguration.swift (Format.code at 16). 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.

NBDConnectionHandler.processBuffer (cyclomatic 46)Sources/Integration/NBDServer.swift:174
LinuxPod.create (cyclomatic 34)Sources/Containerization/LinuxPod.swift:697
RegistryClient.request (cyclomatic 33)Sources/ContainerizationOCI/Client/RegistryClient.swift:181
VsockProxy.handleConn (cyclomatic 31)vminitd/Sources/VminitdCore/VsockProxy.swift:191
EXT4Reader.export (cyclomatic 29)Sources/ContainerizationEXT4/EXT4Reader+Export.swift:22

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

What to do

  1. Bring the 28 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with NBDConnectionHandler.processBuffer (cyclomatic 46), LinuxPod.create (cyclomatic 34), RegistryClient.request (cyclomatic 33). — 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 28 together lifts Cyclomatic Complexity from 6.8 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity4.9 / 10Weak✓ Tool-verified

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

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

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

59 method(s) exceeded the cognitive complexity threshold of 15; the worst was NBDConnectionHandler.processBuffer at 124.

NBDConnectionHandler.processBuffer (cognitive 124)Sources/Integration/NBDServer.swift:174
EXT4Reader.export (cognitive 89)Sources/ContainerizationEXT4/EXT4Reader+Export.swift:22
RegistryClient.request (cognitive 87)Sources/ContainerizationOCI/Client/RegistryClient.swift:181
LinuxPod.create (cognitive 78)Sources/Containerization/LinuxPod.swift:697
Initd.containerStatistics (cognitive 56)vminitd/Sources/VminitdCore/Server+GRPC.swift:1651

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

What to do

  1. Bring the 4 bodies over 60 down to 60 or less in Cognitive Complexity — start with NBDConnectionHandler.processBuffer (cognitive 124), EXT4Reader.export (cognitive 89), RegistryClient.request (cognitive 87). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cognitive Complexity from 4.9 to about 6.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes8.6 / 10Strong✓ Tool-verified

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

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

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

21 god class(es) detected.

FileTooLong: VminitdCore/Server+GRPC.swift · ×11vminitd/Sources/VminitdCore/Server+GRPC.swift
MethodTooLong: IntegrationSuite.run · ×5Sources/Integration/Suite.swift:475
TooManyMethods: Initd · ×3vminitd/Sources/VminitdCore/Server.swift:28
ClassTooLong: NetlinkSession · ×2Sources/ContainerizationNetlink/NetlinkSession.swift:23

What to do

  1. Resolve the 11 FileTooLong finding(s) in God Classes — start with Server+GRPC.swift, LinuxContainer.swift, EXT4+Formatter.swift. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 5 MethodTooLong finding(s) in God Classes — start with LinuxPod.swift (2), Suite.swift, NBDServer.swift. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 3 TooManyMethods finding(s) in God Classes — start with Server.swift, Vminitd.swift, LinuxContainer.swift. — One of this dimension's main actionable groups (3 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.0 / 10Stronggated by 108 serious findings✓ Tool-verified

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

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

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

102 duplicated block group(s) detected. A further 6 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 3 of the 108 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (8 lines × 2) · ×9Sources/Containerization/ContainerManager.swift:221
Duplicated block (7 lines × 2) · ×7Sources/ContainerizationNetlink/Types.swift:254
Duplicated block (9 lines × 2) · ×6Sources/Containerization/LinuxContainer.swift:447
Duplicated block (12 lines × 2) · ×5Sources/Containerization/LinuxProcessConfiguration.swift:410
Duplicated block (15 lines × 2) · ×4Sources/Containerization/ContainerStatistics.swift:96

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

What to do

  1. Resolve the 9 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with RuncIO.swift (2), ContainerManager.swift, CIDRv4.swift. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 7 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with Types.swift, RegistryClient+Catalog.swift, FileDescriptorOps.swift. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 6 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with LinuxContainer.swift (2), LinuxPod.swift, KeychainQuery.swift. — One of this dimension's main actionable groups (6 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling8.1 / 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.

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

17 production modules (SwiftPM), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 4 module(s) off the main sequence, with abstractness counted on 14 of the 17 (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: CloudHypervisor · ×4

What to do

  1. Resolve the 4 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D6 · Cohesion (LCOM4)9.3 / 10Stronggated by 4 serious findings✓ Tool-verified

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

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

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

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

4 of 67 classes have LCOM4 above 3.

Low cohesion: VZVirtualMachineInstance (LCOM4 7) · ×4Sources/Containerization/VZVirtualMachineInstance.swift:28

What to do

  1. Resolve the 4 Low cohesion finding(s) in Cohesion (LCOM4) — start with VZVirtualMachineInstance.swift, Integer+Extensions.swift, LocalOCILayoutClient.swift. — One of this dimension's main actionable groups (4 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.6 / 10Stronggated by 26 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

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

15 skipped (15 with a documented reason), 26 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 898 tests.

No assertions: initSucceeds · ×26Tests/CloudHypervisorTests/ClientTests.swift:29
Skipped (documented): loginSucceedsAgainstArtifactRegistry · ×15Tests/ContainerizationOCITests/ArtifactRegistryLoginTests.swift:61

What to do

  1. Resolve the 26 No assertions finding(s) in Test Quality — start with TestEXT4Reader+IO.swift (6), ClientTests.swift (4), TestEXT4Journal.swift (3). — One of this dimension's main actionable groups (26 warning-level).
  2. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D12 · Dependency Hygiene9.1 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

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

19 outdated direct SwiftPM dependencies, 0 pinning defect(s). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.

Outdated: async-http-client · ×17

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 32 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 31 of them read from the licence file the repository carries at the revision Package.resolved pins, and 1 — unpinned, or whose licence file could not be read or named — from api.deps.dev, which reports the licence the repository declares today. Graded: every package a committed Package.resolved pins, direct and transitive, and every declared dependency none pins. 1 of them declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

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

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

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

Top hotspots: Sources/Containerization/LinuxPod.swift (6×34=204); vminitd/Sources/VminitdCore/Server+GRPC.swift (8×25=200); Sources/Containerization/Vminitd.swift (8×15=120) Repeated repair below the complexity floor: Sources/ContainerizationEXT4/EXT4+Formatter.swift (3 of 5 changes were fixes)

Hotspot: Sources/Containerization/LinuxPod.swift · ×6Sources/Containerization/LinuxPod.swift:697
Repeated repair: Sources/ContainerizationEXT4/EXT4+Formatter.swiftSources/ContainerizationEXT4/EXT4+Formatter.swift:1490

What to do

  1. Resolve the 6 Hotspot finding(s) in Churn × Complexity Hotspots — start with LinuxPod.swift, Server+GRPC.swift, Vminitd.swift. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with EXT4+Formatter.swift. — One of this dimension's main actionable groups (1 warning-level).

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

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.

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

9 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is Sources/ContainerizationOS/Linux/Capabilities.swift. Counted over 189 of the 248 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.

D17 · Explicit Debt10.0 / 10Stronggated by 8 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

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

8 deducted task-comment markers across 50742 LoC (0.0/KLoC) → score 10.0. 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.

TodoComment · ×8vminitd/Sources/VminitdCore/Server+GRPC.swift:632

What to do

  1. Resolve the 8 TodoComment finding(s) in Explicit Debt — start with Server+GRPC.swift, RunAgentCommand.swift, Suite.swift. — One of this dimension's main actionable groups (8 warning-level).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

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

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

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

1 of 2 build units (SwiftPM) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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.

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

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

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

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

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

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

9 finding(s): 0 critical, 9 high, 0 medium, 0 low. semgrep hit a parse error in 2 file(s) — `Sources/ContainerizationArchive/CArchive/include/archive.h` (line 153, line 160, line 169, …), `Sources/ContainerizationArchive/CArchive/include/archive_entry.h` (line 204, line 206, line 207, …) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

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

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

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

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D31 · IaC & Container Security7.9 / 10Adequategated by 5 critical findings✓ Tool-verified

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

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

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

12 finding(s): 0 critical, 5 high, 3 medium, 4 low.

REDACTED
REDACTED
REDACTED

What to do

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

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

D34 · Knowledge Freshness9.8 / 10Exemplary✓ Tool-verified

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

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

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

3 of 189 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Sources/Integration/NBDServer.swift. Counted over 189 of the 248 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×3Sources/Integration/NBDServer.swift:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.8 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: ExecCommand.swift↔RunCommand.swift 70%; Suite.swift↔RunCommand.swift 59%; Package.swift↔Package.swift 57%

Change coupling: ExecCommand.swift ↔ RunCommand.swift · ×3vminitd/Sources/vmexec/ExecCommand.swift:1

What to do

  1. Resolve the 3 Change coupling finding(s) in Change Coupling — start with ExecCommand.swift, Suite.swift, Package.swift. — One of this dimension's main actionable groups (3 warning-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

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

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

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

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

What to do

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

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

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

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

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

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

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.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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.

M1 · Documentation (README)9.3 / 10Exemplary✓ Tool-verified

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

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

What to do

  • Add a README to the 1 of 3 project(s) that lack one — worth up to 0.7 pts.
M2 · Architecture documentation2.0 / 10Weak✓ Tool-verified

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

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

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

What to do

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

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

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

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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

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

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Consider OpenTelemetry tracing/metrics (swift-otel with swift-distributed-tracing) and a health-check endpoint (a /health route on your Vapor/Hummingbird router) for operability.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • 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 15111 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: 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.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

  • 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.
PF2 · Allocation hygiene6.7 / 10Strong✓ Tool-verified

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

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

What to do

  • Raise allocation-aware density on the hot paths — currently 69 use(s) across 52,143 production line(s) (~1.3/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
  • Swift: on hot paths, reserveCapacity before appending, use ContiguousArray for class-element arrays, work in place with withUnsafeBufferPointer/withUnsafeTemporaryAllocation, and make large values ~Copyable with borrowing/consuming parameters.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

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

  • `start` is async and calls .wait() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. (×2) — Sources/Containerization/CHProcess.swift:68, Sources/Containerization/VirtiofsdProcess.swift:79
  • `execute` is async and calls .wait() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. — vminitd/Sources/VminitdCore/Runc/Runc.swift:334

What to do

  • Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

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

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

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

X3 · Exception handling7.3 / 10Strong✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×5) — vminitd/Sources/VminitdCore/Server+GRPC.swift:738, vminitd/Sources/VminitdCore/VsockProxy.swift:370, Sources/ContainerizationOCI/FileManager+Size.swift:27, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. — Sources/ContainerizationOS/Terminal.swift:71

What to do

  • Swallowed exception (caught, then discarded)

Reference — by lens

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

LensScoreRatingImpact
Code Health79%StrongStrongest area.
Architecture89%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity71%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness54%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security71%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance63%AdequateAcceptable, with room to improve.
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 — 1 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 — 71 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) — ------ REDACTED:2 -------------------- 1 | ARG SWIFT_VERSION=6.3.0 2 | >>> FROM swift:${SWIFT_VERSION}-noble 3 | 4 | RUN apt-get update \ -------------------- 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": Forbidden; 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
  • 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# 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+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic 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
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.swift), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 34 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.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • 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.
  • 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
  • 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
  • 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.

Critical — 14 finding(s)
D31 · IaC & Container Security · High IaC · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
Serious — 280 finding(s)
D10 · Test Quality · No assertions · ×26
  • No assertions: initSucceeds Tests/CloudHypervisorTests/ClientTests.swift:29 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: malformedJSONThrowsDecoding Tests/CloudHypervisorTests/ClientTests.swift:426 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: shutdownDrainsHTTPClientBeforeGroup Tests/CloudHypervisorTests/ClientTests.swift:465 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: shutdownOwnsGroup Tests/CloudHypervisorTests/ClientTests.swift:490 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: encodeNegativeTimestamp Tests/ContainerizationEXT4Tests/TestEXT4Format.swift:428 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: closeEmptyFilesystem Tests/ContainerizationEXT4Tests/TestEXT4Format.swift:448 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: writeback Tests/ContainerizationEXT4Tests/TestEXT4Journal.swift:42 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: ordered Tests/ContainerizationEXT4Tests/TestEXT4Journal.swift:53 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: journalData Tests/ContainerizationEXT4Tests/TestEXT4Journal.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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: listDirectoryOnFileThrowsNotAFile Tests/ContainerizationEXT4Tests/TestEXT4Reader+IO.swift:159 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: symlinkLoopDetection Tests/ContainerizationEXT4Tests/TestEXT4Reader+IO.swift:229 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: complexSymlinkLoopDetection Tests/ContainerizationEXT4Tests/TestEXT4Reader+IO.swift:252 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: selfReferencingSymlink Tests/ContainerizationEXT4Tests/TestEXT4Reader+IO.swift:277 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: symlinkLoopThroughDirectory Tests/ContainerizationEXT4Tests/TestEXT4Reader+IO.swift:320 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: readOnSymlinkWithFollowFalseThrows Tests/ContainerizationEXT4Tests/TestEXT4Reader+IO.swift:456 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testLargestIPv4AddressAllocator Tests/ContainerizationExtrasTests/TestNetworkAddress+Allocator.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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: pathResolvesConsistentlyUnderSymlinkedRoot Tests/ContainerizationOCITests/DigestValidationTests.swift:103 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: minimalCapabilitiesDecode Tests/ContainerizationOCITests/OCISpecTests.swift:147 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: ping Tests/ContainerizationOCITests/RegistryClientTests.swift:76 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: addAndDeletePipeFD Tests/ContainerizationOSTests/EpollTests.swift:86 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testMkdirSecureInvalid Tests/ContainerizationOSTests/FileDescriptorOpsTests.swift:156 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testRemoveNonExistent Tests/ContainerizationOSTests/FileDescriptorOpsTests.swift:482 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: acceptsPathWithinCapacity Tests/ContainerizationOSTests/UnixTypeTests.swift:39 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: releaseAllowsIdReuse Tests/ContainerizationTests/AllocatorTests.swift:67 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: releaseUnknownIdIsNoOp Tests/ContainerizationTests/AllocatorTests.swift:79 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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.
  • + 1 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×11
  • FileTooLong: VminitdCore/Server+GRPC.swift vminitd/Sources/VminitdCore/Server+GRPC.swift — FileTooLong — 1445 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 945 over it, 2.89× 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: Containerization/LinuxContainer.swift Sources/Containerization/LinuxContainer.swift — FileTooLong — 984 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 484 over it, 1.97× 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: ContainerizationEXT4/EXT4+Formatter.swift Sources/ContainerizationEXT4/EXT4+Formatter.swift — FileTooLong — 969 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 469 over it, 1.94× 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: Containerization/LinuxPod.swift Sources/Containerization/LinuxPod.swift — FileTooLong — 864 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 364 over it, 1.73× 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: ContainerizationNetlink/NetlinkSession.swift Sources/ContainerizationNetlink/NetlinkSession.swift — FileTooLong — 671 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: NetlinkSession (23-1006). The bar is 500 significant lines; this is 171 over it, 1.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ContainerizationNetlink/Types.swift Sources/ContainerizationNetlink/Types.swift — FileTooLong — 566 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 66 over it, 1.13× 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: Cgroup/Cgroup2Manager.swift vminitd/Sources/Cgroup/Cgroup2Manager.swift — FileTooLong — 560 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: Cgroup2Manager (46-582). The bar is 500 significant lines; this is 60 over it, 1.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: cctl/RunCommand.swift Sources/cctl/RunCommand.swift — FileTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 27 over it, 1.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Integration/Suite.swift Sources/Integration/Suite.swift — FileTooLong — 521 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: IntegrationSuite (170-797). The bar is 500 significant lines; this is 21 over it, 1.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Runc/Runc.swift vminitd/Sources/VminitdCore/Runc/Runc.swift — FileTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 20 over it, 1.04× 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: ContainerizationEXT4/EXT4+Types.swift Sources/ContainerizationEXT4/EXT4+Types.swift — FileTooLong — 519 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 19 over it, 1.04× 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) Sources/Containerization/ContainerManager.swift:221 — Sources/Containerization/ContainerManager.swift:221-228 | Sources/Containerization/ContainerManager.swift:258-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Containerization/ContainerManager.swift:221` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) Sources/ContainerizationExtras/CIDRv4.swift:27 — Sources/ContainerizationExtras/CIDRv4.swift:27-34 | Sources/ContainerizationExtras/CIDRv6.swift:28-35 — 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/ContainerizationExtras/CIDRv4.swift:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) Sources/ContainerizationNetlink/Types.swift:244 — Sources/ContainerizationNetlink/Types.swift:244-251 | Sources/ContainerizationNetlink/Types.swift:570-577 — 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/ContainerizationNetlink/Types.swift:244` 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 (8 lines × 2) Sources/ContainerizationOCI/Index.swift:45 — Sources/ContainerizationOCI/Index.swift:45-52 | Sources/ContainerizationOCI/Manifest.swift:47-54 — 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/ContainerizationOCI/Index.swift:45` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `mediaType` to `String = MediaTypes.index` in one and `String = MediaTypes.imageManifest` 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 × 2) Sources/ContainerizationOS/User.swift:62 — Sources/ContainerizationOS/User.swift:62-69 | Sources/ContainerizationOS/User.swift:91-98 — 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/ContainerizationOS/User.swift:62` 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/ContainerizationOS/User.swift:70` calls `UInt32`, `parseError` and `Sources/ContainerizationOS/User.swift:99` 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 (8 lines × 2) vminitd/Sources/VminitdCore/OSFile+Splice.swift:66 — vminitd/Sources/VminitdCore/OSFile+Splice.swift:66-73 | vminitd/Sources/VminitdCore/OSFile+Splice.swift:81-88 — 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 `vminitd/Sources/VminitdCore/OSFile+Splice.swift:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) vminitd/Sources/VminitdCore/Runc/RuncIO.swift:41 — vminitd/Sources/VminitdCore/Runc/RuncIO.swift:41-48 | vminitd/Sources/VminitdCore/TerminalIO.swift:39-46 — before extracting anything, compare `vminitd/Sources/VminitdCore/Runc/RuncIO.swift` and `vminitd/Sources/VminitdCore/TerminalIO.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) vminitd/Sources/VminitdCore/Runc/RuncIO.swift:188 — vminitd/Sources/VminitdCore/Runc/RuncIO.swift:188-195 | vminitd/Sources/VminitdCore/StandardIO.swift:40-47 — before extracting anything, compare `vminitd/Sources/VminitdCore/Runc/RuncIO.swift` and `vminitd/Sources/VminitdCore/StandardIO.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) vminitd/Sources/VminitdCore/RuncExecProcess.swift:393 — vminitd/Sources/VminitdCore/RuncExecProcess.swift:393-400 | vminitd/Sources/VminitdCore/RuncProcess.swift:273-280 — before extracting anything, compare `vminitd/Sources/VminitdCore/RuncExecProcess.swift` and `vminitd/Sources/VminitdCore/RuncProcess.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D17 · Explicit Debt · TodoComment · ×8
  • TodoComment vminitd/Sources/VminitdCore/Server+GRPC.swift:632 — // TODO: archiveDirectory is path-based; running containers can still — 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 examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:690 — // TODO: Refine install customization as we integrate more agent definitions rather than inspecting installCommands directly. — 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/Integration/Suite.swift:683 — // Filesystem operations (TODO: promote to cross-platform once verified on CH) — 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/ContainerizationExtras/IPv4Address.swift:70 — // TODO: spans? — 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/ContainerizationExtras/IPv6Address+Parse.swift:153 — // TODO: maybe refactor for performance — 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/Containerization/UnixSocketConfiguration.swift:22 — // TODO: Realistically, we can just hash this struct and use it as the "id". — 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/Containerization/Image/InitImage.swift:56 — // TODO: compute and fill in the correct diffID for the above layer — 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/Containerization/Image/ImageStore/ImageStore+Import.swift:129 — // TODO: Explicitly handle other content types — 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×7
  • Duplicated block (7 lines × 2) Sources/ContainerizationNetlink/Types.swift:254 — Sources/ContainerizationNetlink/Types.swift:254-260 | Sources/ContainerizationNetlink/Types.swift:344-350 — 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/ContainerizationNetlink/Types.swift:254` 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 (7 lines × 2) Sources/ContainerizationOCI/Client/RegistryClient+Catalog.swift:59 — Sources/ContainerizationOCI/Client/RegistryClient+Catalog.swift:59-65 | Sources/ContainerizationOCI/Client/RegistryClient+Referrers.swift:50-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) Sources/ContainerizationOS/FileDescriptorOps.swift:452 — Sources/ContainerizationOS/FileDescriptorOps.swift:452-458 | Sources/ContainerizationOS/FileDescriptorOps.swift:568-574 — 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/ContainerizationOS/FileDescriptorOps.swift:452` 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 (7 lines × 2) vminitd/Sources/VminitdCore/Server+GRPC.swift:896 — vminitd/Sources/VminitdCore/Server+GRPC.swift:896-902 | vminitd/Sources/VminitdCore/Server+GRPC.swift:905-911 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) vminitd/Sources/VminitdCore/VsockProxy.swift:164 — vminitd/Sources/VminitdCore/VsockProxy.swift:164-170 | vminitd/Sources/VminitdCore/VsockProxy.swift:229-235 — 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 `vminitd/Sources/VminitdCore/VsockProxy.swift:164` 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) vminitd/Sources/VminitdCore/Runc/RuncIO.swift:50 — vminitd/Sources/VminitdCore/Runc/RuncIO.swift:50-56 | vminitd/Sources/VminitdCore/TerminalIO.swift:48-54 — before extracting anything, compare `vminitd/Sources/VminitdCore/Runc/RuncIO.swift` and `vminitd/Sources/VminitdCore/TerminalIO.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) Sources/ContainerizationExtras/CIDRv4.swift:41 — Sources/ContainerizationExtras/CIDRv4.swift:41-47 | Sources/ContainerizationExtras/CIDRv6.swift:42-48 — 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×6
  • Hotspot: Sources/Containerization/LinuxPod.swift Sources/Containerization/LinuxPod.swift:697 — Sources/Containerization/LinuxPod.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in LinuxPod.create at line 697. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:08:15 -07:00' --until='2026-10-23 17:08:15 -07:00' --full-history --no-merges -- Sources/Containerization/LinuxPod.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: vminitd/Sources/VminitdCore/Server+GRPC.swift vminitd/Sources/VminitdCore/Server+GRPC.swift:1651 — vminitd/Sources/VminitdCore/Server+GRPC.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in Initd.containerStatistics at line 1651. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:08:15 -07:00' --until='2026-10-23 17:08:15 -07:00' --full-history --no-merges -- vminitd/Sources/VminitdCore/Server+GRPC.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/Containerization/Vminitd.swift Sources/Containerization/Vminitd.swift:122 — Sources/Containerization/Vminitd.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in Vminitd.containerStatistics at line 122. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:08:15 -07:00' --until='2026-10-23 17:08:15 -07:00' --full-history --no-merges -- Sources/Containerization/Vminitd.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/ContainerizationEXT4/Formatter+Unpack.swift Sources/ContainerizationEXT4/Formatter+Unpack.swift:85 — Sources/ContainerizationEXT4/Formatter+Unpack.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Formatter.unpackEntries at line 85. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:08:15 -07:00' --until='2026-10-23 17:08:15 -07:00' --full-history --no-merges -- Sources/ContainerizationEXT4/Formatter+Unpack.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/ContainerizationOCI/Client/RegistryClient.swift Sources/ContainerizationOCI/Client/RegistryClient.swift:181 — Sources/ContainerizationOCI/Client/RegistryClient.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in RegistryClient.request at line 181. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:08:15 -07:00' --until='2026-10-23 17:08:15 -07:00' --full-history --no-merges -- Sources/ContainerizationOCI/Client/RegistryClient.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/Containerization/CHVirtualMachineInstance.swift Sources/Containerization/CHVirtualMachineInstance.swift:507 — Sources/Containerization/CHVirtualMachineInstance.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in CHVirtualMachineInstance.buildVmConfig at line 507. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:08:15 -07:00' --until='2026-10-23 17:08:15 -07:00' --full-history --no-merges -- Sources/Containerization/CHVirtualMachineInstance.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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×6
  • Duplicated block (9 lines × 2) Sources/Containerization/LinuxContainer.swift:447 — Sources/Containerization/LinuxContainer.swift:447-455 | Sources/Containerization/LinuxPod.swift:356-364 — 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/Containerization/LinuxContainer.swift:447` 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 (9 lines × 2) Sources/Containerization/LinuxContainer.swift:1402 — Sources/Containerization/LinuxContainer.swift:1402-1410 | Sources/Containerization/LinuxContainer.swift:1561-1569 — 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/Containerization/LinuxContainer.swift:1402` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/Containerization/LinuxContainer.swift:1557` calls `first`, `ContainerizationError` and `Sources/Containerization/LinuxContainer.swift:1401` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) Sources/Containerization/LinuxPod.swift:990 — Sources/Containerization/LinuxPod.swift:990-998 | Sources/Containerization/LinuxPod.swift:1137-1145 — 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/Containerization/LinuxPod.swift:990` 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/ContainerizationOS/Keychain/KeychainQuery.swift:132 — Sources/ContainerizationOS/Keychain/KeychainQuery.swift:132-140 | Sources/ContainerizationOS/Keychain/KeychainQuery.swift:181-189 — 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/ContainerizationOS/Socket/BidirectionalRelay.swift:292 — Sources/ContainerizationOS/Socket/BidirectionalRelay.swift:292-300 | Sources/ContainerizationOS/Socket/BidirectionalRelay.swift:344-352 — 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/ContainerizationOS/Socket/BidirectionalRelay.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.
  • Duplicated block (9 lines × 2) Sources/ContainerizationExtras/IndexedAddressAllocator.swift:118 — Sources/ContainerizationExtras/IndexedAddressAllocator.swift:118-126 | Sources/ContainerizationExtras/RotatingAddressAllocator.swift:115-123 — 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.
D3 · God Classes · MethodTooLong · ×5
  • MethodTooLong: IntegrationSuite.run Sources/Integration/Suite.swift:475 — MethodTooLong — run runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× 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: LinuxPod.create Sources/Containerization/LinuxPod.swift:697 — MethodTooLong — create runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× 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: NBDConnectionHandler.processBuffer Sources/Integration/NBDServer.swift:174 — MethodTooLong — processBuffer runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× 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: LinuxPod.addContainer Sources/Containerization/LinuxPod.swift:490 — MethodTooLong — addContainer runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× 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: EXT4Reader.export Sources/ContainerizationEXT4/EXT4Reader+Export.swift:22 — MethodTooLong — export runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×5
  • Duplicated block (12 lines × 2) Sources/Containerization/LinuxProcessConfiguration.swift:410 — Sources/Containerization/LinuxProcessConfiguration.swift:410-421 | vminitd/Sources/VminitdCore/Runc/Runc.swift:99-110 — 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/Containerization/LinuxProcessConfiguration.swift:410` 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/ContainerizationOCI/Reference.swift:190 — Sources/ContainerizationOCI/Reference.swift:190-201 | Sources/ContainerizationOCI/Reference.swift:204-215 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) vminitd/Sources/VminitdCore/OSFile.swift:60 — vminitd/Sources/VminitdCore/OSFile.swift:60-71 | vminitd/Sources/VminitdCore/OSFile.swift:91-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `vminitd/Sources/VminitdCore/OSFile.swift:60` 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) vminitd/Sources/vmexec/ExecCommand.swift:107 — vminitd/Sources/vmexec/ExecCommand.swift:107-118 | vminitd/Sources/vmexec/RunCommand.swift:172-183 — before extracting anything, compare `vminitd/Sources/vmexec/ExecCommand.swift` and `vminitd/Sources/vmexec/RunCommand.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `vminitd/Sources/vmexec/RunCommand.swift:185` calls `unshare`, `Errno` and `vminitd/Sources/vmexec/ExecCommand.swift:120` 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 × 2) Sources/ContainerizationExtras/IndexedAddressAllocator.swift:50 — Sources/ContainerizationExtras/IndexedAddressAllocator.swift:50-61 | Sources/ContainerizationExtras/RotatingAddressAllocator.swift:45-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `size` to `Int` in one and `UInt32` 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×5
  • Swallowed exception (caught, then discarded) vminitd/Sources/VminitdCore/Server+GRPC.swift:738 — `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) vminitd/Sources/VminitdCore/VsockProxy.swift:370 — `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/ContainerizationOCI/FileManager+Size.swift:27 — `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/Containerization/CHProcess.swift:189 — `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/Containerization/TimeSyncer.swift:42 — `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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) Sources/Containerization/ContainerStatistics.swift:96 — Sources/Containerization/ContainerStatistics.swift:96-110 | vminitd/Sources/Cgroup/Cgroup2Manager.swift:686-700 — 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/Containerization/ContainerStatistics.swift:96` 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 (15 lines × 2) Sources/Containerization/LinuxContainer.swift:1163 — Sources/Containerization/LinuxContainer.swift:1163-1177 | Sources/Containerization/LinuxContainer.swift:1201-1215 — 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/Containerization/LinuxContainer.swift:1163` 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 (15 lines × 2) Sources/ContainerizationEXT4/EXT4Reader+Export.swift:94 — Sources/ContainerizationEXT4/EXT4Reader+Export.swift:94-108 | Sources/ContainerizationEXT4/EXT4Reader+Export.swift:111-125 — 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/ContainerizationEXT4/EXT4Reader+Export.swift:94` 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 (15 lines × 2) Sources/ContainerizationNetlink/NetlinkSession.swift:455 — Sources/ContainerizationNetlink/NetlinkSession.swift:455-469 | Sources/ContainerizationNetlink/NetlinkSession.swift:502-516 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/ContainerizationNetlink/NetlinkSession.swift:455` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×4
  • Duplicated block (13 lines × 2) Sources/ContainerizationNetlink/NetlinkSession.swift:104 — Sources/ContainerizationNetlink/NetlinkSession.swift:104-116 | Sources/ContainerizationNetlink/NetlinkSession.swift:206-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/ContainerizationNetlink/NetlinkSession.swift:104` 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/ContainerizationNetlink/NetlinkSession.swift:428 — Sources/ContainerizationNetlink/NetlinkSession.swift:428-440 | Sources/ContainerizationNetlink/NetlinkSession.swift:481-493 — 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/ContainerizationNetlink/NetlinkSession.swift:428` 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 (13 lines × 2) vminitd/Sources/Cgroup/Cgroup2Manager.swift:270 — vminitd/Sources/Cgroup/Cgroup2Manager.swift:270-282 | vminitd/Sources/Cgroup/Cgroup2Manager.swift:285-297 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) Sources/Containerization/LinuxContainer.swift:247 — Sources/Containerization/LinuxContainer.swift:247-259 | Sources/Containerization/LinuxPod.swift:243-255 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×4
  • Duplicated block (10 lines × 2) Sources/Containerization/LinuxContainer.swift:839 — Sources/Containerization/LinuxContainer.swift:839-848 | Sources/Containerization/LinuxPod.swift:610-619 — 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/Containerization/LinuxContainer.swift:839` 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 × 2) Sources/Containerization/LinuxContainer.swift:1419 — Sources/Containerization/LinuxContainer.swift:1419-1428 | Sources/Containerization/LinuxContainer.swift:1578-1587 — 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/Containerization/LinuxContainer.swift:1419` 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 (10 lines × 2) Sources/Containerization/LinuxContainer.swift:1430 — Sources/Containerization/LinuxContainer.swift:1430-1439 | Sources/Containerization/LinuxContainer.swift:1589-1598 — 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/Containerization/LinuxContainer.swift:1430` 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 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 (10 lines × 2) Sources/Integration/Suite.swift:412 — Sources/Integration/Suite.swift:412-421 | Sources/cctl/cctl+Utils.swift:24-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×4
  • Duplicated block (6 lines × 2) Sources/ContainerizationOS/Linux/ProcNetSnmp.swift:134 — Sources/ContainerizationOS/Linux/ProcNetSnmp.swift:134-139 | Sources/ContainerizationOS/Linux/ProcNetSnmp.swift:142-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/ContainerizationOS/Linux/ProcNetSnmp.swift:131` calls `sum`, `subtractingClamped` and `Sources/ContainerizationOS/Linux/ProcNetSnmp.swift:140` 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 (6 lines × 2) Sources/ContainerizationOS/User.swift:70 — Sources/ContainerizationOS/User.swift:70-75 | Sources/ContainerizationOS/User.swift:96-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.
  • Duplicated block (6 lines × 2) vminitd/Sources/VminitdCore/ManagedProcess.swift:238 — vminitd/Sources/VminitdCore/ManagedProcess.swift:238-244 | vminitd/Sources/VminitdCore/ManagedProcess.swift:258-263 — 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 `vminitd/Sources/VminitdCore/ManagedProcess.swift:238` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) Sources/Containerization/AttachedFilesystem.swift:47 — Sources/Containerization/AttachedFilesystem.swift:47-52 | Sources/ContainerizationOS/Mount/Mount.swift:48-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×4
  • Duplicated block (5 lines × 2) Sources/ContainerizationNetlink/Types.swift:168 — Sources/ContainerizationNetlink/Types.swift:168-172 | Sources/ContainerizationNetlink/Types.swift:233-237 — 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/ContainerizationNetlink/Types.swift:168` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/ContainerizationNetlink/Types.swift:173` calls `copyIn`, `sendMarshalFailure` and `Sources/ContainerizationNetlink/Types.swift:239` 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 (5 lines × 2) Sources/ContainerizationNetlink/Types.swift:310 — Sources/ContainerizationNetlink/Types.swift:310-314 | Sources/ContainerizationNetlink/Types.swift:485-489 — 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/ContainerizationNetlink/Types.swift:310` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/ContainerizationNetlink/Types.swift:315` calls `copyIn`, `sendMarshalFailure` and `Sources/ContainerizationNetlink/Types.swift:491` 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 (5 lines × 2) Sources/ContainerizationNetlink/Types.swift:385 — Sources/ContainerizationNetlink/Types.swift:385-389 | Sources/ContainerizationNetlink/Types.swift:479-483 — 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/ContainerizationNetlink/Types.swift:385` 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 (5 lines × 2) Sources/ContainerizationEXT4/EXT4Reader+Export.swift:73 — Sources/ContainerizationEXT4/EXT4Reader+Export.swift:73-77 | Sources/ContainerizationEXT4/EXT4Reader+Export.swift:156-160 — 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.
D5 · Coupling · Off the main sequence · ×4
  • Off the main sequence: CloudHypervisor — CloudHypervisor: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ContainerizationError — ContainerizationError: 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: ContainerizationOS — ContainerizationOS: abstractness 0.02, instability 0.18, distance 0.80 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
  • Off the main sequence: ContainerizationExtras — ContainerizationExtras: abstractness 0.10, instability 0.17, distance 0.74 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×4
  • Low cohesion: VZVirtualMachineInstance (LCOM4 7) Sources/Containerization/VZVirtualMachineInstance.swift:28 — VZVirtualMachineInstance's methods fall into 7 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 7 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: UInt8 (LCOM4 6) Sources/ContainerizationEXT4/Integer+Extensions.swift:124 — UInt8'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: LocalOCILayoutClient (LCOM4 5) Sources/ContainerizationOCI/Client/LocalOCILayoutClient.swift:24 — LocalOCILayoutClient's methods fall into 5 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 5 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: ArchiveWriter (LCOM4 4) Sources/ContainerizationArchive/ArchiveWriter.swift:22 — ArchiveWriter'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.
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: Initd vminitd/Sources/VminitdCore/Server.swift:28 — TooManyMethods — 45 methods, declared across 2 files: VminitdCore/Server+GRPC.swift (43), VminitdCore/Server.swift (2). The bar is 30 methods; this is 15 over it, 1.50× 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: Vminitd Sources/Containerization/Vminitd.swift:28 — TooManyMethods — 36 methods, declared across 3 files: Containerization/Vminitd.swift (33), Containerization/Vminitd+SocketRelay.swift (2), Containerization/Vminitd+Rosetta.swift (1). The bar is 30 methods; this is 6 over it, 1.20× 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: LinuxContainer Sources/Containerization/LinuxContainer.swift:31 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× 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.
D31 · IaC & Container Security · Medium IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: ExecCommand.swift ↔ RunCommand.swift vminitd/Sources/vmexec/ExecCommand.swift:1 — `vminitd/Sources/vmexec/ExecCommand.swift` and `vminitd/Sources/vmexec/RunCommand.swift` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a35b1688` LinuxContainer/LinuxPod: Add support for NoNewPrivileges (#581); `fc5399e7` vmexec: Remove the logger setup (#469); `7962dae6` Add capabilities support (#444) — run `git show` on any of them.
  • Change coupling: Suite.swift ↔ RunCommand.swift Sources/Integration/Suite.swift:1 — `Sources/Integration/Suite.swift` and `Sources/cctl/RunCommand.swift` change together 59% of the time (13 of the 22 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 13 shared commits counted here, the most recent 3 are `c35c140d` Size the sandbox independently of the container (#922); `d7fc7c15` Update cctl to respect entrypoint and cmd (#906); `a9b9f2cb` Add logic to cctl to enable NBD mounts (#903) — run `git show` on any of them.
  • Change coupling: Package.swift ↔ Package.swift Package.swift:1 — `Package.swift` and `vminitd/Package.swift` change together 57% of the time (8 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 8 shared commits counted here, the most recent 3 are `9205a766` Keep `CVersion` in the `vminitd` package (#747); `9d870451` Upgrade vminitd API to use grpc-swift-2. (#578) (#669); `84b71f10` Revert "Upgrade vminitd API to use grpc-swift-2. (#578)" (#588) — run `git show` on any of them.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×3
  • Sync-over-async blocking Sources/Containerization/CHProcess.swift:68 — `start` is async and calls .wait() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking Sources/Containerization/VirtiofsdProcess.swift:79 — `start` is async and calls .wait() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking vminitd/Sources/VminitdCore/Runc/Runc.swift:334 — `execute` is async and calls .wait() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
D3 · God Classes · ClassTooLong · ×2
  • ClassTooLong: NetlinkSession Sources/ContainerizationNetlink/NetlinkSession.swift:23 — ClassTooLong — 668 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 268 over it, 1.67× 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.
  • ClassTooLong: IntegrationSuite Sources/Integration/Suite.swift:169 — ClassTooLong — 432 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 32 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) Sources/ContainerizationNetlink/NetlinkSession.swift:412 — Sources/ContainerizationNetlink/NetlinkSession.swift:412-469 | Sources/ContainerizationNetlink/NetlinkSession.swift:475-516 | Sources/ContainerizationNetlink/NetlinkSession.swift:523-602 | Sources/ContainerizationNetlink/NetlinkSession.swift:608-678 | Sources/ContainerizationNetlink/NetlinkSession.swift:689-767 | Sources/ContainerizationNetlink/NetlinkSession.swift:773-832 — These 6 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 6 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 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) Sources/ContainerizationOCI/Client/RegistryClient+Catalog.swift:38 — Sources/ContainerizationOCI/Client/RegistryClient+Catalog.swift:38-84 | Sources/ContainerizationOCI/Client/RegistryClient+Fetch.swift:31-96 | Sources/ContainerizationOCI/Client/RegistryClient+Fetch.swift:181-219 | Sources/ContainerizationOCI/Client/RegistryClient+Referrers.swift:35-61 | Sources/ContainerizationOCI/Client/RegistryClient.swift:305-318 | Sources/ContainerizationOCI/Client/RegistryClient.swift:330-341 — These 6 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 6 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 6 times.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×2
  • Duplicated block (24 lines × 2) Sources/Containerization/ContainerManager.swift:114 — Sources/Containerization/ContainerManager.swift:114-137 | Sources/Containerization/ContainerManager.swift:161-184 — 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/Containerization/ContainerManager.swift:114` 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 (24 lines × 2) vminitd/Sources/VminitdCore/RuncExecProcess.swift:101 — vminitd/Sources/VminitdCore/RuncExecProcess.swift:101-124 | vminitd/Sources/VminitdCore/RuncProcess.swift:93-116 — before extracting anything, compare `vminitd/Sources/VminitdCore/RuncExecProcess.swift` and `vminitd/Sources/VminitdCore/RuncProcess.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `vminitd/Sources/VminitdCore/RuncExecProcess.swift:101` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×2
  • Duplicated block (21–22 lines × 2) vminitd/Sources/VminitdCore/Runc/RuncIO.swift:204 — vminitd/Sources/VminitdCore/Runc/RuncIO.swift:204-224 | vminitd/Sources/VminitdCore/StandardIO.swift:57-78 — before extracting anything, compare `vminitd/Sources/VminitdCore/Runc/RuncIO.swift` and `vminitd/Sources/VminitdCore/StandardIO.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `vminitd/Sources/VminitdCore/Runc/RuncIO.swift:204` 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 (21–22 lines × 2) vminitd/Sources/VminitdCore/Runc/RuncIO.swift:225 — vminitd/Sources/VminitdCore/Runc/RuncIO.swift:225-245 | vminitd/Sources/VminitdCore/StandardIO.swift:80-101 — before extracting anything, compare `vminitd/Sources/VminitdCore/Runc/RuncIO.swift` and `vminitd/Sources/VminitdCore/StandardIO.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `vminitd/Sources/VminitdCore/Runc/RuncIO.swift:225` 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) Sources/Containerization/LinuxPod.swift:1324 — Sources/Containerization/LinuxPod.swift:1324-1339 | Sources/Containerization/LinuxPod.swift:1427-1442 — 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/Containerization/LinuxPod.swift:1324` 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 × 2) Sources/ContainerizationExtras/AsyncLock.swift:39 — Sources/ContainerizationExtras/AsyncLock.swift:39-54 | Sources/ContainerizationExtras/AsyncMutex.swift:40-55 — 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. 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×2
  • Duplicated block (14 lines × 2) Sources/Containerization/LinuxContainer.swift:938 — Sources/Containerization/LinuxContainer.swift:938-951 | Sources/Containerization/LinuxPod.swift:1023-1036 — 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/Containerization/LinuxContainer.swift:938` 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/Containerization/LinuxContainer.swift:1322 — Sources/Containerization/LinuxContainer.swift:1322-1335 | Sources/Containerization/LinuxPod.swift:1507-1520 — 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/Containerization/LinuxContainer.swift:1322` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×2
  • Duplicated block (12 lines × 5) Sources/Containerization/ContainerStatistics.swift:99 — Sources/Containerization/ContainerStatistics.swift:99-110 | Sources/Containerization/LinuxContainer.swift:152-163 | Sources/ContainerizationOS/Stat.swift:73-84 | vminitd/Sources/Cgroup/Cgroup2Manager.swift:689-700 | vminitd/Sources/VminitdCore/Runc/Runc.swift:99-110 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Containerization/ContainerStatistics.swift:99` 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 × 5) Sources/Containerization/ContainerStatistics.swift:105 — Sources/Containerization/ContainerStatistics.swift:105-116 | Sources/Containerization/LinuxContainer.swift:159-170 | Sources/ContainerizationOS/Stat.swift:76-87 | vminitd/Sources/Cgroup/Cgroup2Manager.swift:705-716 | vminitd/Sources/VminitdCore/Runc/Runc.swift:101-112 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Containerization/ContainerStatistics.swift:105` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×2
  • Duplicated block (12 lines × 4) Sources/Containerization/ContainerStatistics.swift:94 — Sources/Containerization/ContainerStatistics.swift:94-105 | vminitd/Sources/Cgroup/Cgroup2Manager.swift:684-695 | vminitd/Sources/Cgroup/Cgroup2Manager.swift:729-740 | vminitd/Sources/Cgroup/Cgroup2Manager.swift:766-777 — 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/Containerization/ContainerStatistics.swift:94` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 4) Sources/ContainerizationNetlink/NetlinkSession.swift:543 — Sources/ContainerizationNetlink/NetlinkSession.swift:543-554 | Sources/ContainerizationNetlink/NetlinkSession.swift:626-637 | Sources/ContainerizationNetlink/NetlinkSession.swift:708-719 | Sources/ContainerizationNetlink/NetlinkSession.swift:784-795 — 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/ContainerizationNetlink/NetlinkSession.swift:543` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) vminitd/Sources/VminitdCore/Server+GRPC.swift:1474 — vminitd/Sources/VminitdCore/Server+GRPC.swift:1474-1484 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1566-1576 — 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 `vminitd/Sources/VminitdCore/Server+GRPC.swift:1474` 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 (11 lines × 2) vminitd/Sources/VminitdCore/RuncExecProcess.swift:359 — vminitd/Sources/VminitdCore/RuncExecProcess.swift:359-369 | vminitd/Sources/VminitdCore/RuncProcess.swift:245-255 — before extracting anything, compare `vminitd/Sources/VminitdCore/RuncExecProcess.swift` and `vminitd/Sources/VminitdCore/RuncProcess.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D1 · Cyclomatic Complexity · NBDConnectionHandler.processBuffer (cyclomatic 46) · ×1
  • NBDConnectionHandler.processBuffer (cyclomatic 46) Sources/Integration/NBDServer.swift:174 — NBDConnectionHandler.processBuffer has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LinuxPod.create (cyclomatic 34) · ×1
  • LinuxPod.create (cyclomatic 34) Sources/Containerization/LinuxPod.swift:697 — LinuxPod.create has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RegistryClient.request (cyclomatic 33) · ×1
  • RegistryClient.request (cyclomatic 33) Sources/ContainerizationOCI/Client/RegistryClient.swift:181 — RegistryClient.request has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VsockProxy.handleConn (cyclomatic 31) · ×1
  • VsockProxy.handleConn (cyclomatic 31) vminitd/Sources/VminitdCore/VsockProxy.swift:191 — VsockProxy.handleConn has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · EXT4Reader.export (cyclomatic 29) · ×1
  • EXT4Reader.export (cyclomatic 29) Sources/ContainerizationEXT4/EXT4Reader+Export.swift:22 — EXT4Reader.export has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IPv4Address.parse (cyclomatic 27) · ×1
  • IPv4Address.parse (cyclomatic 27) Sources/ContainerizationExtras/IPv4Address.swift:114 — IPv4Address.parse 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.
D1 · Cyclomatic Complexity · MACAddress.parse (cyclomatic 26) · ×1
  • MACAddress.parse (cyclomatic 26) Sources/ContainerizationExtras/MACAddress.swift:123 — MACAddress.parse has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Initd.containerStatistics (cyclomatic 25) · ×1
  • Initd.containerStatistics (cyclomatic 25) vminitd/Sources/VminitdCore/Server+GRPC.swift:1651 — Initd.containerStatistics has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LinkStatistics64.appendBuffer (cyclomatic 24) · ×1
  • LinkStatistics64.appendBuffer (cyclomatic 24) Sources/ContainerizationNetlink/Types.swift:681 — LinkStatistics64.appendBuffer has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (LinkStatistics64.bindBuffer) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · LinkStatistics64.bindBuffer (cyclomatic 24) · ×1
  • LinkStatistics64.bindBuffer (cyclomatic 24) Sources/ContainerizationNetlink/Types.swift:755 — LinkStatistics64.bindBuffer has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (LinkStatistics64.appendBuffer) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · EXT4Reader.performRead (cyclomatic 23) · ×1
  • EXT4Reader.performRead (cyclomatic 23) Sources/ContainerizationEXT4/EXT4Reader+IO.swift:158 — EXT4Reader.performRead has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runc.execute (cyclomatic 23) · ×1
  • Runc.execute (cyclomatic 23) vminitd/Sources/VminitdCore/Runc/Runc.swift:334 — Runc.execute has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Platform.init (cyclomatic 22) · ×1
  • Platform.init (cyclomatic 22) Sources/ContainerizationOCI/Platform.swift:116 — Platform.init has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · LinuxPod.addContainer (cyclomatic 21) · ×1
  • LinuxPod.addContainer (cyclomatic 21) Sources/Containerization/LinuxPod.swift:490 — LinuxPod.addContainer has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Formatter.unpackEntries (cyclomatic 21) · ×1
  • Formatter.unpackEntries (cyclomatic 21) Sources/ContainerizationEXT4/Formatter+Unpack.swift:85 — Formatter.unpackEntries has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · User.getExecUser (cyclomatic 21) · ×1
  • User.getExecUser (cyclomatic 21) Sources/ContainerizationOS/User.swift:179 — User.getExecUser has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Configuration.toVZ (cyclomatic 20) · ×1
  • Configuration.toVZ (cyclomatic 20) Sources/Containerization/VZVirtualMachineInstance.swift:413 — Configuration.toVZ has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EXT4Reader.readFileBytesFromExtents (cyclomatic 19) · ×1
  • EXT4Reader.readFileBytesFromExtents (cyclomatic 19) Sources/ContainerizationEXT4/EXT4Reader+IO.swift:402 — EXT4Reader.readFileBytesFromExtents has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IO.drain (cyclomatic 19) · ×1
  • IO.drain (cyclomatic 19) vminitd/Sources/VminitdCore/IOPair.swift:42 — IO.drain has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CHVirtualMachineInstance.buildVmConfig (cyclomatic 18) · ×1
  • CHVirtualMachineInstance.buildVmConfig (cyclomatic 18) Sources/Containerization/CHVirtualMachineInstance.swift:507 — CHVirtualMachineInstance.buildVmConfig has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VirtualMachineAgent.setupInterface (cyclomatic 18) · ×1
  • VirtualMachineAgent.setupInterface (cyclomatic 18) Sources/Containerization/VirtualMachineAgent+Interface.swift:23 — VirtualMachineAgent.setupInterface has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CHStdioPortSlot.acceptLoop (cyclomatic 17) · ×1
  • CHStdioPortSlot.acceptLoop (cyclomatic 17) Sources/Containerization/CHStdioPortSlot.swift:148 — CHStdioPortSlot.acceptLoop has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Mount.parseBlockArgument (cyclomatic 17) · ×1
  • Mount.parseBlockArgument (cyclomatic 17) Sources/cctl/cctl+Utils.swift:113 — Mount.parseBlockArgument has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Mount.createMountTarget (cyclomatic 17) · ×1
  • Mount.createMountTarget (cyclomatic 17) Sources/ContainerizationOS/Mount/Mount.swift:184 — Mount.createMountTarget has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Cgroup2Manager.readIOStats (cyclomatic 17) · ×1
  • Cgroup2Manager.readIOStats (cyclomatic 17) vminitd/Sources/Cgroup/Cgroup2Manager.swift:517 — Cgroup2Manager.readIOStats has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RunCommand.childSetup (cyclomatic 17) · ×1
  • RunCommand.childSetup (cyclomatic 17) vminitd/Sources/vmexec/RunCommand.swift:159 — RunCommand.childSetup has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LinuxContainer.stop (cyclomatic 16) · ×1
  • LinuxContainer.stop (cyclomatic 16) Sources/Containerization/LinuxContainer.swift:1012 — LinuxContainer.stop has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RegistryClient.push (cyclomatic 16) · ×1
  • RegistryClient.push (cyclomatic 16) Sources/ContainerizationOCI/Client/RegistryClient+Push.swift:42 — RegistryClient.push has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: Sources/ContainerizationEXT4/EXT4+Formatter.swift Sources/ContainerizationEXT4/EXT4+Formatter.swift:1490 — Sources/ContainerizationEXT4/EXT4+Formatter.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is Date.fs at line 1490), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix/journal physical size (#924)”; “Fix/support for last partial group (#925)”; “fix: efsck searching for external journal (#856)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:08:15 -07:00' --until='2026-10-23 17:08:15 -07:00' --full-history --no-merges -- Sources/ContainerizationEXT4/EXT4+Formatter.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.
D2 · Cognitive Complexity · NBDConnectionHandler.processBuffer (cognitive 124) · ×1
  • NBDConnectionHandler.processBuffer (cognitive 124) Sources/Integration/NBDServer.swift:174 — NBDConnectionHandler.processBuffer has cognitive complexity 124 (threshold 15). Drivers by points: if/else 25 (93 pts), boolean chains 8, match/switch 3 (8 pts), ternaries 2 (8 pts), loops 2 (7 pts) (nesting depth added 84). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · EXT4Reader.export (cognitive 89) · ×1
  • EXT4Reader.export (cognitive 89) Sources/ContainerizationEXT4/EXT4Reader+Export.swift:22 — EXT4Reader.export has cognitive complexity 89 (threshold 15). Drivers by points: if/else 25 (69 pts), loops 7 (20 pts) (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RegistryClient.request (cognitive 87) · ×1
  • RegistryClient.request (cognitive 87) Sources/ContainerizationOCI/Client/RegistryClient.swift:181 — RegistryClient.request has cognitive complexity 87 (threshold 15). Drivers by points: if/else 18 (61 pts), error handling 5 (16 pts), boolean chains 9, loops 1 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinuxPod.create (cognitive 78) · ×1
  • LinuxPod.create (cognitive 78) Sources/Containerization/LinuxPod.swift:697 — LinuxPod.create has cognitive complexity 78 (threshold 15). Drivers by points: if/else 16 (42 pts), loops 15 (33 pts), boolean chains 2, error handling 1 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Initd.containerStatistics (cognitive 56) · ×1
  • Initd.containerStatistics (cognitive 56) vminitd/Sources/VminitdCore/Server+GRPC.swift:1651 — Initd.containerStatistics has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (32 pts), boolean chains 8, loops 2 (6 pts), error handling 2 (5 pts), ternaries 2 (5 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinuxPod.addContainer (cognitive 53) · ×1
  • LinuxPod.addContainer (cognitive 53) Sources/Containerization/LinuxPod.swift:490 — LinuxPod.addContainer has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 2 (10 pts), error handling 2 (5 pts), boolean chains 1, match/switch 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EXT4Reader.performRead (cognitive 45) · ×1
  • EXT4Reader.performRead (cognitive 45) Sources/ContainerizationEXT4/EXT4Reader+IO.swift:158 — EXT4Reader.performRead has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (33 pts), error handling 2 (5 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Formatter.unpackEntries (cognitive 43) · ×1
  • Formatter.unpackEntries (cognitive 43) Sources/ContainerizationEXT4/Formatter+Unpack.swift:85 — Formatter.unpackEntries has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (34 pts), error handling 1 (4 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Platform.~= (cognitive 41) · ×1
  • Platform.~= (cognitive 41) Sources/ContainerizationOCI/Platform.swift:216 — Platform.~= has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 5 (22 pts), if/else 10 (18 pts), boolean chains 1 (nesting depth added 25). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · User.getExecUser (cognitive 39) · ×1
  • User.getExecUser (cognitive 39) Sources/ContainerizationOS/User.swift:179 — User.getExecUser has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 3, error handling 2 (3 pts), ternaries 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VsockProxy.handleConn (cognitive 39) · ×1
  • VsockProxy.handleConn (cognitive 39) vminitd/Sources/VminitdCore/VsockProxy.swift:191 — VsockProxy.handleConn has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 18, if/else 8 (16 pts), error handling 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · EXT4Reader.readFileBytesFromExtents (cognitive 38) · ×1
  • EXT4Reader.readFileBytesFromExtents (cognitive 38) Sources/ContainerizationEXT4/EXT4Reader+IO.swift:402 — EXT4Reader.readFileBytesFromExtents has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (27 pts), error handling 2 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MACAddress.parse (cognitive 38) · ×1
  • MACAddress.parse (cognitive 38) Sources/ContainerizationExtras/MACAddress.swift:123 — MACAddress.parse has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 11, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IPv4Address.parse (cognitive 36) · ×1
  • IPv4Address.parse (cognitive 36) Sources/ContainerizationExtras/IPv4Address.swift:114 — IPv4Address.parse has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 15, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EXT4Reader.resolvePath (cognitive 35) · ×1
  • EXT4Reader.resolvePath (cognitive 35) Sources/ContainerizationEXT4/EXT4Reader+IO.swift:278 — EXT4Reader.resolvePath has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IO.drain (cognitive 35) · ×1
  • IO.drain (cognitive 35) vminitd/Sources/VminitdCore/IOPair.swift:42 — IO.drain has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (6 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Platform.init (cognitive 34) · ×1
  • Platform.init (cognitive 34) Sources/ContainerizationOCI/Platform.swift:116 — Platform.init has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 8 (19 pts), if/else 14 (15 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Runc.execute (cognitive 34) · ×1
  • Runc.execute (cognitive 34) vminitd/Sources/VminitdCore/Runc/Runc.swift:334 — Runc.execute has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 4, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Configuration.toVZ (cognitive 31) · ×1
  • Configuration.toVZ (cognitive 31) Sources/Containerization/VZVirtualMachineInstance.swift:413 — Configuration.toVZ has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 5 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinuxContainer.copyIn (cognitive 31) · ×1
  • LinuxContainer.copyIn (cognitive 31) Sources/Containerization/LinuxContainer.swift:1345 — LinuxContainer.copyIn has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (7 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (LinuxContainer.copyOut) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LinuxContainer.copyOut (cognitive 31) · ×1
  • LinuxContainer.copyOut (cognitive 31) Sources/Containerization/LinuxContainer.swift:1512 — LinuxContainer.copyOut has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (7 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (LinuxContainer.copyIn) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · OSFile.splice (cognitive 30) · ×1
  • OSFile.splice (cognitive 30) vminitd/Sources/VminitdCore/OSFile+Splice.swift:57 — OSFile.splice has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BidirectionalRelay.copy (cognitive 29) · ×1
  • BidirectionalRelay.copy (cognitive 29) Sources/ContainerizationOS/Socket/BidirectionalRelay.swift:360 — BidirectionalRelay.copy has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CHStdioPortSlot.acceptLoop (cognitive 28) · ×1
  • CHStdioPortSlot.acceptLoop (cognitive 28) Sources/Containerization/CHStdioPortSlot.swift:148 — CHStdioPortSlot.acceptLoop has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 6, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CHVirtualMachineInstance.buildVmConfig (cognitive 28) · ×1
  • CHVirtualMachineInstance.buildVmConfig (cognitive 28) Sources/Containerization/CHVirtualMachineInstance.swift:507 — CHVirtualMachineInstance.buildVmConfig has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (5 pts), ternaries 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinuxContainer.stop (cognitive 28) · ×1
  • LinuxContainer.stop (cognitive 28) Sources/Containerization/LinuxContainer.swift:1012 — LinuxContainer.stop has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 5 (8 pts), loops 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Mount.mountToTarget (cognitive 28) · ×1
  • Mount.mountToTarget (cognitive 28) Sources/ContainerizationOS/Mount/Mount.swift:281 — Mount.mountToTarget has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IPv6Address.description (cognitive 28) · ×1
  • IPv6Address.description (cognitive 28) Sources/ContainerizationExtras/IPv6Address.swift:69 — IPv6Address.description has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Mount.createMountTarget (cognitive 27) · ×1
  • Mount.createMountTarget (cognitive 27) Sources/ContainerizationOS/Mount/Mount.swift:184 — Mount.createMountTarget has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 3, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Initd.createProcess (cognitive 27) · ×1
  • Initd.createProcess (cognitive 27) vminitd/Sources/VminitdCore/Server+GRPC.swift:1006 — Initd.createProcess has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 4 (9 pts), error handling 2, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinuxContainer.create (cognitive 26) · ×1
  • LinuxContainer.create (cognitive 26) Sources/Containerization/LinuxContainer.swift:766 — LinuxContainer.create has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (8 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RegistryClient.push (cognitive 26) · ×1
  • RegistryClient.push (cognitive 26) Sources/ContainerizationOCI/Client/RegistryClient+Push.swift:42 — RegistryClient.push has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (21 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Initd.handleCopyOut (cognitive 26) · ×1
  • Initd.handleCopyOut (cognitive 26) vminitd/Sources/VminitdCore/Server+GRPC.swift:583 — Initd.handleCopyOut has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Initd.handleCopyIn (cognitive 25) · ×1
  • Initd.handleCopyIn (cognitive 25) vminitd/Sources/VminitdCore/Server+GRPC.swift:498 — Initd.handleCopyIn has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (7 pts), ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Initd.mount (cognitive 25) · ×1
  • Initd.mount (cognitive 25) vminitd/Sources/VminitdCore/Server+GRPC.swift:685 — Initd.mount has cognitive complexity 25 (threshold 15). Drivers by points: error handling 4 (11 pts), if/else 4 (10 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunCommand.childSetup (cognitive 25) · ×1
  • RunCommand.childSetup (cognitive 25) vminitd/Sources/vmexec/RunCommand.swift:159 — RunCommand.childSetup has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinuxPod.stop (cognitive 23) · ×1
  • LinuxPod.stop (cognitive 23) Sources/Containerization/LinuxPod.swift:1214 — LinuxPod.stop has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VirtualMachineAgent.setupInterface (cognitive 23) · ×1
  • VirtualMachineAgent.setupInterface (cognitive 23) Sources/Containerization/VirtualMachineAgent+Interface.swift:23 — VirtualMachineAgent.setupInterface has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9, ternaries 4 (8 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LinkStatistics64.appendBuffer (cognitive 23) · ×1
  • LinkStatistics64.appendBuffer (cognitive 23) Sources/ContainerizationNetlink/Types.swift:681 — LinkStatistics64.appendBuffer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23. 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. This shape REPEATS in the file: one other method here (LinkStatistics64.bindBuffer) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LinkStatistics64.bindBuffer (cognitive 23) · ×1
  • LinkStatistics64.bindBuffer (cognitive 23) Sources/ContainerizationNetlink/Types.swift:755 — LinkStatistics64.bindBuffer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23. 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. This shape REPEATS in the file: one other method here (LinkStatistics64.appendBuffer) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LinuxProcess.setupIO (cognitive 22) · ×1
  • LinuxProcess.setupIO (cognitive 22) Sources/Containerization/LinuxProcess.swift:172 — LinuxProcess.setupIO has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 3 (6 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArchiveWriter.archive (cognitive 22) · ×1
  • ArchiveWriter.archive (cognitive 22) Sources/ContainerizationArchive/ArchiveWriter.swift:182 — ArchiveWriter.archive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinuxProcess.start (cognitive 21) · ×1
  • LinuxProcess.start (cognitive 21) Sources/Containerization/LinuxProcess.swift:306 — LinuxProcess.start has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExecCommand.execInNamespaces (cognitive 21) · ×1
  • ExecCommand.execInNamespaces (cognitive 21) vminitd/Sources/vmexec/ExecCommand.swift:64 — ExecCommand.execInNamespaces has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (21 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.
D2 · Cognitive Complexity · Cgroup2Manager.readIOStats (cognitive 20) · ×1
  • Cgroup2Manager.readIOStats (cognitive 20) vminitd/Sources/Cgroup/Cgroup2Manager.swift:517 — Cgroup2Manager.readIOStats has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManagedProcess.start (cognitive 20) · ×1
  • ManagedProcess.start (cognitive 20) vminitd/Sources/VminitdCore/ManagedProcess.swift:150 — ManagedProcess.start has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RootfsResolver.withDirectoryInRoot (cognitive 19) · ×1
  • RootfsResolver.withDirectoryInRoot (cognitive 19) Sources/ContainerizationOS/RootfsResolver.swift:83 — RootfsResolver.withDirectoryInRoot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CHHotplugProvider.releaseVirtioFS (cognitive 18) · ×1
  • CHHotplugProvider.releaseVirtioFS (cognitive 18) Sources/Containerization/CHHotplugProvider.swift:299 — CHHotplugProvider.releaseVirtioFS has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 1 (2 pts), loops 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LinuxPod.startContainer (cognitive 18) · ×1
  • LinuxPod.startContainer (cognitive 18) Sources/Containerization/LinuxPod.swift:989 — LinuxPod.startContainer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 1, error handling 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.
D2 · Cognitive Complexity · NetlinkSession.linkSetAttributes (cognitive 18) · ×1
  • NetlinkSession.linkSetAttributes (cognitive 18) Sources/ContainerizationNetlink/NetlinkSession.swift:133 — NetlinkSession.linkSetAttributes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 1 (2 pts), ternaries 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.
D2 · Cognitive Complexity · FileDescriptorOps.resolveBeneath (cognitive 18) · ×1
  • FileDescriptorOps.resolveBeneath (cognitive 18) Sources/ContainerizationOS/FileDescriptorOps+Composite.swift:176 — FileDescriptorOps.resolveBeneath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 7). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Mount.copyRange (cognitive 17) · ×1
  • Mount.copyRange (cognitive 17) Sources/Containerization/Mount.swift:246 — Mount.copyRange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 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.
D2 · Cognitive Complexity · Mount.parseBlockArgument (cognitive 16) · ×1
  • Mount.parseBlockArgument (cognitive 16) Sources/cctl/cctl+Utils.swift:113 — Mount.parseBlockArgument has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (4 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArchiveReader.extractEntry (cognitive 16) · ×1
  • ArchiveReader.extractEntry (cognitive 16) Sources/ContainerizationArchive/ArchiveReader.swift:348 — ArchiveReader.extractEntry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IPv6Address.parse (cognitive 16) · ×1
  • IPv6Address.parse (cognitive 16) Sources/ContainerizationExtras/IPv6Address+Parse.swift:38 — IPv6Address.parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NetlinkSession.parseResponse (cognitive 16) · ×1
  • NetlinkSession.parseResponse (cognitive 16) Sources/ContainerizationNetlink/NetlinkSession.swift:875 — NetlinkSession.parseResponse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RegistryClient.catalog (cognitive 16) · ×1
  • RegistryClient.catalog (cognitive 16) Sources/ContainerizationOCI/Client/RegistryClient+Catalog.swift:38 — RegistryClient.catalog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Cgroup2Manager.removeChildCgroups (cognitive 16) · ×1
  • Cgroup2Manager.removeChildCgroups (cognitive 16) vminitd/Sources/Cgroup/Cgroup2Manager.swift:361 — Cgroup2Manager.removeChildCgroups has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 1 (4 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · MemoryMonitor.run (cognitive 16) · ×1
  • MemoryMonitor.run (cognitive 16) vminitd/Sources/VminitdCore/MemoryMonitor.swift:71 — MemoryMonitor.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 2 (3 pts), boolean chains 1, 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.
D4 · Code Duplication · Near-duplicate member pair (57 shared lines) · ×1
  • Near-duplicate member pair (57 shared lines) vminitd/Sources/vmexec/ExecCommand.swift:64 — vminitd/Sources/vmexec/ExecCommand.swift:64-183 | vminitd/Sources/vmexec/RunCommand.swift:159-285 — These two members are variants of one another: 57 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (51 shared lines) · ×1
  • Near-duplicate member pair (51 shared lines) Sources/Containerization/LinuxContainer.swift:1345 — Sources/Containerization/LinuxContainer.swift:1345-1463 | Sources/Containerization/LinuxContainer.swift:1512-1622 — These two members are variants of one another: 51 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) vminitd/Sources/VminitdCore/Server+GRPC.swift:1006 — vminitd/Sources/VminitdCore/Server+GRPC.swift:1006-1108 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1110-1153 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1155-1207 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1209-1256 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1258-1307 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1309-1357 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1359-1405 — These 7 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 7 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 7 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) vminitd/Sources/VminitdCore/Runc/Runc.swift:581 — vminitd/Sources/VminitdCore/Runc/Runc.swift:581-625 | vminitd/Sources/VminitdCore/Runc/Runc.swift:634-678 | vminitd/Sources/VminitdCore/Runc/Runc.swift:723-760 | vminitd/Sources/VminitdCore/Runc/Runc.swift:791-839 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) vminitd/Sources/VminitdCore/Runc/Runc.swift:582 — vminitd/Sources/VminitdCore/Runc/Runc.swift:582-625 | vminitd/Sources/VminitdCore/Runc/Runc.swift:635-678 — 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 `vminitd/Sources/VminitdCore/Runc/Runc.swift:582` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) vminitd/Sources/VminitdCore/VsockProxy.swift:256 — vminitd/Sources/VminitdCore/VsockProxy.swift:256-287 | vminitd/Sources/VminitdCore/VsockProxy.swift:289-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.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) vminitd/Sources/vmexec/ExecCommand.swift:124 — vminitd/Sources/vmexec/ExecCommand.swift:124-149 | vminitd/Sources/vmexec/RunCommand.swift:195-220 — before extracting anything, compare `vminitd/Sources/vmexec/ExecCommand.swift` and `vminitd/Sources/vmexec/RunCommand.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `vminitd/Sources/vmexec/ExecCommand.swift:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) Sources/ContainerizationOCI/Client/RegistryClient+Fetch.swift:100 — Sources/ContainerizationOCI/Client/RegistryClient+Fetch.swift:100-124 | Sources/ContainerizationOCI/Client/RegistryClient+Fetch.swift:130-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) Sources/ContainerizationNetlink/NetlinkSession.swift:527 — Sources/ContainerizationNetlink/NetlinkSession.swift:527-549 | Sources/ContainerizationNetlink/NetlinkSession.swift:693-714 — 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/ContainerizationNetlink/NetlinkSession.swift:527` 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.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) Sources/Containerization/LinuxContainer.swift:1442 — Sources/Containerization/LinuxContainer.swift:1442-1463 | Sources/Containerization/LinuxContainer.swift:1601-1622 — 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/Containerization/LinuxContainer.swift:1442` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) vminitd/Sources/vmexec/ExecCommand.swift:157 — vminitd/Sources/vmexec/ExecCommand.swift:157-175 | vminitd/Sources/vmexec/RunCommand.swift:264-285 — before extracting anything, compare `vminitd/Sources/vmexec/ExecCommand.swift` and `vminitd/Sources/vmexec/RunCommand.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `vminitd/Sources/vmexec/RunCommand.swift:264` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (21 lines × 4) · ×1
  • Duplicated block (21 lines × 4) Sources/ContainerizationNetlink/NetlinkSession.swift:582 — Sources/ContainerizationNetlink/NetlinkSession.swift:582-602 | Sources/ContainerizationNetlink/NetlinkSession.swift:658-678 | Sources/ContainerizationNetlink/NetlinkSession.swift:747-767 | Sources/ContainerizationNetlink/NetlinkSession.swift:812-832 — 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/ContainerizationNetlink/NetlinkSession.swift:582` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) vminitd/Sources/VminitdCore/Runc/RuncIO.swift:60 — vminitd/Sources/VminitdCore/Runc/RuncIO.swift:60-80 | vminitd/Sources/VminitdCore/TerminalIO.swift:62-82 — before extracting anything, compare `vminitd/Sources/VminitdCore/Runc/RuncIO.swift` and `vminitd/Sources/VminitdCore/TerminalIO.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `vminitd/Sources/VminitdCore/Runc/RuncIO.swift:60` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) vminitd/Sources/VminitdCore/Runc/RuncIO.swift:246 — vminitd/Sources/VminitdCore/Runc/RuncIO.swift:246-265 | vminitd/Sources/VminitdCore/StandardIO.swift:103-123 — before extracting anything, compare `vminitd/Sources/VminitdCore/Runc/RuncIO.swift` and `vminitd/Sources/VminitdCore/StandardIO.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `vminitd/Sources/VminitdCore/Runc/RuncIO.swift:246` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) Sources/ContainerizationNetlink/NetlinkSession.swift:561 — Sources/ContainerizationNetlink/NetlinkSession.swift:561-580 | Sources/ContainerizationNetlink/NetlinkSession.swift:726-745 — 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/ContainerizationNetlink/NetlinkSession.swift:561` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) vminitd/Sources/VminitdCore/Server+GRPC.swift:527 — vminitd/Sources/VminitdCore/Server+GRPC.swift:527-546 | vminitd/Sources/VminitdCore/Server+GRPC.swift:643-659 — 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 `vminitd/Sources/VminitdCore/Server+GRPC.swift:527` 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. 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.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) vminitd/Sources/VminitdCore/Runc/Runc.swift:588 — vminitd/Sources/VminitdCore/Runc/Runc.swift:588-606 | vminitd/Sources/VminitdCore/Runc/Runc.swift:641-659 | vminitd/Sources/VminitdCore/Runc/Runc.swift:798-816 — 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.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) Sources/Containerization/LinuxProcess.swift:222 — Sources/Containerization/LinuxProcess.swift:222-239 | Sources/Containerization/LinuxProcess.swift:241-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) vminitd/Sources/VminitdCore/Runc/RuncIO.swift:299 — vminitd/Sources/VminitdCore/Runc/RuncIO.swift:299-316 | vminitd/Sources/VminitdCore/StandardIO.swift:129-146 — before extracting anything, compare `vminitd/Sources/VminitdCore/Runc/RuncIO.swift` and `vminitd/Sources/VminitdCore/StandardIO.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 7) · ×1
  • Duplicated block (17 lines × 7) vminitd/Sources/VminitdCore/Server+GRPC.swift:1086 — vminitd/Sources/VminitdCore/Server+GRPC.swift:1086-1102 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1134-1150 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1185-1201 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1233-1249 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1282-1298 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1334-1350 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1382-1398 — all 7 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 `vminitd/Sources/VminitdCore/Server+GRPC.swift:1086` 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.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×1
  • Duplicated block (16 lines × 5) vminitd/Sources/VminitdCore/Server+GRPC.swift:1158 — vminitd/Sources/VminitdCore/Server+GRPC.swift:1158-1173 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1212-1227 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1261-1276 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1312-1327 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1362-1377 — 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 `vminitd/Sources/VminitdCore/Server+GRPC.swift:1158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) vminitd/Sources/VminitdCore/Server+GRPC.swift:227 — vminitd/Sources/VminitdCore/Server+GRPC.swift:227-241 | vminitd/Sources/VminitdCore/Server+GRPC.swift:264-279 — 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 `vminitd/Sources/VminitdCore/Server+GRPC.swift:227` 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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) vminitd/Sources/VminitdCore/Runc/Runc.swift:585 — vminitd/Sources/VminitdCore/Runc/Runc.swift:585-598 | vminitd/Sources/VminitdCore/Runc/Runc.swift:638-651 | vminitd/Sources/VminitdCore/Runc/Runc.swift:726-739 | vminitd/Sources/VminitdCore/Runc/Runc.swift:795-808 — 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 `vminitd/Sources/VminitdCore/Runc/Runc.swift:585` 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.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) Sources/Containerization/ContainerManager.swift:115 — Sources/Containerization/ContainerManager.swift:115-128 | Sources/Containerization/ContainerManager.swift:162-175 | Sources/Integration/Suite.swift:261-274 — 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/Integration/Suite.swift:261` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) Sources/ContainerizationEXT4/EXT4Reader+IO.swift:194 — Sources/ContainerizationEXT4/EXT4Reader+IO.swift:194-207 | Sources/ContainerizationEXT4/EXT4Reader+IO.swift:422-432 — 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/ContainerizationEXT4/EXT4Reader+IO.swift:194` 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 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.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) vminitd/Sources/VminitdCore/Server+GRPC.swift:1605 — vminitd/Sources/VminitdCore/Server+GRPC.swift:1605-1617 | vminitd/Sources/VminitdCore/Server+GRPC.swift:1636-1649 — 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 `vminitd/Sources/VminitdCore/Server+GRPC.swift:1605` 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.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) vminitd/Sources/VminitdCore/Runc/RuncIO.swift:227 — vminitd/Sources/VminitdCore/Runc/RuncIO.swift:227-239 | vminitd/Sources/VminitdCore/Runc/RuncIO.swift:248-260 | vminitd/Sources/VminitdCore/StandardIO.swift:82-94 | vminitd/Sources/VminitdCore/StandardIO.swift:105-117 — before extracting anything, compare `vminitd/Sources/VminitdCore/Runc/RuncIO.swift` and `vminitd/Sources/VminitdCore/StandardIO.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) Sources/Containerization/ContainerStatistics.swift:95 — Sources/Containerization/ContainerStatistics.swift:95-107 | vminitd/Sources/Cgroup/Cgroup2Manager.swift:685-697 | vminitd/Sources/Cgroup/Cgroup2Manager.swift:767-779 — 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/Containerization/ContainerStatistics.swift:95` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10–13 lines × 2) · ×1
  • Duplicated block (10–13 lines × 2) Sources/Containerization/Image/InitImage.swift:70 — Sources/Containerization/Image/InitImage.swift:70-82 | Sources/Containerization/Image/KernelImage.swift:82-91 — 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/Containerization/Image/InitImage.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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) Sources/Containerization/LinuxContainer.swift:1163 — Sources/Containerization/LinuxContainer.swift:1163-1173 | Sources/Containerization/LinuxContainer.swift:1201-1211 | Sources/Containerization/LinuxPod.swift:1357-1367 — 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/Containerization/LinuxContainer.swift:1163` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) Sources/Containerization/NATNetworkInterface.swift:71 — Sources/Containerization/NATNetworkInterface.swift:71-81 | Sources/Containerization/VmnetNetwork.swift:147-156 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) Sources/ContainerizationNetlink/NetlinkSession.swift:110 — Sources/ContainerizationNetlink/NetlinkSession.swift:110-119 | Sources/ContainerizationNetlink/NetlinkSession.swift:212-221 | Sources/ContainerizationNetlink/NetlinkSession.swift:284-293 — 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/ContainerizationNetlink/NetlinkSession.swift:110` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) Sources/ContainerizationNetlink/NetlinkSession.swift:457 — Sources/ContainerizationNetlink/NetlinkSession.swift:457-464 | Sources/ContainerizationNetlink/NetlinkSession.swift:504-511 | Sources/ContainerizationNetlink/NetlinkSession.swift:588-597 | Sources/ContainerizationNetlink/NetlinkSession.swift:664-673 | Sources/ContainerizationNetlink/NetlinkSession.swift:753-762 | Sources/ContainerizationNetlink/NetlinkSession.swift:818-827 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/ContainerizationNetlink/NetlinkSession.swift:457` 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) Sources/Containerization/NATNetworkInterface.swift:70 — Sources/Containerization/NATNetworkInterface.swift:70-77 | Sources/Containerization/VZVirtualMachineInstance.swift:574-581 | Sources/Containerization/VmnetNetwork.swift:146-153 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Containerization/NATNetworkInterface.swift:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) vminitd/Sources/vmexec/ExecCommand.swift:108 — vminitd/Sources/vmexec/ExecCommand.swift:108-114 | vminitd/Sources/vmexec/ExecCommand.swift:135-141 | vminitd/Sources/vmexec/RunCommand.swift:173-179 | vminitd/Sources/vmexec/RunCommand.swift:206-212 — before extracting anything, compare `vminitd/Sources/vmexec/ExecCommand.swift` and `vminitd/Sources/vmexec/RunCommand.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) Sources/ContainerizationNetlink/Types.swift:324 — Sources/ContainerizationNetlink/Types.swift:324-330 | Sources/ContainerizationNetlink/Types.swift:399-405 | Sources/ContainerizationNetlink/Types.swift:496-502 — 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/ContainerizationNetlink/Types.swift:324` 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.
D4 · Code Duplication · Duplicated block (4–6 lines × 4) · ×1
  • Duplicated block (4–6 lines × 4) Sources/ContainerizationExtras/IPv4Address.swift:63 — Sources/ContainerizationExtras/IPv4Address.swift:63-68 | Sources/ContainerizationExtras/IPv6Address.swift:155-158 | Sources/ContainerizationExtras/IPv6Address.swift:168-173 | Sources/ContainerizationExtras/MACAddress.swift:71-76 — there are 4 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 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/ContainerizationExtras/IPv4Address.swift:63` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/ContainerizationExtras/MACAddress.swift:69` calls `UInt8` and `Sources/ContainerizationExtras/IPv4Address.swift:62` 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) vminitd/Sources/VminitdCore/VsockProxy.swift:235 — vminitd/Sources/VminitdCore/VsockProxy.swift:235-240 | vminitd/Sources/VminitdCore/VsockProxy.swift:341-346 | vminitd/Sources/VminitdCore/VsockProxy.swift:358-363 — 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 `vminitd/Sources/VminitdCore/VsockProxy.swift:235` 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.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×1
  • Duplicated block (5 lines × 5) Sources/ContainerizationOCI/Client/RegistryClient+Catalog.swift:59 — Sources/ContainerizationOCI/Client/RegistryClient+Catalog.swift:59-63 | Sources/ContainerizationOCI/Client/RegistryClient+Fetch.swift:51-55 | Sources/ContainerizationOCI/Client/RegistryClient+Fetch.swift:199-203 | Sources/ContainerizationOCI/Client/RegistryClient.swift:310-314 | Sources/ContainerizationOCI/Client/RegistryClient.swift:335-339 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/ContainerizationOCI/Client/RegistryClient.swift:316` calls `collect` and `Sources/ContainerizationOCI/Client/RegistryClient.swift:340` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) Sources/ContainerizationNetlink/Types.swift:224 — Sources/ContainerizationNetlink/Types.swift:224-228 | Sources/ContainerizationNetlink/Types.swift:304-308 | Sources/ContainerizationNetlink/Types.swift:559-563 — 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/ContainerizationNetlink/Types.swift:224` 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.
D4 · Code Duplication · Duplicated block (5 lines × 7) · ×1
  • Duplicated block (5 lines × 7) Sources/ContainerizationExtras/CIDR.swift:138 — Sources/ContainerizationExtras/CIDR.swift:138-142 | Sources/ContainerizationExtras/CIDRv4.swift:104-108 | Sources/ContainerizationExtras/CIDRv6.swift:105-109 | Sources/ContainerizationExtras/IPAddress.swift:138-142 | Sources/ContainerizationExtras/IPv4Address.swift:240-244 | Sources/ContainerizationExtras/IPv6Address.swift:260-264 | Sources/ContainerizationExtras/MACAddress.swift:265-269 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) vminitd/Sources/VminitdCore/Runc/RuncIO.swift:161 — vminitd/Sources/VminitdCore/Runc/RuncIO.swift:161-168 | vminitd/Sources/VminitdCore/Runc/RuncIO.swift:318-325 | vminitd/Sources/VminitdCore/StandardIO.swift:148-155 | vminitd/Sources/VminitdCore/TerminalIO.swift:154-161 — before extracting anything, compare `vminitd/Sources/VminitdCore/Runc/RuncIO.swift` and `vminitd/Sources/VminitdCore/StandardIO.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `vminitd/Sources/VminitdCore/TerminalIO.swift:152` calls `closeAfterExec` and `vminitd/Sources/VminitdCore/Runc/RuncIO.swift:316` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:373 — examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:373-391 | examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:524-542 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:373` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×1
  • Duplicated block (16–17 lines × 3) examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:395 — examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:395-410 | examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:434-450 | examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:482-498 — 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 `examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:395` 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.
D4 · Code Duplication · Duplicated block (13–15 lines × 3) · ×1
  • Duplicated block (13–15 lines × 3) examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:382 — examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:382-396 | examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:471-483 | examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:533-547 — 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 `examples/sandboxy/Sources/sandboxy/RunAgentCommand.swift:382` 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×1
  • Swallowed exception (empty catch) Sources/ContainerizationOS/Terminal.swift:71 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Minor — 21 finding(s)
D31 · IaC & Container Security · Low IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned file · ×3
  • Orphaned file Sources/Integration/NBDServer.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/Containerization/HostsConfiguration.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/Containerization/VirtualMachineAgent+Interface.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.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: Sources/ContainerizationOS/Linux/Capabilities.swift, Sources/Containerization/Signal.swift. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 6 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 (9 single-owned of 189 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; 189 of the 248 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)), anonymized user #6 (1 file(s)), anonymized user #7 (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/ContainerizationOCI/Client/RegistryClient+Referrers.swift, Sources/ContainerizationOCI/Client/RegistryClient+Catalog.swift, Sources/CloudHypervisor/Types/VmConfig.swift, Sources/ContainerizationOS/RootfsResolver.swift, Sources/ContainerizationArchive/ZstdArchiveSource.swift, Sources/Integration/IntegrationSuite+CctlCLI.swift, Sources/ContainerizationOCI/Spec+Redaction.swift.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (38193 LoC, 365 module-visible types across 23 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 — 3 of 189 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; 189 of the 248 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/Integration/NBDServer.swift, Sources/Containerization/HostsConfiguration.swift, Sources/Containerization/VirtualMachineAgent+Interface.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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — 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 15111 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P6 · Release Hygiene · No changelog · ×1
  • 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.)
X10 · Duplicated predicate · Duplicated predicate · ×1
  • Duplicated predicate Sources/ContainerizationExtras/IPv4Address.swift:124 — `byte == 32 || byte == 9 || byte == 10 || byte == 13` appears character-identically in 2 files — Sources/ContainerizationExtras/IPv4Address.swift, Sources/ContainerizationExtras/MACAddress.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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch vminitd/Sources/vminitd/Application.swift:93 — `procSelfArgv` 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.
Minor — 32 finding(s)
D12 · Dependency Hygiene · Outdated · ×17
  • Outdated: async-http-client — `async-http-client` is resolved at 1.35.0, but 1.36.2 is the newest release tagged on https://github.com/swift-server/async-http-client.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update async-http-client` reaches this one with no change to Package.swift.
  • Outdated: async-http-client — `async-http-client` is resolved at 1.32.0, but 1.36.2 is the newest release tagged on https://github.com/swift-server/async-http-client.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update async-http-client` reaches this one with no change to Package.swift.
  • Outdated: containerization — `containerization` is resolved at 0.30.0, but 0.53.0 is the newest release tagged on https://github.com/apple/containerization.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update containerization` reaches this one with no change to Package.swift.
  • Outdated: containerization — `containerization` is resolved at 0.33.4, but 0.53.0 is the newest release tagged on https://github.com/apple/containerization.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update containerization` reaches this one with no change to Package.swift.
  • Outdated: grpc-swift-2 — `grpc-swift-2` is resolved at 2.4.2, but 2.4.4 is the newest release tagged on https://github.com/grpc/grpc-swift-2.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update grpc-swift-2` reaches this one with no change to Package.swift.
  • Outdated: grpc-swift-nio-transport — `grpc-swift-nio-transport` is resolved at 2.9.0, but 2.11.0 is the newest release tagged on https://github.com/grpc/grpc-swift-nio-transport.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update grpc-swift-nio-transport` reaches this one with no change to Package.swift.
  • Outdated: grpc-swift-protobuf — `grpc-swift-protobuf` is resolved at 2.4.1, but 2.5.0 is the newest release tagged on https://github.com/grpc/grpc-swift-protobuf.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update grpc-swift-protobuf` reaches this one with no change to Package.swift.
  • Outdated: swift-argument-parser — `swift-argument-parser` is resolved at 1.7.0, but 1.8.2 is the newest release tagged on https://github.com/apple/swift-argument-parser.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-argument-parser` reaches this one with no change to Package.swift.
  • Outdated: swift-certificates — `swift-certificates` is resolved at 1.19.3, but 1.21.0 is the newest release tagged on https://github.com/apple/swift-certificates.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-certificates` reaches this one with no change to Package.swift.
  • Outdated: swift-collections — `swift-collections` is resolved at 1.5.1, but 1.7.4 is the newest release tagged on https://github.com/apple/swift-collections.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-collections` reaches this one with no change to Package.swift.
  • Outdated: swift-log — `swift-log` is resolved at 1.10.1, but 1.16.2 is the newest release tagged on https://github.com/apple/swift-log.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-log` reaches this one with no change to Package.swift.
  • Outdated: swift-log — `swift-log` is resolved at 1.14.0, but 1.16.2 is the newest release tagged on https://github.com/apple/swift-log.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-log` reaches this one with no change to Package.swift.
  • Outdated: swift-nio — `swift-nio` is resolved at 2.101.3, but 2.104.0 is the newest release tagged on https://github.com/apple/swift-nio.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-nio` reaches this one with no change to Package.swift.
  • Outdated: swift-nio — `swift-nio` is resolved at 2.95.0, but 2.104.0 is the newest release tagged on https://github.com/apple/swift-nio.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-nio` reaches this one with no change to Package.swift.
  • Outdated: swift-nio-ssl — `swift-nio-ssl` is resolved at 2.37.2, but 2.37.5 is the newest release tagged on https://github.com/apple/swift-nio-ssl.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-nio-ssl` reaches this one with no change to Package.swift.
  • Outdated: swift-protobuf — `swift-protobuf` is resolved at 1.38.1, but 1.39.0 is the newest release tagged on https://github.com/apple/swift-protobuf.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-protobuf` reaches this one with no change to Package.swift.
  • Outdated: swift-system — `swift-system` is resolved at 1.7.5, but 1.8.1 is the newest release tagged on https://github.com/apple/swift-system.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-system` reaches this one with no change to Package.swift.
D10 · Test Quality · Skipped (documented) · ×15
  • Skipped (documented): loginSucceedsAgainstArtifactRegistry Tests/ContainerizationOCITests/ArtifactRegistryLoginTests.swift:61 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): maliciousRealmIsNeitherFollowedNorCredentialed Tests/ContainerizationOCITests/RealmRequestTests.swift:192 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): basicChallengeIsAnsweredOnceOverTLS Tests/ContainerizationOCITests/RealmRequestTests.swift:275 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): rejectedBasicCredentialsDoNotRetryForever Tests/ContainerizationOCITests/RealmRequestTests.swift:294 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): basicChallengeWithoutCredentialsFails Tests/ContainerizationOCITests/RealmRequestTests.swift:311 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): fetchToken Tests/ContainerizationOCITests/RegistryClientTests.swift:67 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): pingWithCredentials Tests/ContainerizationOCITests/RegistryClientTests.swift:98 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): pushIndex Tests/ContainerizationOCITests/RegistryClientTests.swift:170 — Skipped with a documented reason — a deferral, not lazy debt: External users cannot push images, disable while we find a better solution
  • Skipped (documented): testResolveBeneathValueIsHonoredByTheKernel Tests/ContainerizationOSTests/FileDescriptorOpsTests.swift:1080 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): testMkdirDoesNotRemoveUnopenableDirectory Tests/ContainerizationOSTests/FileDescriptorOpsTests.swift:1197 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): keychainQuery Tests/ContainerizationOSTests/KeychainQueryTests.swift:31 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): list Tests/ContainerizationOSTests/KeychainQueryTests.swift:48 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): measureAlpineAndUbuntu Tests/ContainerizationTests/ImageTests/HeaderScanTimingTests.swift:50 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): testImageStorePush Tests/ContainerizationTests/ImageTests/ImageStoreTests.swift:78 — Skipped with a documented reason — a deferral, not lazy debt: External users cannot push images, disable while we find a better solution
  • Skipped (documented): testImageStorePushMultipleReferences Tests/ContainerizationTests/ImageTests/ImageStoreTests.swift:93 — Skipped with a documented reason — a deferral, not lazy debt: External users cannot push images, disable while we find a better solution

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-fd3d6dc0fc7e4dcab0207b56137a58bc/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-fd3d6dc0fc7e4dcab0207b56137a58bc/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .9artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .12artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 34 file(s) — `Sources/Containerization/CHHotplugProvider.swift`, `Sources/Containerization/CHVirtualMachineInstance.swift`, `Sources/Containerization/Image/ImageStore/ImageStore+Import.swift`, `Sources/Containerization/Image/ImageStore/ImageStore+Platforms.swift`, `Sources/Containerization/LinuxContainer.swift`, … (+29 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1776f-9e4c-70bc-a7cb-f3cec19fff8b · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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