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

pointfreeco/sqlite-data

Measured 15 November 2026, 01:31 UTC, at code version e72164c

CAI score 59out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Down 3 since the last survey

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

A medium codebase: 20,507 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Production Readiness, 52

Findings by how serious they are

20 critical 157 serious 22 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 01:31 UTC

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

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

39of 39 dimensions measured by tools.
182of 199 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
39dimensions across 7 lenses, read from 20,507 lines of product code in 1 project.
Chapters

Executive summary

pointfreeco/sqlite-data falls short of our standard for production because we found no automated security scanning of the code, its secrets or its dependencies. It scores 59 out of 100 and is rated Adequate, and six of its 20 critical findings are security problems in the build pipeline.

Production Readiness, at 52, is the weakest lens and counts most in the score. The best first step is making the 26 tests that check nothing check their results, worth about 5 points. Adding automated security scanning would lift Production Readiness itself, also worth about 5. Raising Production Readiness to 70 would lift the score to about 63.

Four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two secrets can leak from the build pipeline. Pinning each tool to an exact version and limiting each secret to its own step would close both risks. The 13 pieces of business logic tied to the database or web code need separating from the database and web code.

The product code is 20,507 lines, about €45,000 to rebuild.

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

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

If Production Readiness rose from 52 to 70, the lowest score rated Strong, the score would rise from 59 to about 63.

Code composition: what the lines of code are
Product code 48%Tests 52%
New since the last survey: 59 findings

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

  • Cognitive Complexity · SyncEngine.updateLocalFromSchemaChange (cognitive 17) Sources/SQLiteData/CloudKit/SyncEngine.swift
  • Cognitive Complexity · SyncEngine.sendPendingRecordZoneChanges (cognitive 16) Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift
  • God Classes · FunctionTooLong: Metadatabase.swift.migrate Sources/SQLiteData/CloudKit/Internal/Metadatabase.swift
  • Code Duplication · Edited copies of one member (5 members, 26+ corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift
  • Code Duplication · Edited copies of one member (5 members, 24+ corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) Sources/SQLiteData/CloudKit/Internal/Triggers.swift
  • Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift
  • Code Duplication · Edited copy of a member (23 corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift
  • Code Duplication · Edited copy of a member (23 corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift
  • Code Duplication · Edited copy of a member (18 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift
  • Code Duplication · Edited copy of a member (24 corresponding lines) Sources/SQLiteData/CloudKit/Internal/Triggers.swift
  • Code Duplication · Edited copies of one member (6 members, 20+ corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) Sources/SQLiteData/FetchAll.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/Statement+Sections.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/SQLiteData/CloudKit/SyncEngine.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/SQLiteData/CloudKit/Internal/CloudDatabase.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Sources/SQLiteData/FetchOne.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) Sources/SQLiteData/FetchAll.swift
  • Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) Sources/SQLiteData/FetchAll.swift
  • Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) Sources/SQLiteData/FetchAll.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Sources/SQLiteData/FetchOne.swift
  • Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) Sources/SQLiteData/FetchOne.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift
  • Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) Sources/SQLiteData/Fetch.swift
  • Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) Sources/SQLiteData/FetchOne.swift
  • Code Duplication · Edited copies of one member (4 members, 19+ corresponding lines) Sources/SQLiteData/FetchAll.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/SQLiteData/Fetch.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/SQLiteData/Internal/FetchBox.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/Statement+Sections.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/SQLiteData/Internal/FetchBox.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/SQLiteData/CloudKit/SyncEngine.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/SQLiteData/FetchAll.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/SQLiteData/Fetch.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/QueryCursor.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/SQLiteData/CloudKit/Internal/CloudDatabase.swift
  • Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) Sources/SQLiteData/FetchAll.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/SQLiteData/Internal/FetchKey+SwiftUI.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/SQLiteData/Internal/FetchKey+SwiftUI.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift
  • Code Duplication · Duplicated block (16 lines × 2) Sources/SQLiteData/CloudKit/CloudKitSharing.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift
  • Code Duplication · Duplicated block (6 lines × 2) Sources/SQLiteData/Fetch.swift
  • Code Duplication · Duplicated block (5 lines × 2) Sources/SQLiteData/Fetch.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) Examples/Reminders/RemindersDetail.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) Examples/Integration/Regression Coverage/ChildIdentityReset.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Examples/CaseStudies/ObservableModelDemo.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Examples/CaseStudies/TransactionDemo.swift
  • Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) Examples/CloudKitDemo/CountersListFeature.swift
  • Code Duplication · Duplicated block (6 lines × 2) Examples/Reminders/RemindersDetail.swift
  • Code Duplication · Duplicated block (11 lines × 2) Examples/CloudKitDemo/CloudKitDemoApp.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/SQLiteData/CloudKit/SyncEngine.swift Sources/SQLiteData/CloudKit/SyncEngine.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift

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

Fixed since the last survey: 8 findings

These 8 critical or serious findings were in the previous survey, on 29 October 2026, and are gone from this one.

  • Cyclomatic Complexity · SyncEngine.nextRecordZoneChangeBatch (cyclomatic 23) Sources/SQLiteData/CloudKit/SyncEngine.swift
  • Cognitive Complexity · SyncEngine.nextRecordZoneChangeBatch (cognitive 23) Sources/SQLiteData/CloudKit/SyncEngine.swift
  • Code Duplication · Duplicated block (16 lines × 2) Sources/SQLiteData/CloudKit/CloudKitSharing.swift
  • Code Duplication · Duplicated block (7–8 lines × 2) Sources/SQLiteData/CloudKit/SyncEngine.swift
  • Code Duplication · Duplicated block (6 lines × 2) Sources/SQLiteData/Fetch.swift
  • Code Duplication · Duplicated block (6 lines × 2) Examples/Reminders/RemindersDetail.swift
  • Code Duplication · Duplicated block (11 lines × 2) Examples/CloudKitDemo/CloudKitDemoApp.swift
  • Explicit Debt · TodoComment Sources/SQLiteData/CloudKit/SyncEngine.swift
Rebuild cost: about €45,000 · Estimate
Cost to rebuild€15,000 to €75,000, for 250 to 794 hours of work, about 0.3 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 59. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 20,507 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 26 No assertions finding(s) in Test Quality — start with PrimaryKeyMigrationTests.swift (10), AssertQueryTests.swift (7), AccountLifecycleTests.swift (3).
Raises the score by about 5 points · Medium effort · Test Quality
2
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Raises the score by about 5 points · Medium effort · Security & performance tooling
3
Resolve the 1 Dependency not covered by the committed resolution finding(s) in Dependency Hygiene.
Raises the score by about 2 points · Low effort · Dependency Hygiene

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €45,000 to build again, about 0.3 person-years of work. Its weakest lens is Production Readiness, at 52 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 26 No assertions finding(s) in Test Quality. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for medium effort, because it clears the 26 Test Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

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

At a glance — Architecture · 100% · Exemplary ·

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

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

At a glance — Security · 57% · Checked 3 of 10 · gated by D36 ·

At a glance — Domain Modelling · 64% · Adequate ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures7Medium
A05:2025 — Injection6High / Critical

Roadmap

Top priorities: Resolve the 26 No assertions finding(s) in Test Quality — start with PrimaryKeyMigrationTests.swift (10), AssertQueryTests.swift (7), AccountLifecycleTests.swift (3); Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing; Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.

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

Do thisHelpsEffortDimension
Resolve the 26 No assertions finding(s) in Test Quality — start with PrimaryKeyMigrationTests.swift (10), AssertQueryTests.swift (7), AccountLifecycleTests.swift (3).+5.0 ptsMediumTest Quality
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+4.6 ptsMediumSecurity & performance tooling
Resolve the 1 Dependency not covered by the committed resolution finding(s) in Dependency Hygiene.+2.2 ptsLowDependency Hygiene
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2).+1.5 ptsLowStatic Analysis (SAST)
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED.+1.4 ptsLowSupply-chain Provenance & Signing
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+2.8 ptsMediumRelease Hygiene
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+0.7 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+0.7 ptsLowSupply-chain Provenance & Signing

File quality

Per-file score 0–10 — a quality signature. Of 40 files carrying findings, judged against the Production bar: 5% slop · 70% mixed · 25% near-clean.

