Public report of farzaa/clicky, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey β
Signed and filed in the standard's public register, 14 November 2026, 08:48 UTC Β· Survey ID cd_7a27ec409e384be6b76f624495aa94da
farzaa/clicky
Measured 14 November 2026, 08:48 UTC, at code version e71105c
Code coverage is not measured: Xcode and a simulator are needed to run it.
Test reliability is not measured: The suite is built by Xcode and needs an Apple platform to run.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A small codebase: 6,628 lines of product code in 2 projects, tests not counted Β· Estimated rebuild effort: under 0.1 person-years Β· Weakest lens: Production Readiness, 22
Findings by how serious they are
7 critical59 serious8 minor
17 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 08:48 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 βΈ
37of 37 dimensions measured by tools.
67of 74 findings point to an exact file and line, so you can open each one in the code. The other 7 concern the repository as a whole, such as missing documentation.
37dimensions across 6 lenses, read from 6,628 lines of product code in 2 projects.
farzaa/clicky falls short of our standard for production because we found no working pipeline that builds or tests changes to the code and no logging, tracing or health checks in the code. It scores 50 out of 100 and is rated Adequate, and five of its seven critical findings are security problems in the packages it uses.
Production Readiness, at 22, is the weakest lens and counts most in the score. The best first step is making the two tests that check nothing check their results, worth about 17 points. Making the tests check their results comes next, worth about 9 points. Raising Production Readiness to 70 would lift the score to about 71.
Five known security holes in the packages the code depends on can be used by attackers. Updating the vulnerable packages would close this risk. The two tests that check nothing need to check the result they produce.
The product code is 6,628 lines, about β¬6,300 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
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: 7 findings
These 7 critical or serious findings were in the previous survey, on 26 October 2026, and are gone from this one.
Code Duplication Β· Near-duplicate member pair (60 shared lines) leanring-buddy/ClaudeAPI.swift
Dependency Vulnerabilities Β· High CVE: [GHSA redacted] REDACTED
Rebuild cost: about β¬6,300 Β· Estimate
Cost to rebuild
β¬2,100 to β¬11,000, for 35 to 111 hours of work, under 0.1 person-years for one engineer
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 50. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Small: 6,628 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at β¬60 to β¬95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 2 No assertions finding(s) in Test Quality β start with leanring_buddyUITests.swift, leanring_buddyUITestsLaunchTests.swift.
Raises the score by about 17 points Β· Low effort Β· Test Quality
2
Resolve the 1 Assertions commented out finding(s) in Test Quality β start with leanring_buddyUITests.swift.
Raises the score by about 9 points Β· Low effort Β· Test Quality
3
Resolve the 1 Test project verifies nothing finding(s) in Test Quality β start with leanring_buddyUITests.swift.
Raises the score by about 9 points Β· Low effort Β· Test Quality
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed Β· Value at risk
This code would cost about β¬6,300 to build again, under 0.1 person-years of work. Its weakest lens is Production Readiness, at 22 (Critical). 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 2 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 17 points for low effort, because it clears the 2 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
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
3 modules, with 1 dependency between them. Every module uses only modules listed above it, so there are no loops.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2025 β Software Supply Chain Failures
7
High / Critical
A05:2025 β Injection
1
Medium
Roadmap
Top priorities: Resolve the 2 No assertions finding(s) in Test Quality β start with leanring_buddyUITests.swift, leanring_buddyUITestsLaunchTests.swift; Resolve the 1 Assertions commented out finding(s) in Test Quality β start with leanring_buddyUITests.swift; Resolve the 1 Test project verifies nothing finding(s) in Test Quality β start with leanring_buddyUITests.swift.
Ranked by impact Γ· effort. "Helps" is the estimated gain on the 0β100 health score.
Do this
Helps
Effort
Dimension
Resolve the 2 No assertions finding(s) in Test Quality β start with leanring_buddyUITests.swift, leanring_buddyUITestsLaunchTests.swift.
Run what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) β or `semgrep --config=auto`, which runs on any language β locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off β `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family β and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Per-file score 0β10 β a quality signature. Of 16 files carrying findings, judged against the Production bar: 6% slop Β· 69% mixed Β· 25% near-clean.
File
Score
Band
Worst signal
REDACTED
2.5
Slop
Dependency Vulnerabilities: High CVE: REDACTED
leanring-buddyUITests/leanring_buddyUITests.swift
5.5
Mixed
Test Quality: Assertions commented out: testExample
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 β 7
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 β 59
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 β 8
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved β 17
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 37 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 β 37 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality β in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report β three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line β never an absolute scratch path. Here, 67 of 74 do; the remainder are repo-wide signals β a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score β and this report, byte for byte β is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) β re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time β a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D14 License Compliance β measured, with a gap in what it reached β We measured this, but not all of it. What we did not reach is a gap on our side β a collector, parser or image we have not built yet β so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its SwiftPM package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D15 Churn × Complexity Hotspots β measured, with a gap in what it reached β This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Git history depth insufficient β this repository has 21 commit(s), too few for a reliable trend signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
D16 Bus Factor β not measured this run β This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Too few commits for a meaningful bus factor (21 commit(s) sampled, fewer than the 50 this dimension needs before a bus factor means anything).
D21 Naming Consistency β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises β so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker β not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
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. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
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. `leanring-buddy/CompanionManager.swift` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D34 Knowledge Freshness β not measured this run β This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Too few commits to judge knowledge freshness (21 commit(s) sampled).
D35 Change Coupling β measured, with a gap in what it reached β This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Git history depth insufficient β this repository has 21 commit(s), too few for a reliable change-coupling signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
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.
AXB2 Runtime readiness β 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. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
AXR1 Runtime accessibility β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
C1 Data Protection β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β not a finding that the repository lacks personal data controls.
C2 Access Controls β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β not a finding that the repository lacks authorization controls.
C3 Audit Trail β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β not a finding that the repository lacks audit controls.
GD1 Unfinished & placeholder code β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Swift is most of its product and 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 this repository's Swift is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach β not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy β measured, with a gap in what it reached β We measured this, but not all of it. What we did not reach is a gap on our side β a collector, parser or image we have not built yet β so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup β not measured this run β This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found β and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β not a finding about this repository.
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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β not a finding about this repository.
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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β not a finding about this repository.
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 this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, 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.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual β undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded β it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D26 Project Cohesion: Project focus is sized from members/namespaces per project β a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural β it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns β a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) β it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases β a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules β it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D35 Change Coupling: Change coupling is co-change in COMMITS β files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen β a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics β a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention β a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see β only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
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.
Bring the 3 bodies over 15 down to 15 or less in Cyclomatic Complexity β start with BlueCursorView.body (cyclomatic 25), WindowPositionManager.shrinkOverlappingFocusedWindow (cyclomatic 18), ClaudeAPI.analyzeImageStreaming (cyclomatic 17). β This score is capped by its worst body, so a finding fixed alone moves it by almost nothing β the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 9.2 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.
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.
+ 1 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
Bring the 6 bodies over 15 down to 15 or less in Cognitive Complexity β start with BlueCursorView.body (cognitive 25), CompanionManager.sendTranscriptToClaudeWithScreenshot (cognitive 24), ClaudeAPI.analyzeImageStreaming (cognitive 21). β 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 6 together lifts Cognitive Complexity from 9.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d2_recommendation.md Β· top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 Β· God Classes7.7 / 10Strongβ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 3 ClassTooLong finding(s) in God Classes β start with CompanionManager.swift, CompanionPanelView.swift, BuddyDictationManager.swift. β One of this dimension's main actionable groups (3 warning-level).
Resolve the 3 FileTooLong finding(s) in God Classes β start with BuddyDictationManager.swift, CompanionManager.swift, CompanionPanelView.swift. β One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 MethodTooLong finding(s) in God Classes β start with OverlayWindow.swift. β One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d3_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
25 duplicated block group(s) detected. 12.2 % of the production lines (808 of 6,628) are in a reported copy. A further 11 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (21 corresponding lines) Β· Γ2leanring-buddy/CompanionPanelView.swift:550
Edited copy of a member (17 corresponding lines) Β· Γ2leanring-buddy/AppleSpeechTranscriptionProvider.swift:26
+ 26 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 Edited copy of a member (21 corresponding lines) finding(s) in Code Duplication β start with CompanionPanelView.swift, BuddyDictationManager.swift. β One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 Edited copy of a member (17 corresponding lines) finding(s) in Code Duplication β start with AppleSpeechTranscriptionProvider.swift, AssemblyAIStreamingTranscriptionProvider.swift. β One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 Duplicated block (15 lines × 2) finding(s) in Code Duplication β start with DesignSystem.swift, OverlayWindow.swift. β One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d4_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class β the population is all types, not a name convention.
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.
Test project verifies nothing: leanring-buddyUITestsleanring-buddyUITests/leanring_buddyUITests.swift:25
No assertions: testLaunchPerformance Β· Γ2leanring-buddyUITests/leanring_buddyUITests.swift:34
What to do
Resolve the 2 No assertions finding(s) in Test Quality β start with leanring_buddyUITests.swift, leanring_buddyUITestsLaunchTests.swift. β One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Assertions commented out finding(s) in Test Quality β start with leanring_buddyUITests.swift. β One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Test project verifies nothing finding(s) in Test Quality β start with leanring_buddyUITests.swift. β One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d10_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
2 outdated direct SwiftPM dependencies, 0 pinning defect(s). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported β a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.
Outdated: posthog-ios Β· Γ2
β On the Gold path β maintain.
Detailed fixes: d12_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 3 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 1 of them read from the licence file the repository carries at the revision REDACTED pins, and 2 β 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 REDACTED pins, direct and transitive, and every declared dependency none pins. 2 of them declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged. β COVERAGE OF THIS VERDICT: it grades this repository's SwiftPM package dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass β a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex β the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
What it measures: Acknowledged debt left in the code β TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
0 deducted task-comment markers across 6628 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.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
No ADRs foundleanring-buddy.xcodeproj/project.pbxproj:1
What to do
Resolve the 1 No ADRs found finding(s) in ADR Quality β start with project.pbxproj. β One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md Β· top locations in Appendix A, every location in findings.md.
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.
0 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located β so a call's collaborators sit together and tracing stays easy. Baseline: small β navigation cost is tolerated.
What it measures: Whether any secrets were ever committed β scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout β the full git history, then a second --no-git pass over the working tree as it stands β merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side β unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings β likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files β exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
1 finding(s): 0 critical, 0 high, 1 medium, 0 low. semgrep hit a parse error in 1 file(s) β `leanring-buddy/CompanionManager.swift` β so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) β start with REDACTED. β One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d29_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares β Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities β start with REDACTED (5). β One of this dimension's main actionable groups (5 issue-level).
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities β start with REDACTED. β One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities β start with REDACTED. β One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together β pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only β tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file β₯10 revisions, β₯5 shared commits, β₯50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only β test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real productionβproduction coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a codeβdocs pair β a command and the reference page that restates it β is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable β a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it β a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Other Β· Architecture β How the codebase splits by code ROLE β domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER β domain, then infrastructure, then application β so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone β no declared namespace was available to add to the evidence β and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention β a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other Β· Architecture β Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other Β· Architecture β Whether dependencies point inward (Domain β Application β Infrastructure/Web) β the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 Β· Test isolation10.0 / 10Exemplaryβ Tool-verified
Other Β· Architecture β Whether production projects stay free of references to test projects β tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other Β· Architecture β Whether read (query) handlers stay side-effect-free β a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set β a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Maturity Β· Maturity β Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity Β· Maturity β Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found β no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity Β· Maturity β Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity Β· Maturity β Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
No logging call was found in the 23 Swift, JavaScript/TypeScript production file(s) this check read across 2 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; Swift: os.Logger/os_log/NSLog, swift-log, CocoaLumberjack, SwiftyBeaver, XCGLogger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read β this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
What to do
Log through `os.Logger` in apps (swift-log in server code) at meaningful points in what you ship.
Add a health-check endpoint (a /health route on your Vapor/Hummingbird router) so orchestrators and load balancers can probe liveness/readiness.
Readiness Β· Readiness β Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step β in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) β this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen β if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
`worker/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices β including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. β worker/package.json:8
What to do
Run what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) β or `semgrep --config=auto`, which runs on any language β locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness Β· Readiness β Whether releases are automated and safely reversible (probes, rolling updates, approval gates) β from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Readiness Β· Performance β Whether asynchronous code stays responsive β it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere β .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect β and, for a .NET library with β₯5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other Β· 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.
Other Β· Code Health β Whether strict null checking is enabled and not undermined by heavy `!` assertion β TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig β this check reads configuration, and configuration is all it can read.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off β `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family β and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
Reference β by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by β¦") and is never the strongest area however high its average.
Unscored β 1 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score β either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate β 1 observation(s) recorded Β· Advisory β this card reports evidence and never carries a score.
Not evidenced β 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase β the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail β Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup β not evidenced β repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
P6 Release Hygiene β not evidenced β no changelog, version stamp or semver release tag in the repo
Not included β 76 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 applicable: this repository's Swift imports no dependency-injection container and defines no container of its own β nothing that both registers and resolves bindings, and nothing that names two lifetimes β so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own β nothing that both registers and resolves bindings, and nothing that names two lifetimes β so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons β No container singleton was found, so there is no shared instance for concurrent requests to race on. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
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 β no exported interface declares behaviour
AX7 Slice cohesion β not applicable β not a vertical-slice architecture
AXB2 Runtime readiness β Advisory β this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility β the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection β Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls β Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention β No personal data detected in a persisted data model β no PII-named property (email, firstName, dateOfBirth, phoneNumber, β¦) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE β and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, β¦) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights β No personal data detected in a persisted data model β no PII-named property (email, firstName, dateOfBirth, phoneNumber, β¦) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE β and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, β¦) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability β Test source is present (.swift) and this repository's suite is reachable only from an Apple platform: it ships leanring-buddy.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not re-run. Not scored: nothing was exercised.
D16 Bus Factor β too few commits for a meaningful bus factor
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.
D21 Naming Consistency β D21 withholds its case and prefix conventions rows: 1 candidate(s) found and not reported.
D22 Internal API Consistency β The exposed public-API surface could not be collected β no C#/VB projects loaded.
D23 Boundary Type-Coupling β No bounded-context organisation was detected either β neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, 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; comments in this repository's .swift source were not judged.
D25 ADR Conformance β no ADRs to check
D32 Data Compliance (PII/GDPR) β 1 file(s) were not parsed by semgrep β the PII/GDPR ruleset never ran over them
D34 Knowledge Freshness β too few commits to judge knowledge freshness
D36 Supply-chain Provenance & Signing β No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
D37 Vulnerability-disclosure Policy β No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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 Xcode 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: this repository's test suite is reachable only from an Apple platform β it ships leanring-buddy.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not run and no coverage was instrumented. Not scored.
DM1 Domain Modelling β not scored β this repository shows none of the 3 signals this lens looks for
ED2 Event/command shape β not scored β deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED5 Idempotency β no mutating command handlers or message consumers detected β idempotency check not applicable
ES1 Event Sourcing β not scored β this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code β no source files were read β this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs β not analysed β these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty β no CI workflow found
P7 Outbound HTTP resilience β not applicable β no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Swift source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations β no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
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.
SC1 Supply-chain hygiene β Advisory β this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness β X1 reached only 2% of this repository's production lines β swift (6,505 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X12 Unreachable branch β X12 reached only 2% of this repository's production lines β swift (6,505 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
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 applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation β X2 reached only 2% of this repository's production lines β swift (6,505 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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 β the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
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. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing β every loop form (`forβ¦of`, `forβ¦in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
X28 Index access outside its own emptiness guard β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
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
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 β 7 finding(s)
D30 Β· Dependency VulnerabilitiesΒ· High CVE Β· Γ5
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
D10 Β· Test QualityΒ· Assertions commented out Β· Γ1
Assertions commented out: testExample leanring-buddyUITests/leanring_buddyUITests.swift:25β The test body contains commented-out assertion calls and no live one β it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
D10 Β· Test QualityΒ· Test project verifies nothing Β· Γ1
Test project verifies nothing: leanring-buddyUITests leanring-buddyUITests/leanring_buddyUITests.swift:25β No conventional assertion call was detected in 3 of 3 tests in `leanring-buddyUITests` β the project as a whole, not one method. 1 of them has its assertions commented out, so this suite did verify conventionally and was switched off β it is not an approval/verifier harness.
ClassTooLong: CompanionManager leanring-buddy/CompanionManager.swift:24β ClassTooLong β 558 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 158 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CompanionPanelView leanring-buddy/CompanionPanelView.swift:13β ClassTooLong β 513 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 113 over it, 1.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: BuddyDictationManager leanring-buddy/BuddyDictationManager.swift:217β ClassTooLong β 433 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 33 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
FileTooLong: leanring-buddy/BuddyDictationManager.swift leanring-buddy/BuddyDictationManager.swiftβ FileTooLong β 583 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: BuddyDictationManager (218-866). The bar is 500 significant lines; this is 83 over it, 1.17× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body β the parts that share the same inputs and are named together β into its own unit in a sibling file, and have the original call them.
FileTooLong: leanring-buddy/CompanionManager.swift leanring-buddy/CompanionManager.swiftβ FileTooLong β 570 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: CompanionManager (25-1026). The bar is 500 significant lines; this is 70 over it, 1.14× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body β the parts that share the same inputs and are named together β into its own unit in a sibling file, and have the original call them.
FileTooLong: leanring-buddy/CompanionPanelView.swift leanring-buddy/CompanionPanelView.swiftβ FileTooLong β 515 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: CompanionPanelView (13-761). The bar is 500 significant lines; this is 15 over it, 1.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body β the parts that share the same inputs and are named together β into its own unit in a sibling file, and have the original call them.
No assertions: testLaunchPerformance leanring-buddyUITests/leanring_buddyUITests.swift:34β 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: testLaunch leanring-buddyUITests/leanring_buddyUITestsLaunchTests.swift:20β 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.
D4 Β· Code DuplicationΒ· Edited copy of a member (21 corresponding lines) Β· Γ2
Edited copy of a member (21 corresponding lines) leanring-buddy/CompanionPanelView.swift:550β leanring-buddy/CompanionPanelView.swift:550-575 | leanring-buddy/CompanionPanelView.swift:577-597 β 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.
Edited copy of a member (21 corresponding lines) leanring-buddy/BuddyDictationManager.swift:790β leanring-buddy/BuddyDictationManager.swift:790-810 | leanring-buddy/BuddyDictationManager.swift:812-832 β 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 (17 corresponding lines) Β· Γ2
Edited copy of a member (17 corresponding lines) leanring-buddy/AppleSpeechTranscriptionProvider.swift:26β leanring-buddy/AppleSpeechTranscriptionProvider.swift:26-42 | leanring-buddy/OpenAIAudioTranscriptionProvider.swift:36-56 β 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.
Edited copy of a member (17 corresponding lines) leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift:140β leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift:140-156 | leanring-buddy/OpenAIAudioTranscriptionProvider.swift:88-108 β 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.
Duplicated block (15 lines × 2) leanring-buddy/DesignSystem.swift:457β leanring-buddy/DesignSystem.swift:457-471 | leanring-buddy/DesignSystem.swift:511-525 β 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 `leanring-buddy/DesignSystem.swift:457` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) leanring-buddy/OverlayWindow.swift:193β leanring-buddy/OverlayWindow.swift:193-207 | leanring-buddy/OverlayWindow.swift:237-251 β 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 `leanring-buddy/OverlayWindow.swift:193` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) leanring-buddy/CompanionPanelView.swift:687β leanring-buddy/CompanionPanelView.swift:687-697 | leanring-buddy/CompanionPanelView.swift:704-714 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/CompanionPanelView.swift:687` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `2` in one and `6` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β their common supertype where they have one, or a new abstraction over them where they do not β and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) leanring-buddy/DesignSystem.swift:342β leanring-buddy/DesignSystem.swift:342-352 | leanring-buddy/DesignSystem.swift:450-460 β 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 `leanring-buddy/DesignSystem.swift:342` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) leanring-buddy/CompanionPanelView.swift:206β leanring-buddy/CompanionPanelView.swift:206-213 | leanring-buddy/CompanionPanelView.swift:226-233 β 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 `leanring-buddy/CompanionPanelView.swift:206` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) leanring-buddy/DesignSystem.swift:349β leanring-buddy/DesignSystem.swift:349-356 | leanring-buddy/DesignSystem.swift:391-398 β 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 `leanring-buddy/DesignSystem.swift:349` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
BlueCursorView.body (cyclomatic 25) leanring-buddy/OverlayWindow.swift:184β BlueCursorView.body has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WindowPositionManager.shrinkOverlappingFocusedWindow (cyclomatic 18) leanring-buddy/WindowPositionManager.swift:188β WindowPositionManager.shrinkOverlappingFocusedWindow has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClaudeAPI.analyzeImageStreaming (cyclomatic 17) leanring-buddy/ClaudeAPI.swift:101β ClaudeAPI.analyzeImageStreaming has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BlueCursorView.body (cognitive 25) leanring-buddy/OverlayWindow.swift:184β BlueCursorView.body has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 12, if/else 7, ternaries 6. To reduce it, split the body: this score is breadth rather than depth β many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CompanionManager.sendTranscriptToClaudeWithScreenshot (cognitive 24) leanring-buddy/CompanionManager.swift:586β CompanionManager.sendTranscriptToClaudeWithScreenshot has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeAPI.analyzeImageStreaming (cognitive 21) leanring-buddy/ClaudeAPI.swift:101β ClaudeAPI.analyzeImageStreaming has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 4 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowPositionManager.shrinkOverlappingFocusedWindow (cognitive 19) leanring-buddy/WindowPositionManager.swift:188β WindowPositionManager.shrinkOverlappingFocusedWindow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth β checks laid out side by side rather than stacked β so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
BuddyPushToTalkShortcut.shortcutTransition (cognitive 17) leanring-buddy/BuddyDictationManager.swift:157β BuddyPushToTalkShortcut.shortcutTransition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompanionScreenCaptureUtility.captureAllScreensAsJPEG (cognitive 16) leanring-buddy/CompanionScreenCaptureUtility.swift:30β CompanionScreenCaptureUtility.captureAllScreensAsJPEG has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (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.
MethodTooLong: BlueCursorView.body leanring-buddy/OverlayWindow.swift:184β MethodTooLong β body runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× 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.
D30 Β· Dependency VulnerabilitiesΒ· Medium CVE Β· Γ1
REDACTED
D30 Β· Dependency VulnerabilitiesΒ· Medium vulnerability Β· Γ1
REDACTED
D4 Β· Code DuplicationΒ· Near-duplicate member family (5 members, 25 shared lines) Β· Γ1
Near-duplicate member family (5 members, 25 shared lines) leanring-buddy/CompanionPanelView.swift:266β leanring-buddy/CompanionPanelView.swift:266-334 | leanring-buddy/CompanionPanelView.swift:336-391 | leanring-buddy/CompanionPanelView.swift:393-437 | leanring-buddy/CompanionPanelView.swift:439-492 | leanring-buddy/CompanionPanelView.swift:494-544 β These 5 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain β factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Near-duplicate member pair (49 shared lines) leanring-buddy/ClaudeAPI.swift:215β leanring-buddy/ClaudeAPI.swift:215-290 | leanring-buddy/OpenAIAPI.swift:50-141 β These two members are variants of one another: 49 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain β factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 Β· Code DuplicationΒ· Members sharing a duplicated core (5 members, 50+ identical tokens) Β· Γ1
Members sharing a duplicated core (5 members, 50+ identical tokens) leanring-buddy/DesignSystem.swift:342β leanring-buddy/DesignSystem.swift:342-360 | leanring-buddy/DesignSystem.swift:379-402 | leanring-buddy/DesignSystem.swift:424-440 | leanring-buddy/DesignSystem.swift:450-475 | leanring-buddy/DesignSystem.swift:501-529 β These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below β it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain β factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 Β· Code DuplicationΒ· Edited copy of a member (26 corresponding lines) Β· Γ1
Edited copy of a member (26 corresponding lines) leanring-buddy/CompanionManager.swift:896β leanring-buddy/CompanionManager.swift:896-927 | leanring-buddy/OverlayWindow.swift:677-702 β 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 copy of a member (15 corresponding lines) Β· Γ1
Edited copy of a member (15 corresponding lines) leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift:182β leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift:182-196 | leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift:376-390 β 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 copies of one member (3 members, 13+ corresponding lines) Β· Γ1
Edited copies of one member (3 members, 13+ corresponding lines) leanring-buddy/ClaudeAPI.swift:17β leanring-buddy/ClaudeAPI.swift:17-37 | leanring-buddy/ElementLocationDetector.swift:38-50 | leanring-buddy/OpenAIAPI.swift:15-36 β These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 Β· Code DuplicationΒ· Edited copy of a member (7 corresponding lines) Β· Γ1
Edited copy of a member (7 corresponding lines) leanring-buddy/CompanionManager.swift:414β leanring-buddy/CompanionManager.swift:414-420 | leanring-buddy/CompanionResponseOverlay.swift:106-113 β 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.
Duplicated block (27 lines × 2) leanring-buddy/ClaudeAPI.swift:117β leanring-buddy/ClaudeAPI.swift:117-143 | leanring-buddy/ClaudeAPI.swift:228-254 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/ClaudeAPI.swift:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15β22 lines × 2) leanring-buddy/CompanionManager.swift:653β leanring-buddy/CompanionManager.swift:653-674 | leanring-buddy/CompanionManager.swift:999-1013 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited.
Duplicated block (18β20 lines × 2) leanring-buddy/ClaudeAPI.swift:261β leanring-buddy/ClaudeAPI.swift:261-278 | leanring-buddy/OpenAIAPI.swift:109-128 β before extracting anything, compare `leanring-buddy/ClaudeAPI.swift` and `leanring-buddy/OpenAIAPI.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 3) leanring-buddy/CompanionPanelView.swift:268β leanring-buddy/CompanionPanelView.swift:268-285 | leanring-buddy/CompanionPanelView.swift:395-412 | leanring-buddy/CompanionPanelView.swift:441-458 β 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 `leanring-buddy/CompanionPanelView.swift:268` 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 first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `2` in one and `4` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β their common supertype where they have one, or a new abstraction over them where they do not β and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 4) leanring-buddy/CompanionPanelView.swift:378β leanring-buddy/CompanionPanelView.swift:378-391 | leanring-buddy/CompanionPanelView.swift:424-437 | leanring-buddy/CompanionPanelView.swift:479-492 | leanring-buddy/CompanionPanelView.swift:531-544 β all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/CompanionPanelView.swift:378` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) leanring-buddy/CompanionPanelView.swift:550β leanring-buddy/CompanionPanelView.swift:550-563 | leanring-buddy/CompanionPanelView.swift:577-590 β 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 `leanring-buddy/CompanionPanelView.swift:550` 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 first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `4` in one and `8` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β their common supertype where they have one, or a new abstraction over them where they do not β and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 5) leanring-buddy/CompanionPanelView.swift:297β leanring-buddy/CompanionPanelView.swift:297-309 | leanring-buddy/CompanionPanelView.swift:375-387 | leanring-buddy/CompanionPanelView.swift:421-433 | leanring-buddy/CompanionPanelView.swift:476-488 | leanring-buddy/CompanionPanelView.swift:528-540 β all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/CompanionPanelView.swift:297` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 4) leanring-buddy/CompanionPanelView.swift:276β leanring-buddy/CompanionPanelView.swift:276-288 | leanring-buddy/CompanionPanelView.swift:403-415 | leanring-buddy/CompanionPanelView.swift:449-461 | leanring-buddy/CompanionPanelView.swift:508-520 β all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/CompanionPanelView.swift:276` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11β13 lines × 3) leanring-buddy/ClaudeAPI.swift:134β leanring-buddy/ClaudeAPI.swift:134-144 | leanring-buddy/ClaudeAPI.swift:245-255 | leanring-buddy/OpenAIAPI.swift:92-104 β before extracting anything, compare `leanring-buddy/ClaudeAPI.swift` and `leanring-buddy/OpenAIAPI.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/ClaudeAPI.swift:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 5) leanring-buddy/CompanionPanelView.swift:280β leanring-buddy/CompanionPanelView.swift:280-291 | leanring-buddy/CompanionPanelView.swift:358-369 | leanring-buddy/CompanionPanelView.swift:407-418 | leanring-buddy/CompanionPanelView.swift:453-464 | leanring-buddy/CompanionPanelView.swift:512-523 β all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/CompanionPanelView.swift:280` 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 first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `8` in one and `1` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β their common supertype where they have one, or a new abstraction over them where they do not β and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10β12 lines × 2) leanring-buddy/ClaudeAPI.swift:51β leanring-buddy/ClaudeAPI.swift:51-62 | leanring-buddy/ElementLocationDetector.swift:325-334 β 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 (10 lines × 2) leanring-buddy/CompanionPanelView.swift:193β leanring-buddy/CompanionPanelView.swift:193-202 | leanring-buddy/CompanionPanelView.swift:666-675 β 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 `leanring-buddy/CompanionPanelView.swift:193` 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 × 3) leanring-buddy/ClaudeAPI.swift:116β leanring-buddy/ClaudeAPI.swift:116-124 | leanring-buddy/ClaudeAPI.swift:227-235 | leanring-buddy/OpenAIAPI.swift:76-84 β before extracting anything, compare `leanring-buddy/ClaudeAPI.swift` and `leanring-buddy/OpenAIAPI.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/ClaudeAPI.swift:116` 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) leanring-buddy/CompanionPanelView.swift:151β leanring-buddy/CompanionPanelView.swift:151-159 | leanring-buddy/CompanionPanelView.swift:163-171 β 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 `leanring-buddy/CompanionPanelView.swift:151` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7β8 lines × 3) leanring-buddy/OverlayWindow.swift:192β leanring-buddy/OverlayWindow.swift:192-198 | leanring-buddy/OverlayWindow.swift:236-242 | leanring-buddy/OverlayWindow.swift:266-273 β 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 `leanring-buddy/OverlayWindow.swift:192` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6β7 lines × 4) leanring-buddy/DesignSystem.swift:352β leanring-buddy/DesignSystem.swift:352-357 | leanring-buddy/DesignSystem.swift:394-399 | leanring-buddy/DesignSystem.swift:466-472 | leanring-buddy/DesignSystem.swift:520-526 β all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/DesignSystem.swift:352` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) leanring-buddy/ClaudeAPI.swift:147β leanring-buddy/ClaudeAPI.swift:147-153 | leanring-buddy/ClaudeAPI.swift:257-263 | leanring-buddy/OpenAIAPI.swift:105-111 β before extracting anything, compare `leanring-buddy/ClaudeAPI.swift` and `leanring-buddy/OpenAIAPI.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/ClaudeAPI.swift:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) leanring-buddy/ClaudeAPI.swift:215β leanring-buddy/ClaudeAPI.swift:215-221 | leanring-buddy/OpenAIAPI.swift:50-56 β before extracting anything, compare `leanring-buddy/ClaudeAPI.swift` and `leanring-buddy/OpenAIAPI.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/ClaudeAPI.swift:215` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 5) leanring-buddy/DesignSystem.swift:354β leanring-buddy/DesignSystem.swift:354-360 | leanring-buddy/DesignSystem.swift:396-402 | leanring-buddy/DesignSystem.swift:434-440 | leanring-buddy/DesignSystem.swift:469-475 | leanring-buddy/DesignSystem.swift:523-529 β all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `leanring-buddy/DesignSystem.swift:354` 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.
No CI pipeline β No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, β¦) β changes aren't gated by an automated build/test.
P2 Β· ObservabilityΒ· No structured logging Β· Γ1
No structured logging β No logging call was found in the 23 Swift, JavaScript/TypeScript production file(s) this check read across 2 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; Swift: os.Logger/os_log/NSLog, swift-log, CocoaLumberjack, SwiftyBeaver, XCGLogger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read β this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
No ADRs found leanring-buddy.xcodeproj/project.pbxproj:1β No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these β unnumbered files outside any recognised directory, without those headings β is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `leanring-buddy.xcodeproj/project.pbxproj` makes this repository a deployable product (line 1).
No ADRs β No Architecture Decision Records found β no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 Β· Security & performance toolingΒ· No SAST Β· Γ1
No SAST β No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) β this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen β if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation worker/package.json:8β `worker/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices β including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Duplicated predicate leanring-buddy/CompanionPanelView.swift:743β `!companionManager.hasCompletedOnboarding || !companionManager.allPermissionsGranted` appears character-identically in 2 files β leanring-buddy/CompanionPanelView.swift, leanring-buddy/leanring_buddyApp.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.
X5 Β· Nullable reference typesΒ· Strict null checking is not enabled everywhere the repository type-checks Β· Γ1
Strict null checking is not enabled everywhere the repository type-checks β This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig β this check reads configuration, and configuration is all it can read.
Outdated: posthog-ios β `posthog-ios` is resolved at 3.47.0, but 3.97.1 is the newest release tagged on https://github.com/PostHog/posthog-ios.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major β so `swift package update posthog-ios` reaches this one with no change to Package.swift.
Outdated: sparkle β `sparkle` is resolved at 2.9.0, but 2.10.1 is the newest release tagged on https://github.com/sparkle-project/Sparkle within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major β so `swift package update sparkle` reaches this one with no change to Package.swift.
Appendix B β Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension β the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative β never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json β kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable β No personal data was found crossing a boundary the PII/GDPR ruleset checks β nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 1 file(s) β `leanring-buddy/CompanionManager.swift` β so the PII/GDPR sweep did not cover them at all.
provenance: not applicable β No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
disclosure: not applicable β No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable β No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable β No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable β No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1d93e-5d4e-72bb-b9c2-4f4c1d2532c1 Β· every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 7 Β· Warnings: 59 Β· Recommendations: 6 Β· Info: 2 β Appendix A Β· all findings Β· full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 08:48 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric β drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.