Public report — mac-monitor, published 1 Oct 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this surveyFiledcd_b48d1590c8c44922802a45adf1a58c26
Filed 1 October 2026, 11:54 UTC
Public
Medium · 25,057 LoC · 3 projects · rebuild ~0.1 person-years · weakest lens: Readiness (10%)
Findings by grade
5 critical164 serious12 minor47 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
1 October 2026, 11:50 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
168findings with an exact file:lineof 181 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
33/125dimensions across the health lenses25057 LoC · 3 projects — wide & deep
This system presents a fragile operational standing with an overall health score of 43%. While the underlying code is clean and well-structured, the asset is critically underprepared for safe, reliable delivery. The business faces significant risk because the system lacks the operational safeguards necessary to support continuous change, despite having a low cost to rebuild if necessary.
The value at stake is moderate, comprising a medium-sized codebase with minimal boilerplate. Rebuilding this system would require approximately 0.1 person-years, costing around €22,000. This low rebuild cost indicates that the logic is straightforward, but it also means there is little financial penalty for technical debt accumulation. However, the absence of automated tests and operational tooling means every change carries a high probability of regression, slowing down delivery and increasing the cost of maintenance over time.
The primary risk is operational fragility. With a readiness score of just 10%, the system is not observable, tested, or secure enough for production use. This lack of safety nets means that defects are likely to reach users, causing outages and eroding trust. The cost of these incidents in terms of customer churn and emergency engineering hours will far exceed the initial investment in proper testing and monitoring infrastructure.
A secondary concern is security exposure. Two leaked secrets were identified, which poses an immediate threat to data integrity and compliance. While the code architecture is sound, these credential leaks represent a critical vulnerability that could be exploited by malicious actors. Addressing this is not optional; it is a prerequisite for any further development.
On the positive side, the code health and architecture are strong. The logic is clean, and the domain modeling is mature, making it easy for new engineers to understand the business rules. This foundation is a valuable asset that should be preserved.
Focus first on resolving the leaked secrets and establishing a basic CI pipeline. This provides the highest leverage by securing the asset and enabling automated testing. Without these steps, any further investment in features is wasted effort.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
105 finding(s) are new versus the previous scan (2026-09-15) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
0.7× (at 43% quality) — the last 20% of quality is most of the work
Size & shape
Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~0.1 person-years of build effort (about ~€22,000 to rebuild). Its weakest lens is Readiness at 10% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.
Value concentrated against a weak lens · High · Value at risk
This is a Medium asset (~0.1 person-years to rebuild), and its weakest lens is Readiness at 10%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A02:2021 — Cryptographic Failures
2
High / Critical
A03:2021 — Injection
1
High / Critical
Roadmap
Immediately resolve the two leaked secrets in the specified Swift files to eliminate critical security exposure. Establish a CI pipeline that builds and tests on every push, integrating automated security scanning to prevent regressions. Finally, address the lack of automated tests and coverage gaps to ensure code reliability and maintainability.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.
Run what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 5
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 164
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 — 12
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 47
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. 30 of 33 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 33 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 168 of 181 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. No dependency manifest this pass reads for hygiene (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)) was found in this repository, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D30 wherever the manifest is OSV-readable.
D14 License Compliance — 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. Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (3 contributor(s) across 143 commit(s) sampled, automation and bot accounts excluded). One of them holds 98% of the history; the other 2 hold 1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D26 Project Cohesion — 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. Project size and spread are measured over build units (a .NET project, a Maven or Gradle module, an npm package, a Go module, a Cargo crate, a Python, Composer, Bundler, Mix, rebar3, sbt, SwiftPM or pub package) whose source a code model reads. This repository's production source is in a language no model reads, or in units whose build tool D26 does not recognise. That is a gap in this analyzer's language reach — not a finding that the repository's projects are cohesive.
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. `ProjectSutro/ProjectSutro/Main App View/ContentView.swift`, `ProjectSutro/ProjectSutro/System Event Views/Event Tables/Unified/SystemEventsTableViews.swift`, `ProjectSutro/SutroESFramework/CoreDataModels/Message/ESMessage+CoreDataProperties.swift` 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 Dockerfile) 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.
AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: a native UI project (ProjectSutro/ProjectSutro.xcodeproj/project.pbxproj). The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, or an npm dev script. None was found, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
ED5 Idempotency — 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 finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P10 Library API & versioning — 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 NuGet packaging and C# public API, and npm, PyPI, crates.io, Maven/Gradle, Go module, RubyGems, Composer, SwiftPM, pub.dev and Hex package manifests only, and no .NET project and no package manifest of those ecosystems 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.
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.
PF3 Async & latency hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Those languages colour their functions async, so blocking inside them is the same defect this card counts elsewhere, but their blocking vocabulary is not modelled yet. That is a gap in this analyzer's language reach — not a finding that the code is free of it.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript and Java source only, and no C# was loaded and no JavaScript/TypeScript or Java 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 and Java source only, and no C# was loaded and no JavaScript/TypeScript or Java 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.
X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Kotlin and Scala source only, and no C# was loaded, no Java, Kotlin or Scala 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.
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 and Rust source only, and no C# was loaded and no Java 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.
X28 Index access outside its own emptiness 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 Scala source only, and no C# was loaded and no Scala 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.
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 and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java 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.
X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala source only, and no C# was loaded and no Scala 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X6 Hand-rolled structured-format parsing — 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 Python, JavaScript/TypeScript, Go, Java/Kotlin/Scala, Ruby, PHP and Rust source only, and no C# was loaded and none of those languages 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.
X7 Silent fallback defaults — 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#, Python, TypeScript/JavaScript, Rust, Go, Java and Kotlin syntax only, and no C#, Python, TypeScript/JavaScript, Rust, Go, Java or Kotlin was loaded for 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.
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.
D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
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").
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.
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.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of 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.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
13 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was EventType.from at 65. A further 13 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 ESEventsEnumerated.swift.esEventTypeIDToEventType at 149 — they are counted neither in the figure above nor in this dimension's score. 10 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: ProjectSutro/SutroESFramework/ES Translation/ESEventsEnumerated.swift (ESEventsEnumerated.swift.esEventTypeIDToEventType at 149), ProjectSutro/SutroESFramework/Events/Artifacts/Socket/SocketTypeResolver.swift (SocketTypeResolver.swift.resolve at 108), ProjectSutro/SutroESFramework/Events/Artifacts/Directory/ODHelpers.swift (ODHelpers.swift.decodeODErrorCode at 62), ProjectSutro/SutroESFramework/ES Translation/ESTranslation.swift (ESTranslation.swift.eventStringToImage at 53), ProjectSutro/ProjectSutro/Event Facts Views/EventViewProvider.swift (EventSpecificViewsProvider.init at 52), and 5 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 8 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 EventType.from (cyclomatic 65) finding(s) in Cyclomatic Complexity — start with EventType.swift. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 SystemChartEventView.eventCounts (cyclomatic 52) finding(s) in Cyclomatic Complexity — start with EventChartViews.swift. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 FilterView.swift.isEventFiltered (cyclomatic 35) finding(s) in Cyclomatic Complexity — start with FilterView.swift. — One of this dimension's main actionable groups (1 warning-level).
Stand up a CI pipeline, then gate Cyclomatic Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 13 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 FilterView.swift.isEventFiltered (cognitive 66) finding(s) in Cognitive Complexity — start with FilterView.swift. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 SystemChartEventView.eventCounts (cognitive 51) finding(s) in Cognitive Complexity — start with EventChartViews.swift. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 SystemRCCorrelatedEventsView.body (cognitive 41) finding(s) in Cognitive Complexity — start with SystemEnrichedEventView.swift. — One of this dimension's main actionable groups (1 warning-level).
Stand up a CI pipeline, then gate Cognitive Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.4 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 10 MethodTooLong finding(s) in God Classes — start with ESEventType+CoreDataClass.swift, FilterView.swift, SystemTargetExecProcMetadataView.swift. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 5 FunctionTooLong finding(s) in God Classes — start with ESEventsEnumerated.swift (3), ODHelpers.swift, ESTranslation.swift. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 2 FileTooLong finding(s) in God Classes — start with ESEventsEnumerated.swift, RCXPC.swift. — One of this dimension's main actionable groups (2 warning-level).
Stand up a CI pipeline, then gate God Classes in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. 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.
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.
94 duplicated block group(s) detected. A further 7 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 66 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with EventLabelViews.swift (2), EventFacts.swift, ESNewPath+CoreDataClass.swift. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 4 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with SystemOpenDirectoryAttrAddMetadataView.swift, FilterView.swift, ESODGroupAddEvent+CoreDataClass.swift. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with EventFacts.swift, ESProcessTraceEvent+CoreDataClass.swift, EventType+ESMapping.swift. — One of this dimension's main actionable groups (4 warning-level).
Stand up a CI pipeline, then gate Code Duplication in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. 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.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
3 production modules (Xcode), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a workspace's implicit (product-name) dependency is not visible there; 0 module(s) off the main sequence, with abstractness counted on 1 of the 3 (the rest declare no modelled class or interface, export only macros, or have no source directory of their own).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with ESManager.swift, RCXPC.swift. — One of this dimension's main actionable groups (2 warning-level).
Stand up a CI pipeline, then gate Cohesion (LCOM4) in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. 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.
Do you agree with this assessment?
D8 · Code Coverage0.0 / 10Critical✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
No automated tests — no test code was found in this repository.
No automated tests
What to do
Resolve the 1 No automated tests finding(s) in Code Coverage. — One of this dimension's main actionable groups (1 issue-level).
Stand up a CI pipeline, then gate Code Coverage in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution0.0 / 10Critical✓ 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.
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.
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Stand up a CI pipeline, then gate Secret Scanning in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
10 deducted task-comment markers across 25057 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 10 TodoComment finding(s) in Explicit Debt — start with SECoreDataController.swift (2), MutedPath.swift (2), SystemTargetProcessView.swift. — One of this dimension's main actionable groups (10 warning-level).
Stand up a CI pipeline, then gate Explicit Debt in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's single root README is clear and well-structured: a welcoming feature overview with an OBTS v8.0 presentation link, requirements (Apple Silicon/4GB+ Ventura), and installation instructions for both Homebrew and the releases installer; it also links to Apple ES documentation and external resources like Patrick Wardle's ProcessMonitor and FileMonitor blogs. The AtomicESClient README is a focused directory README that documents its own purpose, why it exists, and outlines an educational build path with sample code, but it does not yet show installation or usage for the directory it describes (the AtomicESClient itself), so its quality is constrained by content visibility rather than absence of guidance. Both are strong.
What to do
Improve Documentation Quality — currently 8.0/10. — The repository's single root README is clear and well-structured: a welcoming feature overview with an OBTS v8.0 presentation link, requirements (Apple Silicon/4GB+ Ventura), and installation instructions for both Homebrew and the releases installer; it also links to Apple ES documentation and external resources like Patrick Wardle's ProcessMonitor and FileMonitor blogs. The AtomicESClient README is a focused directory README that documents its own purpose, why it exists, and outlines an educational build path with sample code, but it does not yet show installation or usage for the directory it describes (the AtomicESClient itself), so its quality is constrained by content visibility rather than absence of guidance. Both are strong.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. semgrep hit a parse error in 2 file(s) — `Mute sets/es_default_mute_set_13_3_1.json`, `Mute sets/es_default_mute_set_26.json` — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 131 of the 288 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
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.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour — a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
Other · Domain Modelling — Whether a reference entity protects its own invariants — a class whose identity is a computed content hash but whose hashed fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
`EndpointSecurityManager`'s identity is a computed content hash (a cryptographic digest over its own fields), so those fields must be immutable once the object exists — yet they are exposed as freely externally-mutable `var`s (no `let`/`private(set)`). Mutating a hashed field silently changes the entity's identity and breaks any hash-keyed collection or integrity check. Make the identity-bearing fields immutable (`let`, or `private(set)` with construction-time initialisation). — ProjectSutro/SutroESFramework/ESM/ESManager.swift:23
What to do
Make the identity-determining fields immutable (`let` / `private(set)`) so the entity's hash-identity invariant holds.
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain entity fused to a persistence ORM on its own declaration (active-record), or reaching a web-framework transport type in its own method, couples the domain to infrastructure. The clean-architecture dependency rule.
Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.
Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.
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 'Testing' section to the root README — how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
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.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
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.
What to do
Start a test surface where your build system looks for one (tests/, test/, spec/, or your ecosystem's test source set) — the separation follows from putting the first tests in the right place.
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.
README claims a Security Extension at /Library/SystemExtensions/../com.swiftlydetecting.agent.securityextension.systemextension with signing identifier com.swiftlydetecting.agent.securityextension.systemextension — searched for: `installer package`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
Dynamic runtime ES event subscriptions (on-the-fly modify) are claimed but the evidence shows no such feature — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
Event correlation at the process level is claimed but there is no corresponding project or API in the evidence — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
Process subtree generation and dynamic distribution chart are described but the repository contains no SwiftUI code, so the charts cannot be shown — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
README advertises a RAG / ML engine, but no ML/RAG code or dependency exists — searched for: `rag`, `langchain`, `llamaindex`, `pinecone`, `weaviate`, `qdrant`, `embeddings`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
What to do
Reconcile the README with reality: README claims a Security Extension at /Library/SystemExtensions/../com.swiftlydetecting.agent.securityextension.systemextension with signing identifier com.swiftlydetecting.agent.securityextension.systemextension; Dynamic runtime ES event subscriptions (on-the-fly modify) are claimed but the evidence shows no such feature; Event correlation at the process level is claimed but there is no corresponding project or API in the evidence; Process subtree generation and dynamic distribution chart are described but the repository contains no SwiftUI code, so the charts cannot be shown; README advertises a RAG / ML engine, but no ML/RAG code or dependency exists.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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
Run what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are 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.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 1 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.
Not evidenced — 5 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 86 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
AX8 Test isolation — no test/production split to check
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
D12 Dependency Hygiene — Dependency hygiene not measured — no supported dependency manifest was read
D14 License Compliance — Package manifest not parsed for licence data — analyzer language-coverage gap
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
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.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 measured no build unit over this repository's .c, .swift source. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D27 Navigability — symbol resolution incomplete — navigability not assessed
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 3 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
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.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
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
DM1 Aggregate boundaries — not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) — reported as guidance rather than measured
DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
DM3 Integration-event coupling — not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module — reported as guidance rather than measured
DM7 Repository granularity — not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
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 — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
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# syntax, and none was loaded for this repository. 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
P10 Library API & versioning — 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 — no CI workflow found
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Swift source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not applicable: allocation awareness is rated where code engineers for it — at least 400 production lines that ship benchmarks or already use allocation-aware idioms (8 or more). This repository's Swift has 29,471 production line(s), 3 such use(s) and no benchmarks, so there is no allocation work to rate. The card is reward-only: its absence costs nothing.
PF3 Async & latency hygiene — Sync-over-async was not assessed: this repository's async code is written in Swift, whose blocking calls this check does not model yet. That is a gap in the analyzer's language reach, not a finding about your code.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X26 Unsynchronised callback handoff — not 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
X28 Index access outside its own emptiness 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
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
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X30 Support guard that admits what it rejects — 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 — 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
X7 Silent fallback defaults — 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
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (XCTest or Swift Testing), and run it in CI so the gap cannot reopen.
Mutable hash-identity entity: EndpointSecurityManager ProjectSutro/SutroESFramework/ESM/ESManager.swift:23— `EndpointSecurityManager`'s identity is a computed content hash (a cryptographic digest over its own fields), so those fields must be immutable once the object exists — yet they are exposed as freely externally-mutable `var`s (no `let`/`private(set)`). Mutating a hashed field silently changes the entity's identity and breaks any hash-keyed collection or integrity check. Make the identity-bearing fields immutable (`let`, or `private(set)` with construction-time initialisation).
TodoComment ProjectSutro/ProjectSutro/Event Facts Views/SystemTargetProcessView.swift:301— // // TODO: Add to when adding support for new ES events — 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 ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemEnrichedEventView.swift:199— // TODO: When adding suppport for new ES events an appropriate correlated view might make sense — 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 ProjectSutro/ProjectSutro/Main App View/ContentView.swift:87— // TODO: Implement long running process filtering — 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 ProjectSutro/ProjectSutro/System Event Views/Event Tables/Unified/SystemEventsTableViews.swift:42— // TODO: Limit the number of views the user can have displayed — 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 ProjectSutro/SutroESFramework/SECoreDataController.swift:111— // TODO: Here is where we're compressing events — 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 ProjectSutro/SutroESFramework/SECoreDataController.swift:170— // TODO: Hook up to the UI — 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 ProjectSutro/SutroESFramework/MutedPath.swift:25— // TODO: This may cause a problem in the future. Add in the individual events. — 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 ProjectSutro/SutroESFramework/MutedPath.swift:69— // TODO: This may cause a problem in the future add in each path. — 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 ProjectSutro/SutroESFramework/ESM/ESManager.swift:15— // TODO: Candidate for `@Observable` — 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 ProjectSutro/SutroESFramework/ESM/Utilities/Path Muting/MutingEngine.swift:170— // TODO: Implement the mute with path events — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
MethodTooLong: ESEventType.init ProjectSutro/SutroESFramework/CoreDataModels/EventType/ESEventType+CoreDataClass.swift:115— MethodTooLong — init runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× 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: FilterView.body ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:172— MethodTooLong — body runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SystemTargetExecProcMetadataView.body ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/exec/SystemTargetExecProcMetadataView.swift:78— MethodTooLong — body runs 193 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 93 over it, 1.93× 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: MuteSet.`default` ProjectSutro/SutroESFramework/ESM/Utilities/Path Muting/MuteSet.swift:20— MethodTooLong — `default` runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× 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: EventSpecificViewsProvider.init ProjectSutro/ProjectSutro/Event Facts Views/EventViewProvider.swift:24— MethodTooLong — init runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× 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: ProjectSutroApp.body ProjectSutro/ProjectSutro/Main App View/ProjectSutroApp.swift:77— MethodTooLong — body runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× 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: EventView.body ProjectSutro/ProjectSutro/Main App View/ContentView.swift:223— MethodTooLong — body runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: SystemBTMAddMetadataView.body ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Service Management/launch_item_add/SystemBTMAddMetadataView.swift:19— MethodTooLong — body runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× 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: SystemBTMRemoveMetadataView.body ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Service Management/launch_item_remove/SystemBTMRemoveMetadataView.swift:20— MethodTooLong — body runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EndpointSecurityManager.requestEventSubscriptions ProjectSutro/SutroESFramework/ESM/ESManager.swift:14— MethodTooLong — requestEventSubscriptions runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (6 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:230— ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:230-235 | ProjectSutro/ProjectSutro/Event Facts Views/SystemEventFactsView.swift:24-29 — 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 `ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:230` 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 (6 lines × 2) ProjectSutro/ProjectSutro/System Event Views/Labels/EventLabelViews.swift:346— ProjectSutro/ProjectSutro/System Event Views/Labels/EventLabelViews.swift:346-354 | ProjectSutro/ProjectSutro/System Event Views/Labels/EventLabelViews.swift:398-403 — 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 `ProjectSutro/ProjectSutro/System Event Views/Labels/EventLabelViews.swift:346` 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 (6 lines × 2) ProjectSutro/SutroESFramework/CoreDataModels/Artifacts/Files/ESNewPath+CoreDataClass.swift:26— ProjectSutro/SutroESFramework/CoreDataModels/Artifacts/Files/ESNewPath+CoreDataClass.swift:26-31 | ProjectSutro/SutroESFramework/CoreDataModels/Socket Events/bind/ESUIPCBindEvent+CoreDataClass.swift:24-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) ProjectSutro/SutroESFramework/CoreDataModels/Service Management Events/launch_item_add/ESLaunchItemAddEvent+CoreDataClass.swift:62— ProjectSutro/SutroESFramework/CoreDataModels/Service Management Events/launch_item_add/ESLaunchItemAddEvent+CoreDataClass.swift:62-67 | ProjectSutro/SutroESFramework/CoreDataModels/Service Management Events/launch_item_remove/ESLaunchItemRemoveEvent+CoreDataClass.swift:63-68 — 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 `ProjectSutro/SutroESFramework/CoreDataModels/Service Management Events/launch_item_add/ESLaunchItemAddEvent+CoreDataClass.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, `ProjectSutro/SutroESFramework/CoreDataModels/Service Management Events/launch_item_add/ESLaunchItemAddEvent+CoreDataClass.swift:68` calls `encode` and `ProjectSutro/SutroESFramework/CoreDataModels/Service Management Events/launch_item_remove/ESLaunchItemRemoveEvent+CoreDataClass.swift:70` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) ProjectSutro/SutroESFramework/CoreDataModels/XProtect Events/ESXProtectDetect+CoreDataClass.swift:41— ProjectSutro/SutroESFramework/CoreDataModels/XProtect Events/ESXProtectDetect+CoreDataClass.swift:41-46 | ProjectSutro/SutroESFramework/CoreDataModels/XProtect Events/ESXProtectRemediate+CoreDataClass.swift:48-53 — 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 `ProjectSutro/SutroESFramework/CoreDataModels/XProtect Events/ESXProtectDetect+CoreDataClass.swift:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) ProjectSutro/SutroESFramework/Events/Models/Login Events/Login Window Events/lw_session_login/LWLoginEvent.swift:33— ProjectSutro/SutroESFramework/Events/Models/Login Events/Login Window Events/lw_session_login/LWLoginEvent.swift:33-38 | ProjectSutro/SutroESFramework/Events/Models/Login Events/Login Window Events/lw_session_unlock/LWUnlockEvent.swift:26-31 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) ProjectSutro/ProjectSutro/System Event Views/Labels/EventLabelViews.swift:211— ProjectSutro/ProjectSutro/System Event Views/Labels/EventLabelViews.swift:211-216 | ProjectSutro/ProjectSutro/System Event Views/Labels/EventLabelViews.swift:223-228 — 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.
FunctionTooLong: ESEventsEnumerated.swift.esEventTypeIDToEventType ProjectSutro/SutroESFramework/ES Translation/ESEventsEnumerated.swift:163— FunctionTooLong — esEventTypeIDToEventType runs 300 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 200 over it, 3.00× 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.
FunctionTooLong: ESEventsEnumerated.swift.eventTypeToString ProjectSutro/SutroESFramework/ES Translation/ESEventsEnumerated.swift:466— FunctionTooLong — eventTypeToString runs 300 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 200 over it, 3.00× 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.
FunctionTooLong: ESEventsEnumerated.swift.eventStringToType ProjectSutro/SutroESFramework/ES Translation/ESEventsEnumerated.swift:770— FunctionTooLong — eventStringToType runs 300 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 200 over it, 3.00× 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.
FunctionTooLong: ODHelpers.swift.decodeODErrorCode ProjectSutro/SutroESFramework/Events/Artifacts/Directory/ODHelpers.swift:12— FunctionTooLong — decodeODErrorCode runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× 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.
FunctionTooLong: ESTranslation.swift.eventStringToImage ProjectSutro/SutroESFramework/ES Translation/ESTranslation.swift:85— FunctionTooLong — eventStringToImage runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (13 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:95— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:95-107 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift:75-87 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 85 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:95` 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) ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:272— ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:272-284 | ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:317-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:272` 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) ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift:24— ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift:24-36 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupRemoveEvent+CoreDataClass.swift:23-35 — before extracting anything, compare `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift` and `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupRemoveEvent+CoreDataClass.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift:24` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) ProjectSutro/SutroESFramework/ESM/Utilities/Path Muting/MuteSet.swift:102— ProjectSutro/SutroESFramework/ESM/Utilities/Path Muting/MuteSet.swift:102-114 | ProjectSutro/SutroESFramework/ESM/Utilities/Path Muting/MuteSet.swift:116-128 — 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 `ProjectSutro/SutroESFramework/ESM/Utilities/Path Muting/MuteSet.swift:102` 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) ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:164— ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:164-168 | ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:186-190 — 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 `ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.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 (5 lines × 2) ProjectSutro/SutroESFramework/CoreDataModels/Interprocess Events/trace/ESProcessTraceEvent+CoreDataClass.swift:23— ProjectSutro/SutroESFramework/CoreDataModels/Interprocess Events/trace/ESProcessTraceEvent+CoreDataClass.swift:23-27 | ProjectSutro/SutroESFramework/CoreDataModels/Task Port Events/get_task/ESGetTaskEvent+CoreDataClass.swift:25-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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) ProjectSutro/SutroESFramework/Events/Models/EventType/EventType+ESMapping.swift:561— ProjectSutro/SutroESFramework/Events/Models/EventType/EventType+ESMapping.swift:561-565 | ProjectSutro/SutroESFramework/Events/Models/EventType/EventType+ESMapping.swift:576-580 — 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 `ProjectSutro/SutroESFramework/Events/Models/EventType/EventType+ESMapping.swift:561` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) ProjectSutro/SutroESFramework/Events/Models/File Metadata Events/listextattr/XattrListEvent.swift:26— ProjectSutro/SutroESFramework/Events/Models/File Metadata Events/listextattr/XattrListEvent.swift:26-31 | ProjectSutro/SutroESFramework/Events/Models/File System Events/write/FileWriteEvent.swift:25-29 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (19 lines × 2) ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:54— ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:54-72 | ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:79-97 — 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 (19 lines × 2) ProjectSutro/ProjectSutro/Settings Views/EventSubscriptionsSettingsView.swift:50— ProjectSutro/ProjectSutro/Settings Views/EventSubscriptionsSettingsView.swift:50-68 | ProjectSutro/ProjectSutro/Settings Views/Muting/PathMutingSettingsView.swift:159-177 — 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 `ProjectSutro/ProjectSutro/Settings Views/EventSubscriptionsSettingsView.swift:50` 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 (19 lines × 2) ProjectSutro/SutroESFramework/Core Data Controller/CoreDataController.swift:212— ProjectSutro/SutroESFramework/Core Data Controller/CoreDataController.swift:212-230 | ProjectSutro/SutroESFramework/Core Data Controller/CoreDataController.swift:242-260 — 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 `ProjectSutro/SutroESFramework/Core Data Controller/CoreDataController.swift:212` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemEnrichedEventView.swift:65— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemEnrichedEventView.swift:65-78 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemEnrichedEventView.swift:111-124 — 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemEnrichedEventView.swift:65` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:37— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:37-50 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift:27-40 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:37` 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 (14 lines × 2) ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:134— ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:134-147 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:224-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.
Duplicated block (10 lines × 6) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:318— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:318-327 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:361-370 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:403-412 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:435-444 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:536-545 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:578-587 — 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.
Duplicated block (10 lines × 6) ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODAttributeValueAddEvent+CoreDataClass.swift:21— ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODAttributeValueAddEvent+CoreDataClass.swift:21-30 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODCreateGroupEvent+CoreDataClass.swift:21-30 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODCreateUserEvent+CoreDataClass.swift:26-35 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift:21-30 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupRemoveEvent+CoreDataClass.swift:20-29 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODModifyPasswordEvent+CoreDataClass.swift:20-29 — before extracting anything, compare `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift` and `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupRemoveEvent+CoreDataClass.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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.
Duplicated block (10 lines × 6) ProjectSutro/SutroESFramework/Events/Models/Directory Events/attribute_value_add/OpenDirectoryAttributeValueAddEvent.swift:107— ProjectSutro/SutroESFramework/Events/Models/Directory Events/attribute_value_add/OpenDirectoryAttributeValueAddEvent.swift:107-116 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/create_group/OpenDirectoryCreateGroupEvent.swift:78-87 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/create_user/OpenDirectoryCreateUserEvent.swift:76-85 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_add/OpenDirectoryGroupAddEvent.swift:95-104 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_remove/OpenDirectoryGroupRemoveEvent.swift:95-104 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/modify_password/OpenDirectoryModifyPasswordEvent.swift:71-80 — before extracting anything, compare `ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_add/OpenDirectoryGroupAddEvent.swift` and `ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_remove/OpenDirectoryGroupRemoveEvent.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `ProjectSutro/SutroESFramework/Events/Models/Directory Events/attribute_value_add/OpenDirectoryAttributeValueAddEvent.swift:107` 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–10 lines × 2) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:349— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:349-357 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:373-382 — 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 `ProjectSutro/SecurityExtension/XPC/RCXPC.swift:349` 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.
Duplicated block (9–10 lines × 2) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:391— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:391-399 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:415-424 — 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 `ProjectSutro/SecurityExtension/XPC/RCXPC.swift:391` 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.
Duplicated block (9–10 lines × 2) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:614— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:614-622 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:638-647 — 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 `ProjectSutro/SecurityExtension/XPC/RCXPC.swift:614` 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.
Duplicated block (8–9 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Grouping/SystemProcessGroupTableView.swift:24— ProjectSutro/ProjectSutro/Event Facts Views/Event Grouping/SystemProcessGroupTableView.swift:24-32 | ProjectSutro/ProjectSutro/Event Facts Views/Event Grouping/SystemSessionGroupTableView.swift:43-50 — 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 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 (8–9 lines × 2) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:525— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:525-532 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:548-556 — 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 `ProjectSutro/SecurityExtension/XPC/RCXPC.swift:525` 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.
Duplicated block (8–9 lines × 2) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:567— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:567-574 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:590-598 — 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 `ProjectSutro/SecurityExtension/XPC/RCXPC.swift:567` 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.
FileTooLong: ES Translation/ESEventsEnumerated.swift ProjectSutro/SutroESFramework/ES Translation/ESEventsEnumerated.swift— FileTooLong — 1050 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 550 over it, 2.10× 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: XPC/RCXPC.swift ProjectSutro/SecurityExtension/XPC/RCXPC.swift— FileTooLong — 596 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: RCXPCConnection (121-741). The bar is 500 significant lines; this is 96 over it, 1.19× 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.
TooManyMethods: EndpointSecurityManager ProjectSutro/SutroESFramework/ESM/ESManager.swift:23— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RCXPCConnection ProjectSutro/SecurityExtension/XPC/RCXPC.swift:121— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (6 members, 50+ identical tokens) ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODAttributeValueAddEvent+CoreDataClass.swift:19— ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODAttributeValueAddEvent+CoreDataClass.swift:19-38 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODCreateGroupEvent+CoreDataClass.swift:19-35 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODCreateUserEvent+CoreDataClass.swift:24-40 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift:19-36 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupRemoveEvent+CoreDataClass.swift:18-35 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODModifyPasswordEvent+CoreDataClass.swift:18-35 — 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) ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODAttributeValueAddEvent+CoreDataClass.swift:42— ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODAttributeValueAddEvent+CoreDataClass.swift:42-57 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODCreateGroupEvent+CoreDataClass.swift:39-51 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODCreateUserEvent+CoreDataClass.swift:45-57 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift:40-53 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupRemoveEvent+CoreDataClass.swift:39-52 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODModifyPasswordEvent+CoreDataClass.swift:39-52 — 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.
Duplicated block (23 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWLoginMetadataView.swift:23— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWLoginMetadataView.swift:23-45 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWUnlockMetadataView.swift:23-45 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWLoginMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWUnlockMetadataView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWLoginMetadataView.swift:23` 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 (23 lines × 2) ProjectSutro/SutroESFramework/Events/Models/Service Management Events/LaunchItemAddEvent.swift:37— ProjectSutro/SutroESFramework/Events/Models/Service Management Events/LaunchItemAddEvent.swift:37-59 | ProjectSutro/SutroESFramework/Events/Models/Service Management Events/LaunchItemRemoveEvent.swift:42-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ProjectSutro/SutroESFramework/Events/Models/Service Management Events/LaunchItemAddEvent.swift:62` calls `toString` and `ProjectSutro/SutroESFramework/Events/Models/Service Management Events/LaunchItemRemoveEvent.swift:65` 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 (22 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemInitatingProcessView.swift:26— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemInitatingProcessView.swift:26-47 | ProjectSutro/ProjectSutro/Event Facts Views/SystemTargetProcessView.swift:171-192 — 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemInitatingProcessView.swift:26` 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, `ProjectSutro/ProjectSutro/Event Facts Views/SystemTargetProcessView.swift:195` calls `Divider` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemInitatingProcessView.swift:49` 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 (22 lines × 2) ProjectSutro/SutroESFramework/CoreDataModels/Service Management Events/launch_item_add/ESLaunchItemAddEvent+CoreDataClass.swift:26— ProjectSutro/SutroESFramework/CoreDataModels/Service Management Events/launch_item_add/ESLaunchItemAddEvent+CoreDataClass.swift:26-47 | ProjectSutro/SutroESFramework/CoreDataModels/Service Management Events/launch_item_remove/ESLaunchItemRemoveEvent+CoreDataClass.swift:28-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (21 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/check/SystemProcessCheckMetadataView.swift:44— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/check/SystemProcessCheckMetadataView.swift:44-64 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/suspend_resume/SystemProcessSocketMetadataView.swift:49-69 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/check/SystemProcessCheckMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/suspend_resume/SystemProcessSocketMetadataView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/check/SystemProcessCheckMetadataView.swift:44` 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 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift:23— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift:23-43 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectRemediateMetadataView.swift:24-44 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectRemediateMetadataView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 87 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift:23` 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, `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift:45` calls `lineLimit` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectRemediateMetadataView.swift:46` 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 (16 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:105— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:105-120 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:78-93 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:183— ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:183-198 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:286-301 — 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 `ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:183` 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 (11–12 lines × 2) ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:149— ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:149-160 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Unified/UnifiedSystemEventViews.swift:167-177 — 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 `ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:239— ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:239-249 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Unified/UnifiedSystemEventViews.swift:53-64 — 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 `ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:239` 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, `ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:250` calls `defaultVisibility` and `ProjectSutro/ProjectSutro/System Event Views/Event Tables/Unified/UnifiedSystemEventViews.swift:66` 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 (10 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:18— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:18-27 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupRemoveMetadataView.swift:20-29 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupRemoveMetadataView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:18` 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, `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:28` calls `font` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupRemoveMetadataView.swift:30` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift:44— ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift:44-53 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupRemoveEvent+CoreDataClass.swift:43-52 — before extracting anything, compare `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift` and `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupRemoveEvent+CoreDataClass.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift:44` 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 (7 lines × 2) ProjectSutro/SutroESFramework/CoreDataModels/XProtect Events/ESXProtectDetect+CoreDataClass.swift:26— ProjectSutro/SutroESFramework/CoreDataModels/XProtect Events/ESXProtectDetect+CoreDataClass.swift:26-32 | ProjectSutro/SutroESFramework/CoreDataModels/XProtect Events/ESXProtectRemediate+CoreDataClass.swift:29-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.
Duplicated block (7 lines × 2) ProjectSutro/SutroESFramework/CoreDataModels/Login Events/Login Window Events/lw_session_login/ESLWLoginEvent+CoreDataClass.swift:32— ProjectSutro/SutroESFramework/CoreDataModels/Login Events/Login Window Events/lw_session_login/ESLWLoginEvent+CoreDataClass.swift:32-38 | ProjectSutro/SutroESFramework/CoreDataModels/Login Events/Login Window Events/lw_session_unlock/ESLWUnlockEvent+CoreDataClass.swift:33-39 — 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.
Low cohesion: EndpointSecurityManager (LCOM4 13) ProjectSutro/SutroESFramework/ESM/ESManager.swift:23— EndpointSecurityManager's methods fall into 13 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 13 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: RCXPCConnection (LCOM4 4) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:121— RCXPCConnection'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.
EventType.from (cyclomatic 65) ProjectSutro/SutroESFramework/Events/Models/EventType/EventType.swift:12— EventType.from has cyclomatic complexity 65 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SystemChartEventView.eventCounts (cyclomatic 52) ProjectSutro/ProjectSutro/Chart Views/EventChartViews.swift:70— SystemChartEventView.eventCounts has cyclomatic complexity 52 (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.
FilterView.swift.isEventFiltered (cyclomatic 35) ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:35— FilterView.swift.isEventFiltered has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TCCModifyEvent.init (cyclomatic 33) ProjectSutro/SutroESFramework/Events/Models/TCC Events/tcc_modify/TCCModifyEvent.swift:31— TCCModifyEvent.init has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SystemRCCorrelatedEventsView.body (cyclomatic 26) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemEnrichedEventView.swift:200— SystemRCCorrelatedEventsView.body 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.
SystemTargetExecProcMetadataView.body (cyclomatic 24) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/exec/SystemTargetExecProcMetadataView.swift:78— SystemTargetExecProcMetadataView.body 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.
EventView.body (cyclomatic 19) ProjectSutro/ProjectSutro/Main App View/ContentView.swift:223— EventView.body has cyclomatic complexity 19 (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.
Process.init (cyclomatic 19) ProjectSutro/SutroESFramework/Events/Artifacts/Process/Process.swift:66— Process.init has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ProcessExecEventNameView.body (cyclomatic 18) ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:32— ProcessExecEventNameView.body 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.
ProcessExecEvent.init (cyclomatic 18) ProjectSutro/SutroESFramework/Events/Models/Process Events/exec/ProcessExecEvent.swift:42— ProcessExecEvent.init 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.
EventDetailsView.body (cyclomatic 16) ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:161— EventDetailsView.body 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.
FilterView.body (cyclomatic 16) ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:172— FilterView.body has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ESProcess.init (cyclomatic 16) ProjectSutro/SutroESFramework/CoreDataModels/Artifacts/Process/ESProcess+CoreDataClass.swift:14— ESProcess.init has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FilterView.swift.isEventFiltered (cognitive 66) ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:35— FilterView.swift.isEventFiltered has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (57 pts), boolean chains 9 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SystemChartEventView.eventCounts (cognitive 51) ProjectSutro/ProjectSutro/Chart Views/EventChartViews.swift:70— SystemChartEventView.eventCounts has cognitive complexity 51 (threshold 15). Drivers by points: if/else 51. 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.
SystemRCCorrelatedEventsView.body (cognitive 41) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemEnrichedEventView.swift:200— SystemRCCorrelatedEventsView.body has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (25 pts), ternaries 7 (14 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventDetailsView.body (cognitive 32) ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:161— EventDetailsView.body has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 3 (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.
SystemEventsTableView.body (cognitive 29) ProjectSutro/ProjectSutro/System Event Views/Event Tables/Unified/SystemEventsTableViews.swift:39— SystemEventsTableView.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 3 (11 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SystemTargetExecProcMetadataView.body (cognitive 29) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/exec/SystemTargetExecProcMetadataView.swift:78— SystemTargetExecProcMetadataView.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ProcessExecEvent.init (cognitive 29) ProjectSutro/SutroESFramework/Events/Models/Process Events/exec/ProcessExecEvent.swift:42— ProcessExecEvent.init has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProcessExecEventNameView.body (cognitive 27) ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:32— ProcessExecEventNameView.body has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 3 (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.
EventType.from (cognitive 26) ProjectSutro/SutroESFramework/Events/Models/EventType/EventType.swift:12— EventType.from has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 4 (8 pts), match/switch 3 (5 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EndpointSecurityManager.surfaceEvent (cognitive 22) ProjectSutro/SutroESFramework/ESM/ESManager.swift:101— EndpointSecurityManager.surfaceEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4 (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.
CoreDataController.insertSystemEvents (cognitive 21) ProjectSutro/SutroESFramework/Core Data Controller/CoreDataController.swift:70— CoreDataController.insertSystemEvents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (4 pts), error handling 2 (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.
FilterView.body (cognitive 18) ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:172— FilterView.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 4 (nesting depth added 2). 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.
AuthJudgeProcsView.body (cognitive 18) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:33— AuthJudgeProcsView.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5 (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.
EndpointSecurityManager.mutePath (cognitive 16) ProjectSutro/SutroESFramework/ESM/ESManager.swift:163— EndpointSecurityManager.mutePath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 1 (4 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.
EndpointSecurityManager.unmutePath (cognitive 16) ProjectSutro/SutroESFramework/ESM/ESManager.swift:201— EndpointSecurityManager.unmutePath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 1 (4 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.
ESProcess.init (cognitive 16) ProjectSutro/SutroESFramework/CoreDataModels/Artifacts/Process/ESProcess+CoreDataClass.swift:14— ESProcess.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SystemBTMAddMetadataView.body (cognitive 16) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Service Management/launch_item_add/SystemBTMAddMetadataView.swift:19— SystemBTMAddMetadataView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (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.
SystemBTMRemoveMetadataView.body (cognitive 16) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Service Management/launch_item_remove/SystemBTMRemoveMetadataView.swift:20— SystemBTMRemoveMetadataView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (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.
D4 · Code Duplication· Near-duplicate member family (6 members, 26 shared lines) · ×1
Near-duplicate member family (6 members, 26 shared lines) ProjectSutro/SutroESFramework/Events/Models/Directory Events/attribute_value_add/OpenDirectoryAttributeValueAddEvent.swift:54— ProjectSutro/SutroESFramework/Events/Models/Directory Events/attribute_value_add/OpenDirectoryAttributeValueAddEvent.swift:54-116 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/create_group/OpenDirectoryCreateGroupEvent.swift:47-87 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/create_user/OpenDirectoryCreateUserEvent.swift:43-85 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_add/OpenDirectoryGroupAddEvent.swift:49-104 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_remove/OpenDirectoryGroupRemoveEvent.swift:49-104 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/modify_password/OpenDirectoryModifyPasswordEvent.swift:31-80 — These 6 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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· Near-duplicate member family (5 members, 26 shared lines) · ×1
Near-duplicate member family (5 members, 26 shared lines) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:344— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:344-383 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:386-425 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:520-557 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:562-599 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:609-648 — These 5 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 48 shared lines) · ×1
Near-duplicate member family (4 members, 48 shared lines) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:19— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:19-75 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/dup/SystemFDDuplicateMetadataView.swift:19-73 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/write/SystemFileWriteMetadataView.swift:19-74 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/unlink/SystemUnlinkEventMetadataView.swift:23-77 — These 4 members are variants of one another: a block of 48 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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· Near-duplicate member family (4 members, 33 shared lines) · ×1
Near-duplicate member family (4 members, 33 shared lines) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:21— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:21-119 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:19-117 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:21-133 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift:20-124 — These 4 members are variants of one another: a block of 33 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/FileMetadataSystemEventViews.swift:21— ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/FileMetadataSystemEventViews.swift:21-44 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/FileSystemEventViews.swift:24-71 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/LaunchItemSystemEventViews.swift:22-63 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/MMAPSystemEventsViews.swift:46-78 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/SystemFileDupEventTableView.swift:24-44 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/SystemFileRenameEventTableView.swift:23-69 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/SystemLoginEventTableViews.swift:24-45 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/XProtectSystemEventViews.swift:23-69 — These 8 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 8 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 8 times.
Duplicated block (152 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Service Management/launch_item_add/SystemBTMAddMetadataView.swift:40— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Service Management/launch_item_add/SystemBTMAddMetadataView.swift:40-191 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Service Management/launch_item_remove/SystemBTMRemoveMetadataView.swift:33-184 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Service Management/launch_item_add/SystemBTMAddMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Service Management/launch_item_remove/SystemBTMRemoveMetadataView.swift` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Service Management/launch_item_add/SystemBTMAddMetadataView.swift:40` 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 (35–37 lines × 3) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:25— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:25-61 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:27-61 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift:26-61 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:25` 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, `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:63` calls `padding` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift:63` 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 (34 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/TCC/SystemTCCModifyMetadataView.swift:104— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/TCC/SystemTCCModifyMetadataView.swift:104-137 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/TCC/SystemTCCModifyMetadataView.swift:141-174 — 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 (31–33 lines × 4) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:23— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:23-55 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/dup/SystemFDDuplicateMetadataView.swift:23-53 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/write/SystemFileWriteMetadataView.swift:23-54 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/unlink/SystemUnlinkEventMetadataView.swift:27-57 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/dup/SystemFDDuplicateMetadataView.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 106 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:23` 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 (32 lines × 2) ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_add/OpenDirectoryGroupAddEvent.swift:70— ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_add/OpenDirectoryGroupAddEvent.swift:70-101 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_remove/OpenDirectoryGroupRemoveEvent.swift:70-101 — before extracting anything, compare `ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_add/OpenDirectoryGroupAddEvent.swift` and `ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_remove/OpenDirectoryGroupRemoveEvent.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_add/OpenDirectoryGroupAddEvent.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.
Duplicated block (30 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:45— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:45-74 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:78-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:45` 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 (29 lines × 2) ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:241— ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:241-269 | ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:286-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:241` 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 (28 lines × 3) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:24— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:24-51 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/getextattr/SystemGetExtattrMetadataView.swift:24-51 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/setextattr/SystemSetExtattrMetadataView.swift:24-51 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/getextattr/SystemGetExtattrMetadataView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:24` 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, `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/getextattr/SystemGetExtattrMetadataView.swift:52` calls `lineLimit` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:52` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (28 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift:50— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift:50-77 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLogoutMetadataView.swift:32-59 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLogoutMetadataView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift:50` 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 (25 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:188— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:188-212 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift:190-214 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:188` 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 (20 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift:19— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift:19-38 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLogoutMetadataView.swift:19-38 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLogoutMetadataView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 97 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:65— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:65-83 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift:51-70 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 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 (18–20 lines × 2) ProjectSutro/ProjectSutro/Main App View/Accessories/SonomaStartButton.swift:54— ProjectSutro/ProjectSutro/Main App View/Accessories/SonomaStartButton.swift:54-73 | ProjectSutro/ProjectSutro/Main App View/Accessories/VenturaStartButton.swift:54-71 — 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 `ProjectSutro/ProjectSutro/Main App View/Accessories/SonomaStartButton.swift:54` 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 (18 lines × 4) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Gatekeeper/SystemGatekeeperUserOverrideMetadataView.swift:118— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Gatekeeper/SystemGatekeeperUserOverrideMetadataView.swift:118-135 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Socket/bind/SystemUIPCBindMetadataView.swift:65-82 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Socket/connect/SystemUIPCConnectMetadataView.swift:74-91 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/TCC/SystemTCCModifyMetadataView.swift:186-203 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Gatekeeper/SystemGatekeeperUserOverrideMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Socket/bind/SystemUIPCBindMetadataView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Gatekeeper/SystemGatekeeperUserOverrideMetadataView.swift:118` 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 (18 lines × 2) ProjectSutro/SutroESFramework/Events/Models/OpenSSH Events/login/SSHLoginEvent.swift:80— ProjectSutro/SutroESFramework/Events/Models/OpenSSH Events/login/SSHLoginEvent.swift:80-97 | ProjectSutro/SutroESFramework/Events/Models/OpenSSH Events/logout/OpenSSHLogoutEvent.swift:38-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also 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 (17 lines × 7) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Code Signing/SystemCodeSigningInvalidatedMetadataView.swift:20— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Code Signing/SystemCodeSigningInvalidatedMetadataView.swift:20-36 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/remote_thread_create/SystemRemoteThreadCreateMetadataView.swift:97-113 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/trace/SystemProcessTraceMetadataView.swift:76-92 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/check/SystemProcessCheckMetadataView.swift:79-95 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/signal/SystemProcessSignalMetadataView.swift:87-103 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/suspend_resume/SystemProcessSocketMetadataView.swift:85-101 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Task Port/SystemGetTaskMetadataView.swift:44-60 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/remote_thread_create/SystemRemoteThreadCreateMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/trace/SystemProcessTraceMetadataView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Code Signing/SystemCodeSigningInvalidatedMetadataView.swift:20` 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 (16–17 lines × 6) ProjectSutro/SutroESFramework/Events/Models/Directory Events/attribute_value_add/OpenDirectoryAttributeValueAddEvent.swift:63— ProjectSutro/SutroESFramework/Events/Models/Directory Events/attribute_value_add/OpenDirectoryAttributeValueAddEvent.swift:63-78 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/create_group/OpenDirectoryCreateGroupEvent.swift:56-71 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/create_user/OpenDirectoryCreateUserEvent.swift:53-69 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_add/OpenDirectoryGroupAddEvent.swift:58-73 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_remove/OpenDirectoryGroupRemoveEvent.swift:58-73 | ProjectSutro/SutroESFramework/Events/Models/Directory Events/modify_password/OpenDirectoryModifyPasswordEvent.swift:40-55 — before extracting anything, compare `ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_add/OpenDirectoryGroupAddEvent.swift` and `ProjectSutro/SutroESFramework/Events/Models/Directory Events/group_remove/OpenDirectoryGroupRemoveEvent.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (17 lines × 3) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:322— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:322-338 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:439-455 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:467-483 — 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 `ProjectSutro/SecurityExtension/XPC/RCXPC.swift:322` 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 (16–17 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:21— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:21-37 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:21-36 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 79 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift:60— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift:60-76 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectRemediateMetadataView.swift:72-88 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectRemediateMetadataView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 87 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift:60` 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 (16 lines × 3) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:43— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:43-58 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:76-91 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:113-128 — 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:43` 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 (14–15 lines × 3) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:113— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:113-127 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:86-99 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift:93-106 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:113` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14–15 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:170— ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:170-183 | ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:192-206 — 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 `ProjectSutro/ProjectSutro/Event Facts Views/Legacy/EventFacts.swift:170` 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 (15 lines × 2) ProjectSutro/SutroESFramework/Events/Artifacts/Files/FileDestination.swift:16— ProjectSutro/SutroESFramework/Events/Artifacts/Files/FileDestination.swift:16-30 | ProjectSutro/SutroESFramework/Events/Artifacts/Files/FileDestination.swift:33-47 — 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 (11–14 lines × 43) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:55— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:55-65 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/getextattr/SystemGetExtattrMetadataView.swift:56-66 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/listextattr/SystemListExtattrMetadataView.swift:47-57 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/setextattr/SystemSetExtattrMetadataView.swift:56-66 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System Mounting/SystemMountMetadataView.swift:57-67 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:52-62 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/create/SystemFileCreateMetadataView.swift:157-167 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/dup/SystemFDDuplicateMetadataView.swift:50-60 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/open/SystemFileOpenMetadataView.swift:44-54 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/rename/SystemFileRenameMetadataView.swift:116-126 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/write/SystemFileWriteMetadataView.swift:51-61 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Gatekeeper/SystemGatekeeperUserOverrideMetadataView.swift:110-122 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/remote_thread_create/SystemRemoteThreadCreateMetadataView.swift:94-104 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/trace/SystemProcessTraceMetadataView.swift:73-83 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Kernel/SystemIOKitOpenMetadataView.swift:71-81 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/link/SystemLinkEventMetadataView.swift:90-100 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/unlink/SystemUnlinkEventMetadataView.swift:54-64 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWLoginMetadataView.swift:42-52 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWUnlockMetadataView.swift:42-52 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLoginLoginMetadataView.swift:55-65 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/MDM/profile_add/SystemProfileAddMetadataView.swift:82-92 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Memory Mapping/mmap/SystemMMAPMetadataView.swift:80-90 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Memory Mapping/mprotect/SystemMProtectMetadataView.swift:75-85 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:122-132 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:96-106 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:94-104 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:110-120 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupRemoveMetadataView.swift:115-125 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift:101-111 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift:70-82 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLogoutMetadataView.swift:52-64 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/check/SystemProcessCheckMetadataView.swift:76-86 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/exit/SystemProcExitMetadataView.swift:41-54 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/signal/SystemProcessSignalMetadataView.swift:84-94 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/suspend_resume/SystemProcessSocketMetadataView.swift:82-92 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Pseudoterminal/SystemPTYGrantMetadataView.swift:34-44 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Socket/bind/SystemUIPCBindMetadataView.swift:57-69 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Socket/connect/SystemUIPCConnectMetadataView.swift:66-78 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/TCC/SystemTCCModifyMetadataView.swift:178-190 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Task Port/SystemGetTaskMetadataView.swift:41-51 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XPC/SystemXPCConnectMetadataView.swift:44-54 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift:69-81 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectRemediateMetadataView.swift:81-93 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/getextattr/SystemGetExtattrMetadataView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/remote_thread_create/SystemRemoteThreadCreateMetadataView.swift:105` calls `Button`, `toggle` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:66` 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–14 lines × 39) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:58— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:58-70 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/getextattr/SystemGetExtattrMetadataView.swift:59-71 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/listextattr/SystemListExtattrMetadataView.swift:50-62 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/setextattr/SystemSetExtattrMetadataView.swift:59-71 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/setmode/SystemSetModeMetadataView.swift:48-60 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System Mounting/SystemMountMetadataView.swift:60-71 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:55-66 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/create/SystemFileCreateMetadataView.swift:160-171 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/dup/SystemFDDuplicateMetadataView.swift:53-64 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/open/SystemFileOpenMetadataView.swift:47-58 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/rename/SystemFileRenameMetadataView.swift:119-130 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/write/SystemFileWriteMetadataView.swift:54-65 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Gatekeeper/SystemGatekeeperUserOverrideMetadataView.swift:115-126 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Kernel/SystemIOKitOpenMetadataView.swift:74-85 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/link/SystemLinkEventMetadataView.swift:93-104 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/unlink/SystemUnlinkEventMetadataView.swift:57-68 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWLoginMetadataView.swift:45-56 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWUnlockMetadataView.swift:45-56 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLoginLoginMetadataView.swift:58-69 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/MDM/profile_add/SystemProfileAddMetadataView.swift:85-96 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Memory Mapping/mmap/SystemMMAPMetadataView.swift:83-94 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Memory Mapping/mprotect/SystemMProtectMetadataView.swift:78-89 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:125-136 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:99-110 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:97-108 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:113-124 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupRemoveMetadataView.swift:118-129 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift:104-115 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift:73-86 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLogoutMetadataView.swift:55-68 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/exit/SystemProcExitMetadataView.swift:45-58 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/fork/SystemForkProcMetadataView.swift:30-43 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Pseudoterminal/SystemPTYGrantMetadataView.swift:37-49 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Socket/bind/SystemUIPCBindMetadataView.swift:62-73 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Socket/connect/SystemUIPCConnectMetadataView.swift:71-82 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/TCC/SystemTCCModifyMetadataView.swift:183-194 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XPC/SystemXPCConnectMetadataView.swift:47-58 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift:72-85 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectRemediateMetadataView.swift:84-97 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/getextattr/SystemGetExtattrMetadataView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:58` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/exit/SystemProcExitMetadataView.swift:39` calls `ProcessView` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:54` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 8) ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/FileMetadataSystemEventViews.swift:31— ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/FileMetadataSystemEventViews.swift:31-44 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/FileSystemEventViews.swift:57-70 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/LaunchItemSystemEventViews.swift:49-62 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/MMAPSystemEventsViews.swift:65-78 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/SystemFileDupEventTableView.swift:30-43 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/SystemFileRenameEventTableView.swift:55-68 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/SystemLoginEventTableViews.swift:31-44 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/XProtectSystemEventViews.swift:55-68 — 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 8 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ProjectSutro/ProjectSutro/System Event Views/Event Tables/Correlation tables/FileMetadataSystemEventViews.swift:31` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift:33— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift:33-46 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift:63-76 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift:97-110 — 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–14 lines × 2) ProjectSutro/SutroESFramework/Core Data Controller/CoreDataController.swift:300— ProjectSutro/SutroESFramework/Core Data Controller/CoreDataController.swift:300-313 | ProjectSutro/SutroESFramework/Core Data Controller/CoreDataController.swift:317-327 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 5) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:40— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:40-52 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/dup/SystemFDDuplicateMetadataView.swift:38-50 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/write/SystemFileWriteMetadataView.swift:39-51 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/link/SystemLinkEventMetadataView.swift:53-64 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/unlink/SystemUnlinkEventMetadataView.swift:43-54 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/dup/SystemFDDuplicateMetadataView.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 106 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 3) ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:39— ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:39-51 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:63-74 | ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:85-96 — 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 `ProjectSutro/ProjectSutro/System Event Views/Event Tables/Process/ProcessSystemEventsViews.swift:39` 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–13 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/trace/SystemProcessTraceMetadataView.swift:58— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/trace/SystemProcessTraceMetadataView.swift:58-69 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/suspend_resume/SystemProcessSocketMetadataView.swift:67-79 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/trace/SystemProcessTraceMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/suspend_resume/SystemProcessSocketMetadataView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Interprocess/trace/SystemProcessTraceMetadataView.swift:58` 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 × 4) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:25— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:25-37 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:23-35 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:25-36 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift:24-36 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:25` 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 (11 lines × 6) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:40— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:40-50 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/dup/SystemFDDuplicateMetadataView.swift:38-48 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/write/SystemFileWriteMetadataView.swift:39-49 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/link/SystemLinkEventMetadataView.swift:40-50 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/link/SystemLinkEventMetadataView.swift:53-63 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/unlink/SystemUnlinkEventMetadataView.swift:43-53 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/dup/SystemFDDuplicateMetadataView.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 106 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:40` 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 (11 lines × 5) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:367— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:367-377 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:409-419 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:542-552 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:584-594 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:632-642 — 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 `ProjectSutro/SecurityExtension/XPC/RCXPC.swift:367` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:350— ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:350-360 | ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:378-388 | ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:405-415 — 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 `ProjectSutro/ProjectSutro/Main App View/Filter View/FilterView.swift:350` 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–10 lines × 42) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemInitatingProcessView.swift:124— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Enrichment Views/SystemInitatingProcessView.swift:124-132 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift:60-67 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/getextattr/SystemGetExtattrMetadataView.swift:61-68 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/listextattr/SystemListExtattrMetadataView.swift:52-59 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/setextattr/SystemSetExtattrMetadataView.swift:61-68 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/setmode/SystemSetModeMetadataView.swift:50-57 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System Mounting/SystemMountMetadataView.swift:62-69 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/close/SystemFileCloseMetadataView.swift:57-64 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/create/SystemFileCreateMetadataView.swift:162-169 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/dup/SystemFDDuplicateMetadataView.swift:55-62 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/open/SystemFileOpenMetadataView.swift:49-56 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/rename/SystemFileRenameMetadataView.swift:121-128 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/write/SystemFileWriteMetadataView.swift:56-63 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Gatekeeper/SystemGatekeeperUserOverrideMetadataView.swift:117-124 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Kernel/SystemIOKitOpenMetadataView.swift:76-83 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/link/SystemLinkEventMetadataView.swift:95-102 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Link/unlink/SystemUnlinkEventMetadataView.swift:59-66 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWLoginMetadataView.swift:47-54 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLWUnlockMetadataView.swift:47-54 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Login/SystemLoginLoginMetadataView.swift:60-67 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/MDM/profile_add/SystemProfileAddMetadataView.swift:87-94 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Memory Mapping/mmap/SystemMMAPMetadataView.swift:85-92 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Memory Mapping/mprotect/SystemMProtectMetadataView.swift:80-87 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:127-134 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateGroupMetadataView.swift:101-108 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:99-106 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:115-122 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupRemoveMetadataView.swift:120-127 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift:106-113 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLoginMetadataView.swift:75-84 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/OpenSSH/SystemOpenSSHLogoutMetadataView.swift:57-66 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/exit/SystemProcExitMetadataView.swift:47-56 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Process/fork/SystemForkProcMetadataView.swift:32-41 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Pseudoterminal/SystemPTYGrantMetadataView.swift:39-46 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:190-198 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/petition/SystemAuthorizationPetitionMetadataView.swift:192-200 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Socket/bind/SystemUIPCBindMetadataView.swift:64-71 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Socket/connect/SystemUIPCConnectMetadataView.swift:73-80 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/TCC/SystemTCCModifyMetadataView.swift:185-192 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XPC/SystemXPCConnectMetadataView.swift:49-56 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectDetectMetadataView.swift:74-83 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/XProtect/SystemXProtectRemediateMetadataView.swift:86-95 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/deleteextattr/SystemDeleteExtattrMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File Metadata/getextattr/SystemGetExtattrMetadataView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Security Authorization/judgement/SystemAuthorizationJudementMetadataView.swift:190` 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 (5–10 lines × 3) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/MDM/profile_add/SystemProfileAddMetadataView.swift:35— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/MDM/profile_add/SystemProfileAddMetadataView.swift:35-44 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/MDM/profile_add/SystemProfileAddMetadataView.swift:46-55 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/MDM/profile_add/SystemProfileAddMetadataView.swift:56-60 — 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/MDM/profile_add/SystemProfileAddMetadataView.swift:35` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/MDM/profile_add/SystemProfileAddMetadataView.swift:35` calls `monospaced` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/MDM/profile_add/SystemProfileAddMetadataView.swift:56` does not — after which the two agree again for 5 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 × 3) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/create/SystemFileCreateMetadataView.swift:126— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/create/SystemFileCreateMetadataView.swift:126-134 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/rename/SystemFileRenameMetadataView.swift:80-88 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/rename/SystemFileRenameMetadataView.swift:99-107 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/create/SystemFileCreateMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/rename/SystemFileRenameMetadataView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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 `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/create/SystemFileCreateMetadataView.swift:126` 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 (9 lines × 2) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:79— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:79-87 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupRemoveMetadataView.swift:88-96 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupRemoveMetadataView.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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 before the matched lines, `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupAddMetadataView.swift:77` calls `frame` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryGroupRemoveMetadataView.swift:86` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 12) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:299— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:299-306 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:348-355 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:372-379 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:390-397 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:414-421 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:494-501 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:524-531 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:547-554 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:566-573 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:589-596 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:613-620 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:637-644 — all 12 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. 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 (8 lines × 6) ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODAttributeValueAddEvent+CoreDataClass.swift:42— ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODAttributeValueAddEvent+CoreDataClass.swift:42-49 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODCreateGroupEvent+CoreDataClass.swift:39-46 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODCreateUserEvent+CoreDataClass.swift:45-52 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift:40-47 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupRemoveEvent+CoreDataClass.swift:39-46 | ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODModifyPasswordEvent+CoreDataClass.swift:39-46 — before extracting anything, compare `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupAddEvent+CoreDataClass.swift` and `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODGroupRemoveEvent+CoreDataClass.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 `ProjectSutro/SutroESFramework/CoreDataModels/Directory Events/ESODAttributeValueAddEvent+CoreDataClass.swift:42` 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 × 3) ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:95— ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift:95-102 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift:68-75 | ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryModifyPasswordMetadataView.swift:75-82 — before extracting anything, compare `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryAttrAddMetadataView.swift` and `ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/Open Directory/SystemOpenDirectoryCreateUserMetadataView.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 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.
Duplicated block (7–8 lines × 2) ProjectSutro/SutroESFramework/Events/Artifacts/Process/ProcessHelpers.swift:69— ProjectSutro/SutroESFramework/Events/Artifacts/Process/ProcessHelpers.swift:69-75 | ProjectSutro/SutroESFramework/Events/Artifacts/Process/ProcessHelpers.swift:80-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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.
Duplicated block (5 lines × 7) ProjectSutro/SecurityExtension/XPC/RCXPC.swift:318— ProjectSutro/SecurityExtension/XPC/RCXPC.swift:318-322 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:361-365 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:403-407 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:435-439 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:536-540 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:578-582 | ProjectSutro/SecurityExtension/XPC/RCXPC.swift:626-630 — 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.
Duplicated block (18 lines × 3) ProjectSutro/ProjectSutro/Main App View/Accessories/SonomaStartButton.swift:24— ProjectSutro/ProjectSutro/Main App View/Accessories/SonomaStartButton.swift:24-41 | ProjectSutro/ProjectSutro/Main App View/Accessories/VenturaStartButton.swift:24-41 | ProjectSutro/ProjectSutro/Main App View/ContentView.swift:204-221 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (5 lines × 3) ProjectSutro/SutroESFramework/CoreDataModels/File Metadata Events/deleteextattr/ESXattrDeleteEvent+CoreDataClass.swift:32— ProjectSutro/SutroESFramework/CoreDataModels/File Metadata Events/deleteextattr/ESXattrDeleteEvent+CoreDataClass.swift:32-36 | ProjectSutro/SutroESFramework/CoreDataModels/File Metadata Events/getextattr/ESXattrGetEvent+CoreDataClass.swift:33-37 | ProjectSutro/SutroESFramework/CoreDataModels/File Metadata Events/setextattr/ESXattrSetEvent+CoreDataClass.swift:33-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (7 lines × 3) ProjectSutro/SutroESFramework/Events/Models/File Metadata Events/deleteextattr/XattrDeleteEvent.swift:27— ProjectSutro/SutroESFramework/Events/Models/File Metadata Events/deleteextattr/XattrDeleteEvent.swift:27-33 | ProjectSutro/SutroESFramework/Events/Models/File Metadata Events/getextattr/XattrGetEvent.swift:26-32 | ProjectSutro/SutroESFramework/Events/Models/File Metadata Events/setextattr/XattrSetEvent.swift:26-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (7 lines × 4) ProjectSutro/SutroESFramework/Events/Models/Service Management Events/LaunchItemAddEvent.swift:27— ProjectSutro/SutroESFramework/Events/Models/Service Management Events/LaunchItemAddEvent.swift:27-33 | ProjectSutro/SutroESFramework/Events/Models/Service Management Events/LaunchItemRemoveEvent.swift:32-38 | ProjectSutro/SutroESFramework/Events/Models/XProtect Events/XProtecRemediateEvent.swift:30-36 | ProjectSutro/SutroESFramework/Events/Models/XProtect Events/XProtectDetectEvent.swift:27-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ProjectSutro/SutroESFramework/Events/Models/XProtect Events/XProtectDetectEvent.swift:37` calls `Int` and `ProjectSutro/SutroESFramework/Events/Models/XProtect Events/XProtecRemediateEvent.swift:41` 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.
README/code drift — README claims a Security Extension at /Library/SystemExtensions/../com.swiftlydetecting.agent.securityextension.systemextension with signing identifier com.swiftlydetecting.agent.securityextension.systemextension — searched for: `installer package`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
README/code drift — Dynamic runtime ES event subscriptions (on-the-fly modify) are claimed but the evidence shows no such feature — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
README/code drift — Event correlation at the process level is claimed but there is no corresponding project or API in the evidence — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
README/code drift — Process subtree generation and dynamic distribution chart are described but the repository contains no SwiftUI code, so the charts cannot be shown — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
README/code drift — README advertises a RAG / ML engine, but no ML/RAG code or dependency exists — searched for: `rag`, `langchain`, `llamaindex`, `pinecone`, `weaviate`, `qdrant`, `embeddings`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
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/`.
No tests found — No test suite could be collected — no discoverable tests to count. If this repository does test, wiring the suite to a framework a runner can collect (XCTest or Swift Testing) is what makes it countable here; a pipeline step that invokes a runner is not evidence on its own, because a runner over an empty suite passes. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here.
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.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
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) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Duplicated predicate ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/rename/SystemFileRenameMetadataView.swift:27— `event.is_quarantined == 0 && event.destination_path.hasSuffix(".app")` appears character-identically in 2 files — ProjectSutro/ProjectSutro/Event Facts Views/Event Metadata Views/File System/rename/SystemFileRenameMetadataView.swift, ProjectSutro/ProjectSutro/System Event Views/Labels/EventLabelViews.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.
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.
none (no readable dependency manifest): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 3 file(s) — `ProjectSutro/ProjectSutro/Main App View/ContentView.swift`, `ProjectSutro/ProjectSutro/System Event Views/Event Tables/Unified/SystemEventsTableViews.swift`, `ProjectSutro/SutroESFramework/CoreDataModels/Message/ESMessage+CoreDataProperties.swift` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
none (no readable dependency manifest): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
0
—
Run 01a0f74d-6491-75a0-836e-650b843d5346 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 5 · Warnings: 164 · Recommendations: 12 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 01-10-2026 @ 11:50 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.