FileScoreBandWorst signal
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
Sources/SQLiteData/FetchAll.swift5.5MixedGod Classes: TooManyMethods: FetchAll
Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift6.0MixedExplicit Debt: TodoComment
Sources/SQLiteData/CloudKit/SyncEngine.swift7.0MixedCyclomatic Complexity: SyncEngine.handleSentRecordZoneChanges (cyclomatic 36)
Sources/SQLiteData/FetchAll+Sections.swift7.0MixedGod Classes: FileTooLong: SQLiteData/FetchAll+Sections.swift
Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift7.0MixedTest Quality: No assertions: basics
Sources/SQLiteData/Fetch.swift7.0MixedCode Duplication: Edited copies of one member (3 members, 12+ corresponding lines)
Tests/SQLiteDataTests/AssertQueryTests.swift7.0MixedTest Quality: No assertions: assertQueryBasic
Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift7.1MixedCode Duplication: Edited copy of a member (18 corresponding lines)
Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift7.1MixedCyclomatic Complexity: CKRecord.update::open (cyclomatic 19)
Sources/SQLiteData/FetchOne.swift7.1MixedGod Classes: FileTooLong: SQLiteData/FetchOne.swift
Sources/SQLiteData/CloudKit/Internal/Triggers.swift7.2MixedCode Duplication: Edited copy of a member (26 corresponding lines)
Sources/SQLiteData/CloudKit/Internal/Logging.swift7.4MixedCyclomatic Complexity: Logger.log (cyclomatic 46)
Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift7.4MixedCode Duplication: Edited copy of a member (9 corresponding lines)
Examples/CaseStudies/Animations.swift7.4MixedCode Duplication: Members sharing a duplicated core (4 members, 50+ identical tokens)
Examples/Integration/Regression Coverage/ChildIdentityReset.swift7.4MixedCode Duplication: Edited copy of a member (25 corresponding lines)
Examples/CloudKitDemo/CloudKitDemoApp.swift7.4MixedCode Duplication: Duplicated block (12 lines × 2)
Tests/SQLiteDataTests/CloudKitTests/AccountLifecycleTests.swift7.4MixedTest Quality: No assertions: signInUploadsLocalRecordsToCloudKit_SkipExistingCloudKitRecords
Sources/SQLiteData/CloudKit/PrimaryKeyMigration.swift7.8MixedCyclomatic Complexity: Substring.rewriteSchema (cyclomatic 22)

How the grades work

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

Critical — 20

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

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

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

Could not be resolved — 36

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

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 39 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.

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

What we checked — 39 dimensions across the health lenses
D1D2D3D4D6D10D12D13D14D15D16D17D27D28D29D30D34D35D36D43AX10AX3AX4AX8AX9DM4DM5DM6M1M2M3P1P10P2P3P6PF3X28X3

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

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1dcd4-4971-7126-90d4-a96be4283d6f.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Swift half could not be measured — the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.swift) and this repository declares a SwiftPM test suite (sqlite-data), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (14529 LoC, 134 module-visible types across 7 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `Examples/CaseStudies/Animations.swift`, `Examples/CaseStudies/DynamicQuery.swift`, `Examples/CaseStudies/Internal/CaseStudy.swift`, `Examples/CaseStudies/ObservableModelDemo.swift`, `Examples/CaseStudies/SectionedQuery.swift`, … (+67 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is swift-dependencies, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'GRDB' is imported (Sources/SQLiteData/Fetch.swift:1), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'GRDB' is imported (Sources/SQLiteData/Fetch.swift:1), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Swift is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Swift 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.
  • P8 Schema migrations — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads EF Core usage in C# and the schema tooling its file scan recognises only, and no .NET project was loaded, and this repository's language is not one the scan models, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust and Dart source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust or Dart was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's Swift is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala, JavaScript/TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart and Ruby source only, and no C# was loaded and no Scala, JavaScript, TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Swift is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • 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.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • 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.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity8.1 / 10Strong✓ Tool-verified

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

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

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

7 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was MockCloudDatabase.modifyRecords at 56. A further 1 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 Code.loggingDescription at 37 — they are counted neither in the figure above nor in this dimension's score.

MockCloudDatabase.modifyRecords (cyclomatic 56)Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift:126
Logger.log (cyclomatic 46)Sources/SQLiteData/CloudKit/Internal/Logging.swift:8
SyncEngine.handleSentRecordZoneChanges (cyclomatic 36)Sources/SQLiteData/CloudKit/SyncEngine.swift:1744
Substring.rewriteSchema (cyclomatic 22)Sources/SQLiteData/CloudKit/PrimaryKeyMigration.swift:263
SyncEngine.handleFetchedRecordZoneChanges (cyclomatic 21)Sources/SQLiteData/CloudKit/SyncEngine.swift:1540

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

What to do

  1. Bring the 7 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with MockCloudDatabase.modifyRecords (cyclomatic 56), Logger.log (cyclomatic 46), SyncEngine.handleSentRecordZoneChanges (cyclomatic 36). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 7 together lifts Cyclomatic Complexity from 8.1 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

D2 · Cognitive Complexity7.1 / 10Strong✓ Tool-verified

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

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

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

11 method(s) exceeded the cognitive complexity threshold of 15; the worst was MockCloudDatabase.modifyRecords at 103.

MockCloudDatabase.modifyRecords (cognitive 103)Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift:126
Logger.log (cognitive 57)Sources/SQLiteData/CloudKit/Internal/Logging.swift:8
SyncEngine.handleSentRecordZoneChanges (cognitive 39)Sources/SQLiteData/CloudKit/SyncEngine.swift:1744
Substring.rewriteSchema (cognitive 32)Sources/SQLiteData/CloudKit/PrimaryKeyMigration.swift:263
SyncEngine.handleFetchedRecordZoneChanges (cognitive 31)Sources/SQLiteData/CloudKit/SyncEngine.swift:1540

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

What to do

  1. Bring the 1 body over 60 down to 60 or less in Cognitive Complexity — start with MockCloudDatabase.modifyRecords (cognitive 103). — Refactoring it lifts Cognitive Complexity from 7.1 to about 7.7/10.

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

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

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

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

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

13 god class(es) detected.

MethodTooLong: MockCloudDatabase.modifyRecords · ×6Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift:126
FileTooLong: CloudKit/SyncEngine.swift · ×3Sources/SQLiteData/CloudKit/SyncEngine.swift
TooManyMethods: FetchAll · ×2Sources/SQLiteData/FetchAll.swift:22
ClassTooLong: SyncEngineSources/SQLiteData/CloudKit/SyncEngine.swift:25
FunctionTooLong: Metadatabase.swift.migrateSources/SQLiteData/CloudKit/Internal/Metadatabase.swift:46

What to do

  1. Resolve the 6 MethodTooLong finding(s) in God Classes — start with SyncEngine.swift (3), MockCloudDatabase.swift, Logging.swift. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 3 FileTooLong finding(s) in God Classes — start with SyncEngine.swift, FetchAll+Sections.swift, FetchOne.swift. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 2 TooManyMethods finding(s) in God Classes — start with FetchAll.swift, SyncEngine.swift. — One of this dimension's main actionable groups (2 warning-level).

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

D4 · Code Duplication4.9 / 10Weak✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

41 duplicated block group(s) detected. 12.7 % of the production lines (2,605 of 20,507) are in a reported copy. A further 52 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 19 of the 93 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Edited copy of a member (9 corresponding lines) · ×4Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:58
Edited copy of a member (12 corresponding lines) · ×4Sources/SQLiteData/StructuredQueries+GRDB/Statement+Sections.swift:62
Edited copies of one member (3 members, 14+ corresponding lines) · ×3Sources/SQLiteData/FetchAll.swift:223
Edited copy of a member (7 corresponding lines) · ×3Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:51
Duplicated block (12 lines × 2) · ×3Sources/SQLiteData/CloudKit/Internal/Triggers.swift:48

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

What to do

  1. Resolve the 4 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with UnsyncedRecordID.swift, Statement+Sections.swift, FetchBox.swift. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 4 Edited copy of a member (12 corresponding lines) finding(s) in Code Duplication — start with Statement+Sections.swift, CloudKit+StructuredQueries.swift, Fetch.swift. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 Edited copies of one member (3 members, 14+ corresponding lines) finding(s) in Code Duplication — start with FetchAll.swift (2), FetchAll+Sections.swift. — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

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

0 of 29 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D10 · Test Quality7.0 / 10Strong✓ Tool-verified

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

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

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

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

No assertions: assertQueryBasic · ×26Tests/SQLiteDataTests/AssertQueryTests.swift:14
Skipped (documented): assertQueryFailsNoResultsNonEmptySnapshotTests/SQLiteDataTests/AssertQueryTests.swift:92

What to do

  1. Resolve the 26 No assertions finding(s) in Test Quality — start with PrimaryKeyMigrationTests.swift (10), AssertQueryTests.swift (7), AccountLifecycleTests.swift (3). — One of this dimension's main actionable groups (26 warning-level).

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

D12 · Dependency Hygiene9.4 8.7 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 8.7 / 10 · rule-coverage 92% · ceiling Verified

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

Dependency not covered by the committed resolution: swift-tagged
Outdated: grdb.swift · ×6

What to do

  1. Resolve the 1 Dependency not covered by the committed resolution finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 17 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 16 of them read from the licence file the repository carries at the revision Package.resolved pins, and 1 — unpinned, or whose licence file could not be read or named — from api.deps.dev, which reports the licence the repository declares today. Graded: every package a committed Package.resolved pins, direct and transitive, and every declared dependency none pins. 1 of them are declared by a manifest that commits no Package.resolved (a library, whose resolution is its consumer's), so their own dependencies are resolved by whoever builds it and are not in this verdict.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

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

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

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

Top hotspots: Sources/SQLiteData/CloudKit/SyncEngine.swift (7×36=252); Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift (4×56=224); Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift (3×18=54)

Hotspot: Sources/SQLiteData/CloudKit/SyncEngine.swift · ×3Sources/SQLiteData/CloudKit/SyncEngine.swift:1744

What to do

  1. Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with SyncEngine.swift, MockCloudDatabase.swift, MockSyncEngine.swift. — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

6 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is Sources/SQLiteData/FetchAll+Sections.swift. Counted over 39 of the 69 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

What to do

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

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

D17 · Explicit Debt10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

1 deducted task-comment markers across 20507 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoCommentSources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift:241

What to do

  1. Resolve the 1 TodoComment finding(s) in Explicit Debt — start with MockCloudDatabase.swift. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)7.1 / 10Adequategated by 6 critical findings✓ Tool-verified

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

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

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

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

6 finding(s): 0 critical, 6 high, 0 medium, 0 low. 4 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. No action in Static Analysis (SAST) — all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

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

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

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

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

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

Orphaned files with no living knowledge
Orphaned fileSources/SQLiteDataTestSupport/AssertQuery.swift:1

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.8 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

Strongest change-coupling: FetchAll.swift↔FetchOne.swift 64%

Change coupling: FetchAll.swift ↔ FetchOne.swiftSources/SQLiteData/FetchAll.swift:1

What to do

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

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

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

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

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

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

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

DM4 · Rich vs anemic domain model6.7 / 10Adequate✓ 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.

  • `TableColumns` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — Examples/Reminders/Schema.swift:87

What to do

  • Move delegated behaviour onto the domain entity (or make it a value object); keep invariants inside the type.
DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

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.

DM6 · Domain ↔ infrastructure boundary4.2 / 10Weak✓ Tool-verified

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.

  • `SyncMetadata` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/SyncMetadata.swift:14
  • `ForeignKey` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/ForeignKey.swift:8
  • `PendingRecordZoneChange` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/PendingRecordZoneChange.swift:8
  • `PragmaDatabaseList` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/Pragmas.swift:7
  • `PragmaForeignKeyCheck` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/Pragmas.swift:17
  • `PragmaForeignKeyList` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/Pragmas.swift:29
  • `PragmaIndexList` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/Pragmas.swift:54
  • `PragmaTableInfo` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/Pragmas.swift:68
  • `RecordType` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/RecordType.swift:7
  • `SQLiteSchema` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/SQLiteSchema.swift:7
  • `StateSerialization` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/StateSerialization.swift:7
  • `TableInfo` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/TableInfo.swift:7
  • `UnsyncedRecordID` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:7

What to do

  • Keep the ORM/table mapping and web-framework types on a boundary adapter; leave the domain entity framework-free (map row↔domain through a repository).
M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation3.0 / 10Weak✓ Tool-verified

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

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

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

What to do

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

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

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

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

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

P10 · Library API & versioning9.7 / 10Exemplary✓ Tool-verified

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

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

  • 1 public type in `SQLiteData` is marked as implementation by its own namespace, folder or name: `NotFound` (Sources/SQLiteData/Internal/FetchKey.swift:191, `Internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — Sources/SQLiteData/Internal/FetchKey.swift:191

What to do

  • Hide `SQLiteData` (`NotFound`) (Swift: leave it `internal` (the default) instead of `public`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:7

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

X3 · Exception handling6.3 / 10Adequate✓ Tool-verified

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

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

  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — Sources/SQLiteData/CloudKit/Internal/DataManager.swift:42

What to do

  • Swallowed exception (caught, then discarded)

Reference — by lens

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

LensScoreRatingImpact
Code Health74%StrongSolid.
Architecture100%ExemplarySolid.
Maturity64%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness52%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security57%Checked 3 of 10Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling64%AdequateAcceptable, with room to improve.
Performance100%ExemplaryStrongest area.
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 — 3 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: this repository stores data through 'GRDB' (Sources/SQLiteData/Fetch.swift:1) but declares no persisted model this check reads (SwiftData @Model, Core Data, Realm, GRDB and Fluent types, GRDB and SQLite.swift columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'GRDB' (Sources/SQLiteData/Fetch.swift:1) but declares no persisted model this check reads (SwiftData @Model, Core Data NSManagedObject, Realm Object, GRDB record and Fluent Model properties, GRDB and SQLite.swift columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL files). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
  • 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 — 77 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No 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
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • 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.
  • D11 Test Reliability — Test reliability not included — the .swift suite was found but not re-run
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D21 Naming Consistency — N/A — too few peers to establish a naming convention (2611 declarations, no unit with a dominant convention).
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Swift surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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) — 72 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D5 Coupling — Not applicable — this SwiftPM build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — Swift suite
  • DM1 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 — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • M4 Documentation accuracy — Not applicable: the 1 current-state document(s) make no claim of a kind M4 checks.
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X13 Undrained process stream — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X19 Unrestored process-global state — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X21 Side-effecting pattern guard — Not applicable: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. Swift has no `++` or `--`, and an assignment yields `()`, which cannot be an operand of `&&`, `||` or `?:` nor the Bool a `case … where` clause needs. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X23 Unguarded diagnostic materialisation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. Swift's `Array`, `Dictionary` and `Set` are values: `for x in items` walks the copy taken when the loop starts, so a body that adds to or removes from `items` changes a different value, nothing is invalidated, and every original element is still visited. This repository's Swift names no Foundation mutable collection (`NSMutableArray` and kin), the one kind a Swift loop can walk by reference. Not a gap in the analyzer and not a finding about your code.
  • X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 20 finding(s)
DM6 · Domain ↔ infrastructure boundary · Domain fused to persistence infrastructure · ×13
  • Domain fused to persistence infrastructure: SyncMetadata Sources/SQLiteData/CloudKit/SyncMetadata.swift:14 — `SyncMetadata` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: ForeignKey Sources/SQLiteData/CloudKit/Internal/ForeignKey.swift:8 — `ForeignKey` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: PendingRecordZoneChange Sources/SQLiteData/CloudKit/Internal/PendingRecordZoneChange.swift:8 — `PendingRecordZoneChange` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: PragmaDatabaseList Sources/SQLiteData/CloudKit/Internal/Pragmas.swift:7 — `PragmaDatabaseList` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: PragmaForeignKeyCheck Sources/SQLiteData/CloudKit/Internal/Pragmas.swift:17 — `PragmaForeignKeyCheck` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: PragmaForeignKeyList Sources/SQLiteData/CloudKit/Internal/Pragmas.swift:29 — `PragmaForeignKeyList` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: PragmaIndexList Sources/SQLiteData/CloudKit/Internal/Pragmas.swift:54 — `PragmaIndexList` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: PragmaTableInfo Sources/SQLiteData/CloudKit/Internal/Pragmas.swift:68 — `PragmaTableInfo` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: RecordType Sources/SQLiteData/CloudKit/Internal/RecordType.swift:7 — `RecordType` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: SQLiteSchema Sources/SQLiteData/CloudKit/Internal/SQLiteSchema.swift:7 — `SQLiteSchema` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: StateSerialization Sources/SQLiteData/CloudKit/Internal/StateSerialization.swift:7 — `StateSerialization` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: TableInfo Sources/SQLiteData/CloudKit/Internal/TableInfo.swift:7 — `TableInfo` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: UnsyncedRecordID Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:7 — `UnsyncedRecordID` is a domain concept fused to persistence ON ITS OWN DECLARATION (the StructuredQueries `@Table`/`@Column` macro markers), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
DM4 · Rich vs anemic domain model · Anemic domain model · ×1
  • Anemic domain model: TableColumns Examples/Reminders/Schema.swift:87 — `TableColumns` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
Serious — 157 finding(s)
D10 · Test Quality · No assertions · ×26
  • No assertions: assertQueryBasic Tests/SQLiteDataTests/AssertQueryTests.swift:14 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: assertQueryRecord Tests/SQLiteDataTests/AssertQueryTests.swift:29 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: assertQueryBasicUpdate Tests/SQLiteDataTests/AssertQueryTests.swift:45 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: assertQueryRecordUpdate Tests/SQLiteDataTests/AssertQueryTests.swift:62 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: assertQueryEmpty Tests/SQLiteDataTests/AssertQueryTests.swift:81 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: assertQueryBasicIncludeSQL Tests/SQLiteDataTests/AssertQueryTests.swift:107 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: assertQueryRecordIncludeSQL Tests/SQLiteDataTests/AssertQueryTests.swift:130 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: scalarFunction Tests/SQLiteDataTests/DatabaseFunctionTests.swift:12 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: aggregateFunction Tests/SQLiteDataTests/DatabaseFunctionTests.swift:27 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: basics Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift:52 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: rowid Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift:189 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: dropUniqueConstraints Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift:270 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: primaryKeyNamedUnique Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift:349 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: columnConstraints Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift:398 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: topLevelConstraints Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift:530 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: commentsAndNewlines Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift:670 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: addPrimaryKeyWithCustomName Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift:901 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: recreatesIndicesAndTriggers Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift:952 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: lowercaseNoQuotes Tests/SQLiteDataTests/PrimaryKeyMigrationTests.swift:1019 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: emptyInsert Tests/SQLiteDataTests/QueryCursorTests.swift:18 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: emptyUpdate Tests/SQLiteDataTests/QueryCursorTests.swift:24 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: signInUploadsLocalRecordsToCloudKit_SkipExistingCloudKitRecords Tests/SQLiteDataTests/CloudKitTests/AccountLifecycleTests.swift:131 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: createSharedRecordWhileSoftLoggedOut Tests/SQLiteDataTests/CloudKitTests/AccountLifecycleTests.swift:346 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: doNotUploadExistingDataToCloudKitWhenSignedOut Tests/SQLiteDataTests/CloudKitTests/AccountLifecycleTests.swift:613 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testSyncEngine Tests/SQLiteDataTests/CloudKitTests/SyncEngineTests.swift:146 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • + 1 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×6
  • MethodTooLong: MockCloudDatabase.modifyRecords Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift:126 — MethodTooLong — modifyRecords runs 192 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× 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: Logger.log Sources/SQLiteData/CloudKit/Internal/Logging.swift:8 — MethodTooLong — log runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× 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: SyncEngine.handleSentRecordZoneChanges Sources/SQLiteData/CloudKit/SyncEngine.swift:1744 — MethodTooLong — handleSentRecordZoneChanges runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× 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: SyncEngine.handleFetchedRecordZoneChanges Sources/SQLiteData/CloudKit/SyncEngine.swift:1540 — MethodTooLong — handleFetchedRecordZoneChanges runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SyncEngine.nextRecordZoneChangeBatch Sources/SQLiteData/CloudKit/SyncEngine.swift:1151 — MethodTooLong — nextRecordZoneChangeBatch runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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: SyncEngine.share Sources/SQLiteData/CloudKit/CloudKitSharing.swift:76 — MethodTooLong — share 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.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×4
  • Edited copy of a member (9 corresponding lines) Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:58 — Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:58-68 | Sources/SQLiteData/CloudKit/SyncMetadata.swift:207-215 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/Statement+Sections.swift:41 — Sources/SQLiteData/StructuredQueries+GRDB/Statement+Sections.swift:41-49 | Sources/SQLiteData/StructuredQueries+GRDB/Statement+Sections.swift:108-116 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/SQLiteData/Internal/FetchBox.swift:33 — Sources/SQLiteData/Internal/FetchBox.swift:33-41 | Sources/SQLiteData/Internal/FetchBox.swift:80-93 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/SQLiteData/CloudKit/SyncEngine.swift:2280 — Sources/SQLiteData/CloudKit/SyncEngine.swift:2280-2288 | Sources/SQLiteData/CloudKit/SyncEngine.swift:2290-2299 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×4
  • Edited copy of a member (12 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/Statement+Sections.swift:62 — Sources/SQLiteData/StructuredQueries+GRDB/Statement+Sections.swift:62-73 | Sources/SQLiteData/StructuredQueries+GRDB/Statement+Sections.swift:84-98 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:26 — Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:26-37 | Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:79-90 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Sources/SQLiteData/Fetch.swift:172 — Sources/SQLiteData/Fetch.swift:172-183 | Sources/SQLiteData/Fetch.swift:237-249 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/QueryCursor.swift:97 — Sources/SQLiteData/StructuredQueries+GRDB/QueryCursor.swift:97-108 | Sources/SQLiteData/StructuredQueries+GRDB/QueryCursor.swift:152-163 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D15 · Churn × Complexity Hotspots · Hotspot · ×3
  • Hotspot: Sources/SQLiteData/CloudKit/SyncEngine.swift Sources/SQLiteData/CloudKit/SyncEngine.swift:1744 — Sources/SQLiteData/CloudKit/SyncEngine.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in SyncEngine.handleSentRecordZoneChanges at line 1744. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-11..2026-11-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-11 12:25:39 -08:00' --until='2026-11-09 12:25:39 -08:00' --full-history --no-merges -- Sources/SQLiteData/CloudKit/SyncEngine.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift:126 — Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in MockCloudDatabase.modifyRecords at line 126. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-11..2026-11-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-11 12:25:39 -08:00' --until='2026-11-09 12:25:39 -08:00' --full-history --no-merges -- Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift:244 — Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in SyncEngine.sendPendingRecordZoneChanges at line 244. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-11..2026-11-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-11 12:25:39 -08:00' --until='2026-11-09 12:25:39 -08:00' --full-history --no-merges -- Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D3 · God Classes · FileTooLong · ×3
  • FileTooLong: CloudKit/SyncEngine.swift Sources/SQLiteData/CloudKit/SyncEngine.swift — FileTooLong — 1942 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1442 over it, 3.88× 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: SQLiteData/FetchAll+Sections.swift Sources/SQLiteData/FetchAll+Sections.swift — FileTooLong — 908 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 408 over it, 1.82× 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: SQLiteData/FetchOne.swift Sources/SQLiteData/FetchOne.swift — FileTooLong — 839 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 339 over it, 1.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 14+ corresponding lines) Sources/SQLiteData/FetchAll.swift:223 — Sources/SQLiteData/FetchAll.swift:223-236 | Sources/SQLiteData/FetchAll.swift:416-430 | Sources/SQLiteData/FetchAll.swift:615-630 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift:139 — Sources/SQLiteData/FetchAll+Sections.swift:139-152 | Sources/SQLiteData/FetchAll+Sections.swift:657-672 | Sources/SQLiteData/FetchAll+Sections.swift:1101-1117 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) Sources/SQLiteData/FetchAll.swift:153 — Sources/SQLiteData/FetchAll.swift:153-166 | Sources/SQLiteData/FetchAll.swift:337-351 | Sources/SQLiteData/FetchAll.swift:529-548 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×3
  • Edited copy of a member (7 corresponding lines) Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:51 — Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:51-57 | Sources/SQLiteData/CloudKit/SyncMetadata.swift:199-205 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift:1458 — Sources/SQLiteData/FetchAll+Sections.swift:1458-1465 | Sources/SQLiteData/FetchAll+Sections.swift:1467-1473 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/SQLiteData/Internal/FetchKey+SwiftUI.swift:8 — Sources/SQLiteData/Internal/FetchKey+SwiftUI.swift:8-15 | Sources/SQLiteData/Internal/FetchKey.swift:13-19 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×3
  • Duplicated block (12 lines × 2) Sources/SQLiteData/CloudKit/Internal/Triggers.swift:48 — Sources/SQLiteData/CloudKit/Internal/Triggers.swift:48-59 | Sources/SQLiteData/CloudKit/Internal/Triggers.swift:133-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/CloudKit/Internal/Triggers.swift:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) Sources/SQLiteData/FetchAll+Sections.swift:318 — Sources/SQLiteData/FetchAll+Sections.swift:318-329 | Sources/SQLiteData/FetchAll+Sections.swift:854-865 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:318` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) Examples/CloudKitDemo/CloudKitDemoApp.swift:30 — Examples/CloudKitDemo/CloudKitDemoApp.swift:30-41 | Examples/Reminders/RemindersApp.swift:83-94 — before extracting anything, compare `Examples/CloudKitDemo/CloudKitDemoApp.swift` and `Examples/Reminders/RemindersApp.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×3
  • Duplicated block (9 lines × 2) Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:29 — Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:29-37 | Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:82-90 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:29` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) Sources/SQLiteData/FetchAll+Sections.swift:110 — Sources/SQLiteData/FetchAll+Sections.swift:110-118 | Sources/SQLiteData/FetchAll+Sections.swift:626-634 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:110` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:73 — Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:73-81 | Sources/SQLiteData/StructuredQueries+GRDB/SQLiteQueryDecoder.swift:57-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:141 — Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:141-146 | Sources/SQLiteData/StructuredQueries+GRDB/SQLiteQueryDecoder.swift:119-124 — 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 (6 lines × 2) Sources/SQLiteData/Fetch.swift:30 — Sources/SQLiteData/Fetch.swift:30-35 | Sources/SQLiteData/FetchOne.swift:30-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 (6 lines × 2) Examples/Reminders/RemindersDetail.swift:58 — Examples/Reminders/RemindersDetail.swift:58-63 | Examples/Reminders/RemindersLists.swift:129-134 — 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 `Examples/Reminders/RemindersDetail.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.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: FetchAll Sources/SQLiteData/FetchAll.swift:22 — TooManyMethods — 62 methods, declared across 2 files: SQLiteData/FetchAll+Sections.swift (40), SQLiteData/FetchAll.swift (22). The bar is 30 methods; this is 32 over it, 2.07× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SyncEngine Sources/SQLiteData/CloudKit/SyncEngine.swift:25 — TooManyMethods — 55 methods, declared across 4 files: CloudKit/SyncEngine.swift (46), CloudKit/CloudKitSharing.swift (4), Internal/MockSyncEngine.swift (4), CloudKit/PrimaryKeyMigration.swift (1). The bar is 30 methods; this is 25 over it, 1.83× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift:198 — Sources/SQLiteData/FetchAll+Sections.swift:198-222 | Sources/SQLiteData/FetchAll+Sections.swift:375-397 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift:1066 — Sources/SQLiteData/FetchAll+Sections.swift:1066-1089 | Sources/SQLiteData/FetchAll+Sections.swift:1285-1307 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×2
  • Edited copy of a member (15 corresponding lines) Sources/SQLiteData/CloudKit/Internal/CloudDatabase.swift:37 — Sources/SQLiteData/CloudKit/Internal/CloudDatabase.swift:37-51 | Sources/SQLiteData/CloudKit/Internal/CloudDatabase.swift:97-113 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Sources/SQLiteData/FetchAll.swift:294 — Sources/SQLiteData/FetchAll.swift:294-308 | Sources/SQLiteData/FetchAll.swift:486-500 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) Sources/SQLiteData/FetchOne.swift:505 — Sources/SQLiteData/FetchOne.swift:505-520 | Sources/SQLiteData/FetchOne.swift:1053-1073 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:83 — Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:83-98 | Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:105-120 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 12+ corresponding lines) Sources/SQLiteData/FetchOne.swift:1444 — Sources/SQLiteData/FetchOne.swift:1444-1457 | Sources/SQLiteData/FetchOne.swift:1468-1479 | Sources/SQLiteData/FetchOne.swift:1562-1575 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) Sources/SQLiteData/Fetch.swift:148 — Sources/SQLiteData/Fetch.swift:148-159 | Sources/SQLiteData/FetchAll.swift:273-284 | Sources/SQLiteData/FetchOne.swift:528-539 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×2
  • Edited copy of a member (8 corresponding lines) Sources/SQLiteData/Internal/FetchKey+SwiftUI.swift:17 — Sources/SQLiteData/Internal/FetchKey+SwiftUI.swift:17-24 | Sources/SQLiteData/Internal/FetchKey.swift:40-47 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Examples/CaseStudies/ObservableModelDemo.swift:75 — Examples/CaseStudies/ObservableModelDemo.swift:75-85 | Examples/SyncUps/SyncUpDetail.swift:42-49 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×2
  • Edited copy of a member (4 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:68 — Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:68-71 | Sources/SQLiteData/StructuredQueries+GRDB/SQLiteQueryDecoder.swift:52-55 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:100 — Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:100-103 | Sources/SQLiteData/StructuredQueries+GRDB/SQLiteQueryDecoder.swift:82-85 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) Sources/SQLiteData/FetchAll+Sections.swift:445 — Sources/SQLiteData/FetchAll+Sections.swift:445-455 | Sources/SQLiteData/FetchAll+Sections.swift:993-1003 | Sources/SQLiteData/FetchAll+Sections.swift:1430-1440 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:445` 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 before the matched lines, `Sources/SQLiteData/FetchAll+Sections.swift:1429` calls `available` and `Sources/SQLiteData/FetchAll+Sections.swift:444` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 3) Sources/SQLiteData/FetchAll+Sections.swift:274 — Sources/SQLiteData/FetchAll+Sections.swift:274-284 | Sources/SQLiteData/FetchAll+Sections.swift:806-816 | Sources/SQLiteData/FetchAll+Sections.swift:1247-1257 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:274` 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 before the matched lines, `Sources/SQLiteData/FetchAll+Sections.swift:1246` calls `available` and `Sources/SQLiteData/FetchAll+Sections.swift:273` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) Sources/SQLiteData/CloudKit/Internal/Triggers.swift:172 — Sources/SQLiteData/CloudKit/Internal/Triggers.swift:172-182 | Sources/SQLiteData/CloudKit/Internal/Triggers.swift:222-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/CloudKit/Internal/Triggers.swift:172` 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, `Sources/SQLiteData/CloudKit/Internal/Triggers.swift:169` calls `available` and `Sources/SQLiteData/CloudKit/Internal/Triggers.swift:219` 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 (11 lines × 2) Examples/CloudKitDemo/CloudKitDemoApp.swift:57 — Examples/CloudKitDemo/CloudKitDemoApp.swift:57-67 | Examples/Reminders/RemindersApp.swift:110-122 — before extracting anything, compare `Examples/CloudKitDemo/CloudKitDemoApp.swift` and `Examples/Reminders/RemindersApp.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×2
  • Duplicated block (9–10 lines × 3) Sources/SQLiteData/FetchAll+Sections.swift:235 — Sources/SQLiteData/FetchAll+Sections.swift:235-244 | Sources/SQLiteData/FetchAll+Sections.swift:764-772 | Sources/SQLiteData/FetchAll+Sections.swift:1208-1216 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SQLiteData/FetchAll+Sections.swift:1207` calls `available` and `Sources/SQLiteData/FetchAll+Sections.swift:234` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9–10 lines × 3) Sources/SQLiteData/FetchAll+Sections.swift:409 — Sources/SQLiteData/FetchAll+Sections.swift:409-418 | Sources/SQLiteData/FetchAll+Sections.swift:954-962 | Sources/SQLiteData/FetchAll+Sections.swift:1393-1401 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:409` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SQLiteData/FetchAll+Sections.swift:1392` calls `available` and `Sources/SQLiteData/FetchAll+Sections.swift:408` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×2
  • Duplicated block (7–8 lines × 3) Sources/SQLiteData/FetchAll+Sections.swift:198 — Sources/SQLiteData/FetchAll+Sections.swift:198-205 | Sources/SQLiteData/FetchAll+Sections.swift:724-730 | Sources/SQLiteData/FetchAll+Sections.swift:1171-1177 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:198` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SQLiteData/FetchAll+Sections.swift:1170` calls `available` and `Sources/SQLiteData/FetchAll+Sections.swift:183` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7–8 lines × 3) Sources/SQLiteData/FetchAll+Sections.swift:375 — Sources/SQLiteData/FetchAll+Sections.swift:375-382 | Sources/SQLiteData/FetchAll+Sections.swift:917-923 | Sources/SQLiteData/FetchAll+Sections.swift:1358-1364 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:375` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SQLiteData/FetchAll+Sections.swift:1357` calls `available` and `Sources/SQLiteData/FetchAll+Sections.swift:361` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×2
  • Duplicated block (7 lines × 2) Sources/SQLiteData/CloudKit/SyncEngine.swift:2202 — Sources/SQLiteData/CloudKit/SyncEngine.swift:2202-2208 | Sources/SQLiteData/CloudKit/SyncEngine.swift:2659-2665 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/CloudKit/SyncEngine.swift:2202` 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 before the matched lines, `Sources/SQLiteData/CloudKit/SyncEngine.swift:2657` calls `contains` and `Sources/SQLiteData/CloudKit/SyncEngine.swift:2201` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) Examples/Reminders/RemindersLists.swift:277 — Examples/Reminders/RemindersLists.swift:277-283 | Examples/Reminders/RemindersLists.swift:299-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Reminders/RemindersLists.swift:277` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×2
  • Duplicated block (8 lines × 2) Examples/CloudKitDemo/CloudKitDemoApp.swift:48 — Examples/CloudKitDemo/CloudKitDemoApp.swift:48-55 | Examples/Reminders/RemindersApp.swift:101-108 — before extracting anything, compare `Examples/CloudKitDemo/CloudKitDemoApp.swift` and `Examples/Reminders/RemindersApp.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) Examples/Integration/Regression Coverage/ParentRerenderLoadError.swift:19 — Examples/Integration/Regression Coverage/ParentRerenderLoadError.swift:19-26 | Examples/Integration/Regression Coverage/ParentRerenderLoadedData.swift:19-26 — 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.
D1 · Cyclomatic Complexity · MockCloudDatabase.modifyRecords (cyclomatic 56) · ×1
  • MockCloudDatabase.modifyRecords (cyclomatic 56) Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift:126 — MockCloudDatabase.modifyRecords has cyclomatic complexity 56 (threshold 15). Of this number, 37 points are the body's own statements and 19 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Logger.log (cyclomatic 46) · ×1
  • Logger.log (cyclomatic 46) Sources/SQLiteData/CloudKit/Internal/Logging.swift:8 — Logger.log has cyclomatic complexity 46 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SyncEngine.handleSentRecordZoneChanges (cyclomatic 36) · ×1
  • SyncEngine.handleSentRecordZoneChanges (cyclomatic 36) Sources/SQLiteData/CloudKit/SyncEngine.swift:1744 — SyncEngine.handleSentRecordZoneChanges has cyclomatic complexity 36 (threshold 15). Of this number, 29 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Substring.rewriteSchema (cyclomatic 22) · ×1
  • Substring.rewriteSchema (cyclomatic 22) Sources/SQLiteData/CloudKit/PrimaryKeyMigration.swift:263 — Substring.rewriteSchema has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SyncEngine.handleFetchedRecordZoneChanges (cyclomatic 21) · ×1
  • SyncEngine.handleFetchedRecordZoneChanges (cyclomatic 21) Sources/SQLiteData/CloudKit/SyncEngine.swift:1540 — SyncEngine.handleFetchedRecordZoneChanges has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CKRecord.update · ×1
  • CKRecord.update::open (cyclomatic 19) Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:318 — CKRecord.update::open has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SyncEngine.sendPendingRecordZoneChanges (cyclomatic 18) · ×1
  • SyncEngine.sendPendingRecordZoneChanges (cyclomatic 18) Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift:244 — SyncEngine.sendPendingRecordZoneChanges has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D12 · Dependency Hygiene · Dependency not covered by the committed resolution · ×1
  • Dependency not covered by the committed resolution: swift-tagged — `swift-tagged` is declared in Package.swift but has no entry in the committed `Package.resolved` beside it, so its version is resolved rather than pinned. Resolve the package and commit the updated `Package.resolved`.
D17 · Explicit Debt · TodoComment · ×1
  • TodoComment Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift:241 — // TODO: This should merge copy's values to more accurately reflect reality — 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.
D2 · Cognitive Complexity · MockCloudDatabase.modifyRecords (cognitive 103) · ×1
  • MockCloudDatabase.modifyRecords (cognitive 103) Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift:126 — MockCloudDatabase.modifyRecords has cognitive complexity 103 (threshold 15). Drivers by points: if/else 24 (58 pts), loops 10 (21 pts), boolean chains 14, ternaries 3 (6 pts), match/switch 2 (4 pts) (nesting depth added 50). Of this number, 59 points are the body's own statements and 44 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Logger.log (cognitive 57) · ×1
  • Logger.log (cognitive 57) Sources/SQLiteData/CloudKit/Internal/Logging.swift:8 — Logger.log has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (26 pts), loops 12 (24 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncEngine.handleSentRecordZoneChanges (cognitive 39) · ×1
  • SyncEngine.handleSentRecordZoneChanges (cognitive 39) Sources/SQLiteData/CloudKit/SyncEngine.swift:1744 — SyncEngine.handleSentRecordZoneChanges has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 7, match/switch 3 (7 pts), loops 4, error handling 1 (2 pts) (nesting depth added 16). Of this number, 31 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Substring.rewriteSchema (cognitive 32) · ×1
  • Substring.rewriteSchema (cognitive 32) Sources/SQLiteData/CloudKit/PrimaryKeyMigration.swift:263 — Substring.rewriteSchema has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 5, loops 2 (nesting depth added 10). Of this number, 26 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncEngine.handleFetchedRecordZoneChanges (cognitive 31) · ×1
  • SyncEngine.handleFetchedRecordZoneChanges (cognitive 31) Sources/SQLiteData/CloudKit/SyncEngine.swift:1540 — SyncEngine.handleFetchedRecordZoneChanges has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 8 (10 pts), error handling 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncEngine.pendingRecordZoneChanges (cognitive 19) · ×1
  • SyncEngine.pendingRecordZoneChanges (cognitive 19) Sources/SQLiteData/CloudKit/SyncEngine.swift:1305 — SyncEngine.pendingRecordZoneChanges has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncEngine.updateLocalFromSchemaChange (cognitive 17) · ×1
  • SyncEngine.updateLocalFromSchemaChange (cognitive 17) Sources/SQLiteData/CloudKit/SyncEngine.swift:779 — SyncEngine.updateLocalFromSchemaChange has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 2 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (open). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SyncEngine.handleFetchedDatabaseChanges (cognitive 16) · ×1
  • SyncEngine.handleFetchedDatabaseChanges (cognitive 16) Sources/SQLiteData/CloudKit/SyncEngine.swift:1459 — SyncEngine.handleFetchedDatabaseChanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3, match/switch 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 5). Of this number, 8 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncEngine.upsertFromServerRecord (cognitive 16) · ×1
  • SyncEngine.upsertFromServerRecord (cognitive 16) Sources/SQLiteData/CloudKit/SyncEngine.swift:2069 — SyncEngine.upsertFromServerRecord has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (open). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SyncEngine.sendPendingRecordZoneChanges (cognitive 16) · ×1
  • SyncEngine.sendPendingRecordZoneChanges (cognitive 16) Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift:244 — SyncEngine.sendPendingRecordZoneChanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 3 (5 pts), loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CKRecord.update (cognitive 16) · ×1
  • CKRecord.update (cognitive 16) Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:308 — CKRecord.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function item inside it that branches (open). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: SyncEngine Sources/SQLiteData/CloudKit/SyncEngine.swift:25 — ClassTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 240 over it, 1.60× 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.
D3 · God Classes · FunctionTooLong · ×1
  • FunctionTooLong: Metadatabase.swift.migrate Sources/SQLiteData/CloudKit/Internal/Metadatabase.swift:46 — FunctionTooLong — migrate runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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.
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: FetchAll.swift ↔ FetchOne.swift Sources/SQLiteData/FetchAll.swift:1 — `Sources/SQLiteData/FetchAll.swift` and `Sources/SQLiteData/FetchOne.swift` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `d50816a8` Use cached statements (#527); `a4f88771` Make animation optional in load endpoints (#463); `df360b23` Don't execute `@Fetch{All,One}` queries for selections (#350) — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copies of one member (5 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 26+ corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift:234 — Sources/SQLiteData/FetchAll+Sections.swift:234-261 | Sources/SQLiteData/FetchAll+Sections.swift:273-302 | Sources/SQLiteData/FetchAll+Sections.swift:724-749 | Sources/SQLiteData/FetchAll+Sections.swift:763-791 | Sources/SQLiteData/FetchAll+Sections.swift:805-835 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift:313 — Sources/SQLiteData/FetchAll+Sections.swift:313-332 | Sources/SQLiteData/FetchAll+Sections.swift:848-868 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 24+ corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift:408 — Sources/SQLiteData/FetchAll+Sections.swift:408-433 | Sources/SQLiteData/FetchAll+Sections.swift:444-471 | Sources/SQLiteData/FetchAll+Sections.swift:917-940 | Sources/SQLiteData/FetchAll+Sections.swift:953-979 | Sources/SQLiteData/FetchAll+Sections.swift:992-1020 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) Sources/SQLiteData/CloudKit/Internal/Triggers.swift:39 — Sources/SQLiteData/CloudKit/Internal/Triggers.swift:39-64 | Sources/SQLiteData/CloudKit/Internal/Triggers.swift:122-149 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift:105 — Sources/SQLiteData/FetchAll+Sections.swift:105-129 | Sources/SQLiteData/FetchAll+Sections.swift:587-606 | Sources/SQLiteData/FetchAll+Sections.swift:620-645 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:122 — Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:122-139 | Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift:148-166 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) Sources/SQLiteData/CloudKit/Internal/Triggers.swift:66 — Sources/SQLiteData/CloudKit/Internal/Triggers.swift:66-89 | Sources/SQLiteData/CloudKit/Internal/Triggers.swift:91-120 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 20+ corresponding lines) Sources/SQLiteData/FetchAll+Sections.swift:163 — Sources/SQLiteData/FetchAll+Sections.swift:163-183 | Sources/SQLiteData/FetchAll+Sections.swift:342-361 | Sources/SQLiteData/FetchAll+Sections.swift:685-707 | Sources/SQLiteData/FetchAll+Sections.swift:880-901 | Sources/SQLiteData/FetchAll+Sections.swift:1130-1153 | Sources/SQLiteData/FetchAll+Sections.swift:1319-1341 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×1
  • Edited copy of a member (13 corresponding lines) Sources/SQLiteData/CloudKit/SyncEngine.swift:573 — Sources/SQLiteData/CloudKit/SyncEngine.swift:573-585 | Sources/SQLiteData/CloudKit/SyncEngine.swift:595-613 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) Sources/SQLiteData/FetchOne.swift:364 — Sources/SQLiteData/FetchOne.swift:364-380 | Sources/SQLiteData/FetchOne.swift:878-895 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 15+ corresponding lines) Sources/SQLiteData/FetchAll.swift:175 — Sources/SQLiteData/FetchAll.swift:175-190 | Sources/SQLiteData/FetchAll.swift:362-378 | Sources/SQLiteData/FetchOne.swift:241-255 | Sources/SQLiteData/FetchOne.swift:740-755 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 17+ corresponding lines) Sources/SQLiteData/FetchAll.swift:559 — Sources/SQLiteData/FetchAll.swift:559-576 | Sources/SQLiteData/FetchOne.swift:1273-1289 | Sources/SQLiteData/FetchOne.swift:1415-1433 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 13+ corresponding lines) Sources/SQLiteData/FetchOne.swift:220 — Sources/SQLiteData/FetchOne.swift:220-232 | Sources/SQLiteData/FetchOne.swift:389-401 | Sources/SQLiteData/FetchOne.swift:716-729 | Sources/SQLiteData/FetchOne.swift:906-919 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 19+ corresponding lines) Sources/SQLiteData/FetchAll.swift:245 — Sources/SQLiteData/FetchAll.swift:245-263 | Sources/SQLiteData/FetchAll.swift:441-461 | Sources/SQLiteData/FetchAll.swift:641-662 | Sources/SQLiteData/FetchOne.swift:930-948 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) Sources/SQLiteData/Internal/FetchBox.swift:21 — Sources/SQLiteData/Internal/FetchBox.swift:21-31 | Sources/SQLiteData/Internal/FetchBox.swift:66-78 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×1
  • Edited copy of a member (10 corresponding lines) Sources/SQLiteData/Fetch.swift:194 — Sources/SQLiteData/Fetch.swift:194-203 | Sources/SQLiteData/Fetch.swift:260-270 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×1
  • Edited copy of a member (6 corresponding lines) Sources/SQLiteData/CloudKit/Internal/CloudDatabase.swift:53 — Sources/SQLiteData/CloudKit/Internal/CloudDatabase.swift:53-58 | Sources/SQLiteData/CloudKit/Internal/CloudDatabase.swift:89-95 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) Sources/SQLiteData/FetchAll.swift:671 — Sources/SQLiteData/FetchAll.swift:671-676 | Sources/SQLiteData/StructuredQueries+GRDB/Statement+GRDB.swift:41-48 | Sources/SQLiteData/StructuredQueries+GRDB/Statement+GRDB.swift:160-167 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:52 — Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:52-71 | Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift:105-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.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×1
  • Duplicated block (15–16 lines × 3) Sources/SQLiteData/FetchAll+Sections.swift:1178 — Sources/SQLiteData/FetchAll+Sections.swift:1178-1192 | Sources/SQLiteData/FetchAll+Sections.swift:1216-1231 | Sources/SQLiteData/FetchAll+Sections.swift:1257-1272 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:1178` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) Sources/SQLiteData/CloudKit/CloudKitSharing.swift:275 — Sources/SQLiteData/CloudKit/CloudKitSharing.swift:275-290 | Sources/SQLiteData/CloudKit/CloudKitSharing.swift:392-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SQLiteData/CloudKit/CloudKitSharing.swift:273` calls `Dependency`, `Environment` and `Sources/SQLiteData/CloudKit/CloudKitSharing.swift:391` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×1
  • Duplicated block (14–15 lines × 3) Sources/SQLiteData/FetchAll+Sections.swift:1365 — Sources/SQLiteData/FetchAll+Sections.swift:1365-1378 | Sources/SQLiteData/FetchAll+Sections.swift:1401-1415 | Sources/SQLiteData/FetchAll+Sections.swift:1440-1454 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:1365` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) Sources/SQLiteData/FetchAll+Sections.swift:693 — Sources/SQLiteData/FetchAll+Sections.swift:693-707 | Sources/SQLiteData/FetchAll+Sections.swift:1139-1153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:693` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/SQLiteData/FetchAll+Sections.swift:1170` calls `available` and `Sources/SQLiteData/FetchAll+Sections.swift:724` 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) Sources/SQLiteData/FetchAll+Sections.swift:888 — Sources/SQLiteData/FetchAll+Sections.swift:888-901 | Sources/SQLiteData/FetchAll+Sections.swift:1328-1341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:888` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/SQLiteData/FetchAll+Sections.swift:1357` calls `available` and `Sources/SQLiteData/FetchAll+Sections.swift:917` 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) Sources/SQLiteData/CloudKit/SyncEngine.swift:2204 — Sources/SQLiteData/CloudKit/SyncEngine.swift:2204-2212 | Sources/SQLiteData/CloudKit/SyncEngine.swift:2221-2230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/CloudKit/SyncEngine.swift:2204` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×1
  • Duplicated block (8–9 lines × 3) Sources/SQLiteData/Fetch.swift:152 — Sources/SQLiteData/Fetch.swift:152-159 | Sources/SQLiteData/FetchAll.swift:276-284 | Sources/SQLiteData/FetchOne.swift:532-539 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/Fetch.swift:152` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:60 — Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:60-68 | Sources/SQLiteData/CloudKit/SyncMetadata.swift:208-215 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) Sources/SQLiteData/FetchAll.swift:227 — Sources/SQLiteData/FetchAll.swift:227-234 | Sources/SQLiteData/FetchAll.swift:421-428 | Sources/SQLiteData/FetchAll.swift:621-628 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll.swift:227` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/SQLiteData/FetchAll.swift:641` calls `available` and `Sources/SQLiteData/FetchAll.swift:441` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×1
  • Duplicated block (5–6 lines × 2) Sources/SQLiteData/FetchAll+Sections.swift:814 — Sources/SQLiteData/FetchAll+Sections.swift:814-819 | Sources/SQLiteData/FetchAll+Sections.swift:1001-1005 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteData/FetchAll+Sections.swift:814` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×1
  • Duplicated block (5 lines × 2) Sources/SQLiteData/Fetch.swift:142 — Sources/SQLiteData/Fetch.swift:142-146 | Sources/SQLiteData/FetchOne.swift:522-526 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) Sources/SQLiteData/Fetch.swift:220 — Sources/SQLiteData/Fetch.swift:220-226 | Sources/SQLiteData/FetchAll.swift:478-484 | Sources/SQLiteData/FetchOne.swift:1090-1096 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Examples/CaseStudies/Animations.swift:20 — Examples/CaseStudies/Animations.swift:20-46 | Examples/CaseStudies/DynamicQuery.swift:22-80 | Examples/CaseStudies/SwiftUIDemo.swift:21-55 | Examples/CaseStudies/TransactionDemo.swift:24-58 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) Examples/Reminders/RemindersDetail.swift:52 — Examples/Reminders/RemindersDetail.swift:52-74 | Examples/Reminders/RemindersLists.swift:123-143 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) Examples/Integration/Regression Coverage/ChildIdentityReset.swift:69 — Examples/Integration/Regression Coverage/ChildIdentityReset.swift:69-93 | Examples/Integration/Regression Coverage/ParentDrivenQuery.swift:68-98 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×1
  • Edited copy of a member (3 corresponding lines) Examples/CaseStudies/TransactionDemo.swift:65 — Examples/CaseStudies/TransactionDemo.swift:65-70 | Examples/Integration/Regression Coverage/ParentRerenderLoadedData.swift:53-55 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 10+ corresponding lines) Examples/CloudKitDemo/CountersListFeature.swift:141 — Examples/CloudKitDemo/CountersListFeature.swift:141-150 | Examples/Reminders/RemindersLists.swift:439-448 | Examples/SyncUps/SyncUpsList.swift:153-162 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) Examples/Integration/Regression Coverage/ChildIdentityReset.swift:35 — Examples/Integration/Regression Coverage/ChildIdentityReset.swift:35-58 | Examples/Integration/Regression Coverage/ParentRerenderDynamicQuery.swift:34-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) Examples/Integration/Regression Coverage/ChildIdentityReset.swift:71 — Examples/Integration/Regression Coverage/ChildIdentityReset.swift:71-93 | Examples/Integration/Regression Coverage/ParentDrivenQuery.swift:76-98 | Examples/Integration/Regression Coverage/ParentRerenderDynamicQuery.swift:70-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Integration/Regression Coverage/ChildIdentityReset.swift:71` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (21 lines × 4) · ×1
  • Duplicated block (21 lines × 4) Examples/CaseStudies/Animations.swift:26 — Examples/CaseStudies/Animations.swift:26-46 | Examples/CaseStudies/DynamicQuery.swift:60-80 | Examples/CaseStudies/SwiftUIDemo.swift:35-55 | Examples/CaseStudies/TransactionDemo.swift:38-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/CaseStudies/Animations.swift:26` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) Sources/SQLiteDataTestSupport/AssertQuery.swift:92 — Sources/SQLiteDataTestSupport/AssertQuery.swift:92-106 | Sources/SQLiteDataTestSupport/AssertQuery.swift:108-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SQLiteDataTestSupport/AssertQuery.swift:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) Examples/Reminders/TagsForm.swift:26 — Examples/Reminders/TagsForm.swift:26-39 | Examples/Reminders/TagsForm.swift:47-61 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Reminders/TagsForm.swift:26` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Examples/Reminders/TagsForm.swift:41` calls `Text` and `Examples/Reminders/TagsForm.swift:62` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (17 lines × 9) · ×1
  • Duplicated block (17 lines × 9) Examples/CaseStudies/Animations.swift:56 — Examples/CaseStudies/Animations.swift:56-72 | Examples/CaseStudies/DynamicQuery.swift:110-126 | Examples/CaseStudies/ObservableModelDemo.swift:95-111 | Examples/CaseStudies/SwiftDataTemplateDemo.swift:65-81 | Examples/CaseStudies/SwiftUIDemo.swift:65-81 | Examples/CaseStudies/TransactionDemo.swift:82-98 | Examples/CaseStudies/UIKitDemo.swift:122-138 | Examples/Integration/Regression Coverage/ParentRerenderAnimations.swift:66-82 | Examples/Integration/Regression Coverage/ParentRerenderCancellation.swift:72-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 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 9 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×1
  • Duplicated block (10 lines × 2) Examples/Integration/Regression Coverage/ParentRerenderCancellation.swift:18 — Examples/Integration/Regression Coverage/ParentRerenderCancellation.swift:18-27 | Examples/Integration/Regression Coverage/ParentRerenderDynamicQuery.swift:18-27 — 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×1
  • Swallowed exception (caught, then discarded) Sources/SQLiteData/CloudKit/Internal/DataManager.swift:42 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Minor — 15 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×3
  • Duplicated predicate Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift:53 — `$0.recordName.eq(recordID.recordName) && $0.zoneName.eq(recordID.zoneID.zoneName) && $0.ownerName.eq(recordID.zoneID.ownerName)` appears character-identically in 2 files — Sources/SQLiteData/CloudKit/Internal/UnsyncedRecordID.swift, Sources/SQLiteData/CloudKit/SyncMetadata.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Sources/SQLiteData/CloudKit/Internal/DataManager.swift:1 — `canImport(CloudKit) && canImport(CryptoKit)` appears character-identically in 2 files — Sources/SQLiteData/CloudKit/Internal/DataManager.swift, Sources/SQLiteData/CloudKit/PrimaryKeyMigration.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Sources/SQLiteData/CloudKit/Internal/CloudKitFunctions.swift:20 — `share.publicPermission == .readWrite || share.currentUserParticipant?.permission == .readWrite` appears character-identically in 2 files — Sources/SQLiteData/CloudKit/Internal/CloudKitFunctions.swift, Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.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.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 5 significant file(s) lose their only recent owner: Sources/SQLiteData/FetchAll+Sections.swift, Sources/SQLiteData/StructuredQueries+GRDB/Statement+Sections.swift, Sources/SQLiteData/ResultsSectionCollection.swift, Sources/SQLiteData/StructuredQueries+GRDB/SQLiteFunctionDecoder.swift, Sources/SQLiteData/Internal/FetchBox.swift. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (6 single-owned of 39 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 39 of the 69 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: Sources/SQLiteData/CloudKit/SyncEngineDelegate.swift.
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 1 of 39 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 39 of the 69 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: Sources/SQLiteDataTestSupport/AssertQuery.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D34 · Knowledge Freshness · Orphaned file · ×1
  • Orphaned file Sources/SQLiteDataTestSupport/AssertQuery.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P10 · Library API & versioning · Implementation type on the public API · ×1
  • Implementation type on the public API Sources/SQLiteData/Internal/FetchKey.swift:191 — 1 public type in `SQLiteData` is marked as implementation by its own namespace, folder or name: `NotFound` (Sources/SQLiteData/Internal/FetchKey.swift:191, `Internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:7 — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Minor — 7 finding(s)
D12 · Dependency Hygiene · Outdated · ×6
  • Outdated: grdb.swift — `grdb.swift` is resolved at 7.11.1, but 7.12.0 is the newest release tagged on https://github.com/groue/GRDB.swift within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update grdb.swift` reaches this one with no change to Package.swift.
  • Outdated: swift-collections — `swift-collections` is resolved at 1.6.0, but 1.7.6 is the newest release tagged on https://github.com/apple/swift-collections within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-collections` reaches this one with no change to Package.swift.
  • Outdated: swift-concurrency-extras — `swift-concurrency-extras` is resolved at 1.4.1, but 1.4.3 is the newest release tagged on https://github.com/pointfreeco/swift-concurrency-extras within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-concurrency-extras` reaches this one with no change to Package.swift.
  • Outdated: swift-dependencies — `swift-dependencies` is resolved at 1.17.1, but 1.17.2 is the newest release tagged on https://github.com/pointfreeco/swift-dependencies within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-dependencies` reaches this one with no change to Package.swift.
  • Outdated: swift-snapshot-testing — `swift-snapshot-testing` is resolved at 1.19.4, but 1.19.7 is the newest release tagged on https://github.com/pointfreeco/swift-snapshot-testing within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-snapshot-testing` reaches this one with no change to Package.swift.
  • Outdated: swift-structured-queries — `swift-structured-queries` is resolved at 0.39.1, but 0.39.2 is the newest release tagged on https://github.com/pointfreeco/swift-structured-queries within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-structured-queries` reaches this one with no change to Package.swift.
D10 · Test Quality · Skipped (documented) · ×1
  • Skipped (documented): assertQueryFailsNoResultsNonEmptySnapshot Tests/SQLiteDataTests/AssertQueryTests.swift:92 — Skipped with a documented reason — a deferral, not lazy debt: wrapped in withKnownIssue — the body is expected to fail, so its failure is not reported

Appendix B — Reproduction & audit trail

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

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

Run 01a1dcd4-4971-7126-90d4-a96be4283d6f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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