Public report of Layen-lang/PTCGP-Private-Server, published 17 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, 17 November 2026, 03:57 UTC · Survey ID cd_973ac34dda3e4895a5e0d9a1d86a74f9
Layen-lang/PTCGP-Private-Server
Measured 17 November 2026, 03:56 UTC, at code version 455cdc0
First survey, so nothing to compare with yet
CAI scoreAt risk
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 34,663 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Production Readiness, 47.9
Findings by how serious they are
11 critical446 serious44 minor
20 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
17 November 2026, 03:56 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.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
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 ▸
50of 50 dimensions measured by tools.
484of 501 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
50dimensions across 5 lenses, read from 34,663 lines of product code in 4 projects.
Layen-lang/PTCGP-Private-Server is rated At risk because critical security findings are open. Its score is held back in part because we found no automated security scanning of the code, its secrets or its dependencies. It scores 59.3 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 47.9, is the weakest lens and counts most in the score. The best first step is adding automated security scanning, worth about 8.4 points. Recording design decisions comes next, worth about 3.3 points. Raising Production Readiness to 70 would lift the score to about 68.5.
Four known security holes in the packages the code depends on can be used by attackers. Four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and three weaknesses in the code could be used by an attacker. Updating the vulnerable packages, pinning each tool to an exact version and fixing the weaknesses the scanner points to would close these risks.
The product code is 34,663 lines, about €45,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts 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.
If Production Readiness rose from 47.9 to 70, the lowest score rated Strong, the score would rise from 59.3 to about 68.5.
Code composition: what the lines of code are
Product code 82%Tests 18%
Rebuild cost: about €45,000 · Estimate
Cost to rebuild
€15,000 to €75,000, for 248 to 786 hours of work, about 0.3 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.8 at a score of 59. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 34,663 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
Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.rs.
Raises the score by about 3.3 points · Low effort · ADR Quality
3
Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €45,000 to build again, about 0.3 person-years of work. Its weakest lens is Production Readiness, at 47.9 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing. Of all the actions in this report, it raises the score most for the work it takes: about 8.4 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 13% on every change. The history of the code shows how much it changes: about 71,303 lines over the last 90 days, which is about 289,173 lines a year. At that pace, the extra work comes to an estimated 42.1 to 252.5 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
56 modules, with 60 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 16 more are left out to keep it readable.
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.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/configuration uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/binarypatch.
github.com/Layen-lang/PTCGP-Private-Server/internal/configuration uses github.com/Layen-lang/PTCGP-Private-Server/internal/binarypatch, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/binarypatch can break github.com/Layen-lang/PTCGP-Private-Server/internal/configuration, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/configuration can't break github.com/Layen-lang/PTCGP-Private-Server/internal/binarypatch.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/configuration uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/configuration uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/contracts.
github.com/Layen-lang/PTCGP-Private-Server/internal/configuration uses github.com/Layen-lang/PTCGP-Private-Server/internal/contracts, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/contracts can break github.com/Layen-lang/PTCGP-Private-Server/internal/configuration, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/configuration can't break github.com/Layen-lang/PTCGP-Private-Server/internal/contracts.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/configuration uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/configuration uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/protocol.
github.com/Layen-lang/PTCGP-Private-Server/internal/configuration uses github.com/Layen-lang/PTCGP-Private-Server/internal/protocol, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/protocol can break github.com/Layen-lang/PTCGP-Private-Server/internal/configuration, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/configuration can't break github.com/Layen-lang/PTCGP-Private-Server/internal/protocol.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/configuration uses a module listed above it, which is the healthy direction.
9 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/packlab uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/catalog.
github.com/Layen-lang/PTCGP-Private-Server/internal/packlab uses github.com/Layen-lang/PTCGP-Private-Server/internal/catalog, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/catalog can break github.com/Layen-lang/PTCGP-Private-Server/internal/packlab, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/packlab can't break github.com/Layen-lang/PTCGP-Private-Server/internal/catalog.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/packlab uses a module listed above it, which is the healthy direction.
10 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/packlab uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/store.
github.com/Layen-lang/PTCGP-Private-Server/internal/packlab uses github.com/Layen-lang/PTCGP-Private-Server/internal/store, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/store can break github.com/Layen-lang/PTCGP-Private-Server/internal/packlab, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/packlab can't break github.com/Layen-lang/PTCGP-Private-Server/internal/store.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/packlab uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/player uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/catalog. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
github.com/Layen-lang/PTCGP-Private-Server/internal/player uses github.com/Layen-lang/PTCGP-Private-Server/internal/catalog, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/catalog can break github.com/Layen-lang/PTCGP-Private-Server/internal/player, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/player can't break github.com/Layen-lang/PTCGP-Private-Server/internal/catalog.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/player uses a module listed above it, which is the healthy direction.
50 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/player uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/store. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
github.com/Layen-lang/PTCGP-Private-Server/internal/player uses github.com/Layen-lang/PTCGP-Private-Server/internal/store, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/store can break github.com/Layen-lang/PTCGP-Private-Server/internal/player, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/player can't break github.com/Layen-lang/PTCGP-Private-Server/internal/store.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/player uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/restapi uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/protocol.
github.com/Layen-lang/PTCGP-Private-Server/internal/restapi uses github.com/Layen-lang/PTCGP-Private-Server/internal/protocol, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/protocol can break github.com/Layen-lang/PTCGP-Private-Server/internal/restapi, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/restapi can't break github.com/Layen-lang/PTCGP-Private-Server/internal/protocol.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/restapi uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/restapi uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/store.
github.com/Layen-lang/PTCGP-Private-Server/internal/restapi uses github.com/Layen-lang/PTCGP-Private-Server/internal/store, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/store can break github.com/Layen-lang/PTCGP-Private-Server/internal/restapi, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/restapi can't break github.com/Layen-lang/PTCGP-Private-Server/internal/store.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/restapi uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/server uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/contracts.
github.com/Layen-lang/PTCGP-Private-Server/internal/server uses github.com/Layen-lang/PTCGP-Private-Server/internal/contracts, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/contracts can break github.com/Layen-lang/PTCGP-Private-Server/internal/server, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/server can't break github.com/Layen-lang/PTCGP-Private-Server/internal/contracts.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/server uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/server uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/protocol.
github.com/Layen-lang/PTCGP-Private-Server/internal/server uses github.com/Layen-lang/PTCGP-Private-Server/internal/protocol, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/protocol can break github.com/Layen-lang/PTCGP-Private-Server/internal/server, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/server can't break github.com/Layen-lang/PTCGP-Private-Server/internal/protocol.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/server uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/testprofile uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/protocol.
github.com/Layen-lang/PTCGP-Private-Server/internal/testprofile uses github.com/Layen-lang/PTCGP-Private-Server/internal/protocol, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/protocol can break github.com/Layen-lang/PTCGP-Private-Server/internal/testprofile, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/testprofile can't break github.com/Layen-lang/PTCGP-Private-Server/internal/protocol.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/testprofile uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/transport uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/packer.
github.com/Layen-lang/PTCGP-Private-Server/internal/transport uses github.com/Layen-lang/PTCGP-Private-Server/internal/packer, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/packer can break github.com/Layen-lang/PTCGP-Private-Server/internal/transport, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/transport can't break github.com/Layen-lang/PTCGP-Private-Server/internal/packer.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/transport uses a module listed above it, which is the healthy direction.
ptcgp_importer.live_source uses ptcgp_importer.fast_pipeline, so a change to ptcgp_importer.fast_pipeline can break ptcgp_importer.live_source, while a change to ptcgp_importer.live_source can't break ptcgp_importer.fast_pipeline.
Position
Below the diagonal: ptcgp_importer.live_source uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.device uses ptcgp_private_server.api, so a change to ptcgp_private_server.api can break ptcgp_private_server.ui.device, while a change to ptcgp_private_server.ui.device can't break ptcgp_private_server.api.
Position
Below the diagonal: ptcgp_private_server.ui.device uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.forms uses ptcgp_private_server.theme, so a change to ptcgp_private_server.theme can break ptcgp_private_server.ui.forms, while a change to ptcgp_private_server.ui.forms can't break ptcgp_private_server.theme.
Position
Below the diagonal: ptcgp_private_server.ui.forms uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.kit uses ptcgp_private_server.theme, so a change to ptcgp_private_server.theme can break ptcgp_private_server.ui.kit, while a change to ptcgp_private_server.ui.kit can't break ptcgp_private_server.theme.
Position
Below the diagonal: ptcgp_private_server.ui.kit uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.pages.logs uses ptcgp_private_server.api, so a change to ptcgp_private_server.api can break ptcgp_private_server.ui.pages.logs, while a change to ptcgp_private_server.ui.pages.logs can't break ptcgp_private_server.api.
Position
Below the diagonal: ptcgp_private_server.ui.pages.logs uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.pages.packs uses ptcgp_private_server.api, so a change to ptcgp_private_server.api can break ptcgp_private_server.ui.pages.packs, while a change to ptcgp_private_server.ui.pages.packs can't break ptcgp_private_server.api.
Position
Below the diagonal: ptcgp_private_server.ui.pages.packs uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.pages.packs uses ptcgp_private_server.theme, so a change to ptcgp_private_server.theme can break ptcgp_private_server.ui.pages.packs, while a change to ptcgp_private_server.ui.pages.packs can't break ptcgp_private_server.theme.
Position
Below the diagonal: ptcgp_private_server.ui.pages.packs uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.pages.settings uses ptcgp_private_server.api, so a change to ptcgp_private_server.api can break ptcgp_private_server.ui.pages.settings, while a change to ptcgp_private_server.ui.pages.settings can't break ptcgp_private_server.api.
Position
Below the diagonal: ptcgp_private_server.ui.pages.settings uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.pages.settings uses ptcgp_private_server.theme, so a change to ptcgp_private_server.theme can break ptcgp_private_server.ui.pages.settings, while a change to ptcgp_private_server.ui.pages.settings can't break ptcgp_private_server.theme.
Position
Below the diagonal: ptcgp_private_server.ui.pages.settings uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.pages.traffic uses ptcgp_private_server.api, so a change to ptcgp_private_server.api can break ptcgp_private_server.ui.pages.traffic, while a change to ptcgp_private_server.ui.pages.traffic can't break ptcgp_private_server.api.
Position
Below the diagonal: ptcgp_private_server.ui.pages.traffic uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.pages.traffic uses ptcgp_private_server.theme, so a change to ptcgp_private_server.theme can break ptcgp_private_server.ui.pages.traffic, while a change to ptcgp_private_server.ui.pages.traffic can't break ptcgp_private_server.theme.
Position
Below the diagonal: ptcgp_private_server.ui.pages.traffic uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.tasks uses ptcgp_private_server.api, so a change to ptcgp_private_server.api can break ptcgp_private_server.ui.tasks, while a change to ptcgp_private_server.ui.tasks can't break ptcgp_private_server.api.
Position
Below the diagonal: ptcgp_private_server.ui.tasks uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/assets.
github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses github.com/Layen-lang/PTCGP-Private-Server/internal/assets, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/assets can break github.com/Layen-lang/PTCGP-Private-Server/internal/admin, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/admin can't break github.com/Layen-lang/PTCGP-Private-Server/internal/assets.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/catalog.
github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses github.com/Layen-lang/PTCGP-Private-Server/internal/catalog, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/catalog can break github.com/Layen-lang/PTCGP-Private-Server/internal/admin, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/admin can't break github.com/Layen-lang/PTCGP-Private-Server/internal/catalog.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/store.
github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses github.com/Layen-lang/PTCGP-Private-Server/internal/store, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/store can break github.com/Layen-lang/PTCGP-Private-Server/internal/admin, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/admin can't break github.com/Layen-lang/PTCGP-Private-Server/internal/store.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/traffic.
github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses github.com/Layen-lang/PTCGP-Private-Server/internal/traffic, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/traffic can break github.com/Layen-lang/PTCGP-Private-Server/internal/admin, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/admin can't break github.com/Layen-lang/PTCGP-Private-Server/internal/traffic.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/packlab.
github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses github.com/Layen-lang/PTCGP-Private-Server/internal/packlab, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/packlab can break github.com/Layen-lang/PTCGP-Private-Server/internal/admin, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/admin can't break github.com/Layen-lang/PTCGP-Private-Server/internal/packlab.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a module listed above it, which is the healthy direction.
6 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/player.
github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses github.com/Layen-lang/PTCGP-Private-Server/internal/player, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/player can break github.com/Layen-lang/PTCGP-Private-Server/internal/admin, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/admin can't break github.com/Layen-lang/PTCGP-Private-Server/internal/player.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/admin uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/android uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/configuration.
github.com/Layen-lang/PTCGP-Private-Server/internal/android uses github.com/Layen-lang/PTCGP-Private-Server/internal/configuration, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/configuration can break github.com/Layen-lang/PTCGP-Private-Server/internal/android, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/android can't break github.com/Layen-lang/PTCGP-Private-Server/internal/configuration.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/android uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/catalog.
github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses github.com/Layen-lang/PTCGP-Private-Server/internal/catalog, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/catalog can break github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi can't break github.com/Layen-lang/PTCGP-Private-Server/internal/catalog.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/protocol.
github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses github.com/Layen-lang/PTCGP-Private-Server/internal/protocol, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/protocol can break github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi can't break github.com/Layen-lang/PTCGP-Private-Server/internal/protocol.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a module listed above it, which is the healthy direction.
21 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/store.
github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses github.com/Layen-lang/PTCGP-Private-Server/internal/store, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/store can break github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi can't break github.com/Layen-lang/PTCGP-Private-Server/internal/store.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/traffic.
github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses github.com/Layen-lang/PTCGP-Private-Server/internal/traffic, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/traffic can break github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi can't break github.com/Layen-lang/PTCGP-Private-Server/internal/traffic.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a module listed above it, which is the healthy direction.
5 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/packlab.
github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses github.com/Layen-lang/PTCGP-Private-Server/internal/packlab, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/packlab can break github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi can't break github.com/Layen-lang/PTCGP-Private-Server/internal/packlab.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a module listed above it, which is the healthy direction.
43 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/player. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses github.com/Layen-lang/PTCGP-Private-Server/internal/player, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/player can break github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi can't break github.com/Layen-lang/PTCGP-Private-Server/internal/player.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/playerapi uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/servercmd uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/configuration.
github.com/Layen-lang/PTCGP-Private-Server/internal/servercmd uses github.com/Layen-lang/PTCGP-Private-Server/internal/configuration, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/configuration can break github.com/Layen-lang/PTCGP-Private-Server/internal/servercmd, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/servercmd can't break github.com/Layen-lang/PTCGP-Private-Server/internal/configuration.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/servercmd uses a module listed above it, which is the healthy direction.
ptcgp_private_server.backend uses ptcgp_private_server.theme, so a change to ptcgp_private_server.theme can break ptcgp_private_server.backend, while a change to ptcgp_private_server.backend can't break ptcgp_private_server.theme.
Position
Below the diagonal: ptcgp_private_server.backend uses a module listed above it, which is the healthy direction.
ptcgp_private_server.backend uses ptcgp_private_server.ui.pages.packs, so a change to ptcgp_private_server.ui.pages.packs can break ptcgp_private_server.backend, while a change to ptcgp_private_server.backend can't break ptcgp_private_server.ui.pages.packs.
Position
Below the diagonal: ptcgp_private_server.backend uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.game_icons uses ptcgp_private_server.ui.pages.packs, so a change to ptcgp_private_server.ui.pages.packs can break ptcgp_private_server.ui.game_icons, while a change to ptcgp_private_server.ui.game_icons can't break ptcgp_private_server.ui.pages.packs.
Position
Below the diagonal: ptcgp_private_server.ui.game_icons uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.pages.accounts uses ptcgp_private_server.api, so a change to ptcgp_private_server.api can break ptcgp_private_server.ui.pages.accounts, while a change to ptcgp_private_server.ui.pages.accounts can't break ptcgp_private_server.api.
Position
Below the diagonal: ptcgp_private_server.ui.pages.accounts uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.pages.accounts uses ptcgp_private_server.theme, so a change to ptcgp_private_server.theme can break ptcgp_private_server.ui.pages.accounts, while a change to ptcgp_private_server.ui.pages.accounts can't break ptcgp_private_server.theme.
Position
Below the diagonal: ptcgp_private_server.ui.pages.accounts uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.pages.accounts uses ptcgp_private_server.ui.forms, so a change to ptcgp_private_server.ui.forms can break ptcgp_private_server.ui.pages.accounts, while a change to ptcgp_private_server.ui.pages.accounts can't break ptcgp_private_server.ui.forms.
Position
Below the diagonal: ptcgp_private_server.ui.pages.accounts uses a module listed above it, which is the healthy direction.
ptcgp_private_server.updater uses ptcgp_private_server.ui.pages.packs, so a change to ptcgp_private_server.ui.pages.packs can break ptcgp_private_server.updater, while a change to ptcgp_private_server.updater can't break ptcgp_private_server.ui.pages.packs.
Position
Below the diagonal: ptcgp_private_server.updater uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/provision uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/configuration.
github.com/Layen-lang/PTCGP-Private-Server/internal/provision uses github.com/Layen-lang/PTCGP-Private-Server/internal/configuration, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/configuration can break github.com/Layen-lang/PTCGP-Private-Server/internal/provision, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/provision can't break github.com/Layen-lang/PTCGP-Private-Server/internal/configuration.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/provision uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/provision uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/android.
github.com/Layen-lang/PTCGP-Private-Server/internal/provision uses github.com/Layen-lang/PTCGP-Private-Server/internal/android, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/android can break github.com/Layen-lang/PTCGP-Private-Server/internal/provision, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/provision can't break github.com/Layen-lang/PTCGP-Private-Server/internal/android.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/provision uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.app uses ptcgp_private_server.api, so a change to ptcgp_private_server.api can break ptcgp_private_server.ui.app, while a change to ptcgp_private_server.ui.app can't break ptcgp_private_server.api.
Position
Below the diagonal: ptcgp_private_server.ui.app uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.app uses ptcgp_private_server.theme, so a change to ptcgp_private_server.theme can break ptcgp_private_server.ui.app, while a change to ptcgp_private_server.ui.app can't break ptcgp_private_server.theme.
Position
Below the diagonal: ptcgp_private_server.ui.app uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.app uses ptcgp_private_server.backend, so a change to ptcgp_private_server.backend can break ptcgp_private_server.ui.app, while a change to ptcgp_private_server.ui.app can't break ptcgp_private_server.backend.
Position
Below the diagonal: ptcgp_private_server.ui.app uses a module listed above it, which is the healthy direction.
ptcgp_private_server.ui.app uses ptcgp_private_server.updater, so a change to ptcgp_private_server.updater can break ptcgp_private_server.ui.app, while a change to ptcgp_private_server.ui.app can't break ptcgp_private_server.updater.
Position
Below the diagonal: ptcgp_private_server.ui.app uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/control uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/binarypatch.
github.com/Layen-lang/PTCGP-Private-Server/internal/control uses github.com/Layen-lang/PTCGP-Private-Server/internal/binarypatch, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/binarypatch can break github.com/Layen-lang/PTCGP-Private-Server/internal/control, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/control can't break github.com/Layen-lang/PTCGP-Private-Server/internal/binarypatch.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/control uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/control uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/store.
github.com/Layen-lang/PTCGP-Private-Server/internal/control uses github.com/Layen-lang/PTCGP-Private-Server/internal/store, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/store can break github.com/Layen-lang/PTCGP-Private-Server/internal/control, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/control can't break github.com/Layen-lang/PTCGP-Private-Server/internal/store.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/control uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/control uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/configuration.
github.com/Layen-lang/PTCGP-Private-Server/internal/control uses github.com/Layen-lang/PTCGP-Private-Server/internal/configuration, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/configuration can break github.com/Layen-lang/PTCGP-Private-Server/internal/control, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/control can't break github.com/Layen-lang/PTCGP-Private-Server/internal/configuration.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/control uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/control uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/android.
github.com/Layen-lang/PTCGP-Private-Server/internal/control uses github.com/Layen-lang/PTCGP-Private-Server/internal/android, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/android can break github.com/Layen-lang/PTCGP-Private-Server/internal/control, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/control can't break github.com/Layen-lang/PTCGP-Private-Server/internal/android.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/control uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/control uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/provision.
github.com/Layen-lang/PTCGP-Private-Server/internal/control uses github.com/Layen-lang/PTCGP-Private-Server/internal/provision, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/provision can break github.com/Layen-lang/PTCGP-Private-Server/internal/control, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/control can't break github.com/Layen-lang/PTCGP-Private-Server/internal/provision.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/control uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/cmd/ptcgp-server uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/configuration.
github.com/Layen-lang/PTCGP-Private-Server/cmd/ptcgp-server uses github.com/Layen-lang/PTCGP-Private-Server/internal/configuration, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/configuration can break github.com/Layen-lang/PTCGP-Private-Server/cmd/ptcgp-server, while a change to github.com/Layen-lang/PTCGP-Private-Server/cmd/ptcgp-server can't break github.com/Layen-lang/PTCGP-Private-Server/internal/configuration.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/cmd/ptcgp-server uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/cmd/ptcgp-server uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/control.
github.com/Layen-lang/PTCGP-Private-Server/cmd/ptcgp-server uses github.com/Layen-lang/PTCGP-Private-Server/internal/control, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/control can break github.com/Layen-lang/PTCGP-Private-Server/cmd/ptcgp-server, while a change to github.com/Layen-lang/PTCGP-Private-Server/cmd/ptcgp-server can't break github.com/Layen-lang/PTCGP-Private-Server/internal/control.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/cmd/ptcgp-server uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in github.com/Layen-lang/PTCGP-Private-Server/internal/controlcli uses a type in github.com/Layen-lang/PTCGP-Private-Server/internal/control.
github.com/Layen-lang/PTCGP-Private-Server/internal/controlcli uses github.com/Layen-lang/PTCGP-Private-Server/internal/control, so a change to github.com/Layen-lang/PTCGP-Private-Server/internal/control can break github.com/Layen-lang/PTCGP-Private-Server/internal/controlcli, while a change to github.com/Layen-lang/PTCGP-Private-Server/internal/controlcli can't break github.com/Layen-lang/PTCGP-Private-Server/internal/control.
Position
Below the diagonal: github.com/Layen-lang/PTCGP-Private-Server/internal/controlcli uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 72.5 · Adequate · gated by D1, D2 ·
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
A05:2025 — Injection
29
High / Critical
A03:2025 — Software Supply Chain Failures
26
High / Critical
Roadmap
Top priorities: Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing; Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible; Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.rs.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible.
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.
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.
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 — 11
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 — 446
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 — 44
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 20
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 50 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, 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 — 50 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, 484 of 501 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .rs, .go, and our analyzer cannot run the .go test suite(s) — so no coverage was collected for the repository as a whole. The Rust half did build and run, and its own line coverage came back at 27.9% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
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 a Go module (REDACTED/go.sum), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Go dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-contributor repository — bus factor is not applicable (1 contributor(s) across 33 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
D19 Documentation Quality — 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. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D27 Navigability — 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. Tracing effort is measured over resolved call sites, and all 1012 sampled here came from .go files. This repository's .rs source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
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 (33 commit(s) sampled).
AX6 Interface segregation — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — 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 data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
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, Scala, Rust and Java source only, and this repository's Go 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, Scala and Rust source only, and this repository's Go 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.
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.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
X21 Side-effecting pattern guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# and Visual Basic syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin, PHP, F# and Visual Basic source only, and no C# was loaded, and this repository's Go, Rust 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.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
X26 Unsynchronised callback handoff — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — 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. 89 further occurrence(s) are not listed individually; the score already reflects all 129.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
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.
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.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
82 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was Manager.Prepare at 93. A further 2 function(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Parser::value at 37 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: native/importer/src/masterdata/mod.rs (Parser::value at 37), internal/playerapi/present_handlers.go (playerapi.inventoryFromPresent at 19). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 70 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with Manager.Prepare (cyclomatic 93), Handler.serveAPI (cyclomatic 76), NativeRunner.setupAndroid (cyclomatic 64). — 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 3.8 to about 4.8/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 88 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 6 bodies over 60 down to 60 or less in Cognitive Complexity — start with Manager.Prepare (cognitive 183), NativeRunner.setupAndroid (cognitive 99), PacksPage::render (cognitive 76). — 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 2.0 to about 3.6/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.5 / 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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 FileTooLong finding(s) in God Classes — start with catalog.go, manager.go, card_mesh.rs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 8 TooManyMethods finding(s) in God Classes — start with store.go, manager.go, REDACTED. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 7 ClassTooLong finding(s) in God Classes — start with manager.go, catalog.go, app.rs. — One of this dimension's main actionable groups (7 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.
42 duplicated block group(s) detected. 7.7 % of the production lines (2,664 of 34,663) are in a reported copy. A further 57 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 (11 corresponding lines) · ×7internal/store/trade_sessions.go:152
Edited copy of a member (10 corresponding lines) · ×4REDACTED:731
+ 49 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 Edited copy of a member (11 corresponding lines) finding(s) in Code Duplication — start with trade_sessions.go, activities.go, REDACTED. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 7 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with present_handlers.go, showcase_handlers.go, friend_handlers.go. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 7 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with REDACTED, card_skin_handlers.go, collection_handlers.go. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.0 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
4 production modules (Cargo+Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence.
Off the main sequence: ptcgp-importer
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
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.
5 outdated, 0 author-deprecated direct Go module(s), 2 pinning or checksum defect(s). 7 of 7 direct requirement(s) were graded against proxy.golang.org (0 not served there, 2 publishing no tagged release to be behind). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.
Dependency pinned to a stale untagged commit: github.com/srwiley/oksvg · ×2
Outdated: golang.org/x/net · ×5
What to do
Resolve the 2 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (2 warning-level).
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 818 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares a Go module (REDACTED/go.sum), 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.
Resolve the 15 Hotspot finding(s) in Churn × Complexity Hotspots — start with provision.go, REDACTED, android_setup.go. — One of this dimension's main actionable groups (15 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
0 deducted task-comment markers across 34663 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.
1 of 1 documentation facets pass in full. 12 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
1 of 4 build units (Cargo, Go) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionREDACTED:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
15 % of calls cross a namespace and 4 % go through an interface, but 52 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated. Measured over the .go source only — this repository's .rs was not sampled for call sites, so this score covers part of the tree, not all of it.
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).
31 finding(s): 0 critical, 7 high, 3 medium, 21 low. 4 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 2 file(s) — `desktop/src/ui/app.rs` (line 155, line 218, line 272, …), `desktop/src/ui/pages/traffic.rs` (line 186) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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 10 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (10). — One of this dimension's main actionable groups (10 warning-level).
Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-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 the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
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.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
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 singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
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.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability6.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `desktop`, `native/reader`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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 gosec / govulncheck (or golangci-lint) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
`REDACTED` 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`. — REDACTED:5
What to do
Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.
What to do
Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 4/5 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up — a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`runAssetProbe` calls `http.NewRequestWithContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — internal/servercmd/probe.go:21
What to do
Thread a context.Context through functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for … range` leaves the slice or map it is walking alone — Go raises nothing, but the walk and the collection part: a range evaluates its slice once, so an element appended in the body is never visited and a removal by reslicing (`s = append(s[:i], s[i+1:]...)`, `slices.Delete`) shifts the next element under the index, which is then skipped while the last is read twice; a reslice, a reassignment or a sort leaves every later `s[i]` naming another element; and a map's order is unspecified, so deleting another key (or clearing the map) changes from run to run which entries the loop still sees.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard5.7 / 10Adequate✓ Tool-verified
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
`sum` holds what `Sum256` returns, and `sum[6]` takes element 6 of it without checking its length — while this file tests that same result elsewhere before indexing it, because it can be nil or shorter. Here a short result panics with `index out of range`. Test `len(sum)` (or nil) first, as the other call site does. — internal/store/store.go:965
`sum` holds what `Sum256` returns, and `sum[8]` takes element 8 of it without checking its length — while this file tests that same result elsewhere before indexing it, because it can be nil or shorter. Here a short result panics with `index out of range`. Test `len(sum)` (or nil) first, as the other call site does. — internal/store/store.go:966
What to do
Each finding names the index access that escapes the guard and the line of the correctly bracketed access beside it. Compare the two: they differ only in where one parenthesis sits. Move it so the emptiness test brackets every access to that symbol — and if the value provably cannot be empty at this point, delete the test rather than leave a condition that guards one access and not its neighbour.
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.
`if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — internal/traffic/recorder.go:163, internal/traffic/recorder.go:399, internal/playerapi/card_handlers.go:83
`if rotateErr := r.rotateLocked(); rotateErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — internal/traffic/recorder.go:180
`changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. (×25) — internal/store/activities.go:176, internal/store/activities.go:185, internal/store/card_exchange.go:53, …
`count, _ := result.RowsAffected()` writes the call's error to `_` and then uses `count` as if the call succeeded. When `result.RowsAffected` fails, `count` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `count` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. (×3) — internal/store/decks.go:103, internal/store/packs.go:292, internal/store/social.go:161
`n, _ := result.RowsAffected()` writes the call's error to `_` and then uses `n` as if the call succeeded. When `result.RowsAffected` fails, `n` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `n` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. (×3) — internal/store/store.go:286, internal/store/store.go:417, internal/store/store.go:471
`rows, _ := result.RowsAffected()` writes the call's error to `_` and then uses `rows` as if the call succeeded. When `result.RowsAffected` fails, `rows` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `rows` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — internal/store/store.go:938
`if err := json.NewEncoder(w).Encode(value); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — internal/restapi/handler.go:325
`identity, _ := json.Marshal(struct { Client any Contract any Converter string }{cfg.Client, cfg.Contracts, converter})` writes the call's error to `_` and then uses `identity` as if the call succeeded. When `json.Marshal` fails, `identity` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `identity` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — internal/provision/provision.go:331
`old, _ := loadReceipt(root, previous.Key)` writes the call's error to `_` and then uses `old` as if the call succeeded. When `loadReceipt` fails, `old` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `old` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — internal/provision/provision.go:423
`apks, _ := json.Marshal(source.APKs)` writes the call's error to `_` and then uses `apks` as if the call succeeded. When `json.Marshal` fails, `apks` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `apks` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — internal/provision/provision.go:545
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
Other · Code Health — Whether Rust's absent values are handled rather than forced — `Option` and `Result` make absence a value the caller must handle in every crate, and each `.unwrap()` or `.expect()` that no guard on its path proves present is a panic the first time the value is `None` or `Err`.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
`weights[start..].iter().enumerate().max_by_key(|(_,w)|w.weight)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `prepare_filter` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — native/importer/src/card_mesh.rs:159
`RgbaImage::from_raw(self.width,self.height,output)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — native/importer/src/card_mesh.rs:251
`data[off..off+4].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `word` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — native/importer/src/crypto.rs:29
`std::fs::read(path)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `decrypt` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — native/importer/src/crypto.rs:89
`std::fs::read(path).unwrap().try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `decrypt` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — native/importer/src/crypto.rs:89
`data[offset..offset+4].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `transform_avx2` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — native/importer/src/crypto.rs:191
`output.join("images").join(&i.output).parent()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — native/importer/src/fast_pipeline.rs:91
`textures.pop()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). (×2) — native/importer/src/fast_pipeline.rs:120, native/importer/src/fast_pipeline.rs:125
`std::env::var("PTCGP_SOURCE_ROOT")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `remote` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:20
`std::env::var("PTCGP_ADB_SERIAL")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `serial` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:24
`std::env::var("PTCGP_APKS")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `apks` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:39
`serde_json::from_str(&std::env::var("PTCGP_APKS").expect("APKs required"))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `apks` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:39
`pending.remove(&item)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream_reader` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:401
`child.into_inner()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream_reader` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:418
`weights.iter().enumerate().min_by_key(|(_,w)|**w)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream_run` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:503
`j.join()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream_run` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:601
`a.join()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `master_run` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:703
`b.join()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `master_run` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:703
`path.rsplit('/').next()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `texture` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — native/importer/src/unity_fast.rs:282
`std::env::var("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/build.rs:12
`std::fs::write(&target,bytes)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/build.rs:21
`std::fs::write(out.join("readers.rs"),code)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/build.rs:24
`resource.compile()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/build.rs:41
`std::thread::Builder::new().name("image-fetch".into()).spawn(move||loop{let job=receiver.lock().unwrap().recv();let Ok((url,reply))=job else{return};let result=(||->anyhow::Result<(u16,Vec<u8>)>{let response=match agent.get(&url).call(){Ok(response)=>response,Err(ureq::Error::Status(_,response))=>response,Err(error)=>return Err(error.into()),};let status=response.status();let mut bytes=Vec::new();std::io::Read::read_to_end(&mut response.into_reader(),&mut bytes)?;Ok((status,bytes))})();let _=reply.send(result);})` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/src/http.rs:41
`gpui_kit::open_window(options,cx,move|window,cx|cx.new(|cx|AppView::new(inst,prefs,window,cx)))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/src/main.rs:117
`result` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `change_mode` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/src/ui/app.rs:398
`self.packs.clone()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_route` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/src/ui/app.rs:849
`self.traffic.as_ref()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_route` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/src/ui/app.rs:859
`self.logs.clone()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_route` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/src/ui/app.rs:868
`self.settings.clone()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_route` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/src/ui/app.rs:880
`self.accounts.as_ref()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render_accounts` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/src/ui/app.rs:905
`std::thread::Builder::new().name("traffic-stream".into()).spawn(move||{let history=api.traffic(500,&after);let mut latest=history.as_ref().ok().and_then(|events|events.first().map(|e|e.id.clone())).unwrap_or(after);if sender.unbounded_send(Feed::History(history)).is_err()||!follow{return}while!stop.load(Ordering::Relaxed){let _=sender.unbounded_send(Feed::Live(true));let from=latest.clone();let result=api.traffic_stream(&from,&stop,|event|{latest=event.id.clone();let _=sender.unbounded_send(Feed::Event(event));});if stop.load(Ordering::Relaxed){break}let _=sender.unbounded_send(Feed::Live(false));if let Err(error)=result{let _=sender.unbounded_send(Feed::Error(error.to_string()));}std::thread::sleep(Duration::from_secs(1));}})` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `start` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — desktop/src/ui/pages/traffic.rs:185
What to do
Each row is a forced `Option`/`Result` no guard on its path proves present. Handle the absent case where it arises rather than forcing it: `?` to hand it to the caller, `if let` / `match` / `let … else` to branch on it, `unwrap_or` / `unwrap_or_default` / `unwrap_or_else` where a default is right. Where the value genuinely cannot be absent, say so in a way a reader can check from the line: test it first (`if x.is_none() { return … }`), look the key up with `contains_key` or the index against `len()`, or construct the value so it cannot be absent.
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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 61 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 Go 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; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
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
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~7465 lines of test source are present (.go, .rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D16 Bus Factor — single-contributor repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — N/A — too few peers to establish a naming convention (6853 declarations, no unit with a dominant convention).
D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed Rust surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (traffic), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .go, .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 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.
D34 Knowledge Freshness — too few commits to judge knowledge freshness
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.
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 — polyglot repository, one half has no runner
DM1 Domain Modelling — applicable but not scored (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 2 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 5 value object(s)
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner 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 — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 1 aggregate(s) with Apply/When folds; 1 Go aggregate(s) recording domain events (own events-slice append / raise-record)
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
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 data present for 8 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a `func BenchmarkXxx(b *testing.B)` in any `_test.go` file, 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.
PF3 Async & latency hygiene — Not applicable: Go has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
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 27% of this repository's production lines — go (25,166 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 27% of this repository's production lines — go (25,166 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
X16 Unfloored truncation loop — X16 reached only 27% of this repository's production lines — go (25,166 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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 — X18 reached only 27% of this repository's production lines — go (25,166 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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
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 — X21 reached only 27% of this repository's production lines — go (25,166 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X22 Contradicted release guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X23 Unguarded diagnostic materialisation — not 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 analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X25 Inert configuration knob — X25 reached only 27% of this repository's production lines — go (25,166 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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
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.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
X3 · Exception handling· Discarded error (assigned to `_`, then its result used) · ×35
Discarded error (assigned to `_`, then its result used) internal/store/activities.go:176— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/activities.go:185— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/card_exchange.go:53— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/card_exchange.go:63— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/decks.go:103— `count, _ := result.RowsAffected()` writes the call's error to `_` and then uses `count` as if the call succeeded. When `result.RowsAffected` fails, `count` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `count` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/feed.go:272— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/feed.go:281— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/item_shop.go:105— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/packs.go:292— `count, _ := result.RowsAffected()` writes the call's error to `_` and then uses `count` as if the call succeeded. When `result.RowsAffected` fails, `count` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `count` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/packs.go:328— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/packs.go:386— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/preferences.go:77— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/preferences.go:96— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/presents.go:123— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/profile_emblems.go:39— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/profile_lifecycle.go:213— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/progression.go:44— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/progression.go:193— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/showcases.go:84— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/showcases.go:106— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/social.go:161— `count, _ := result.RowsAffected()` writes the call's error to `_` and then uses `count` as if the call succeeded. When `result.RowsAffected` fails, `count` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `count` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/store.go:286— `n, _ := result.RowsAffected()` writes the call's error to `_` and then uses `n` as if the call succeeded. When `result.RowsAffected` fails, `n` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `n` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/store.go:417— `n, _ := result.RowsAffected()` writes the call's error to `_` and then uses `n` as if the call succeeded. When `result.RowsAffected` fails, `n` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `n` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/store.go:448— `changed, _ := result.RowsAffected()` writes the call's error to `_` and then uses `changed` as if the call succeeded. When `result.RowsAffected` fails, `changed` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `changed` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Discarded error (assigned to `_`, then its result used) internal/store/store.go:471— `n, _ := result.RowsAffected()` writes the call's error to `_` and then uses `n` as if the call succeeded. When `result.RowsAffected` fails, `n` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `n` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
+ 10 more in this group — see findings.md.
X5 · Nullable reference types· Symbol treated as nullable, then dereferenced unguarded · ×33
Symbol treated as nullable, then dereferenced unguarded native/importer/src/card_mesh.rs:159— `weights[start..].iter().enumerate().max_by_key(|(_,w)|w.weight)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `prepare_filter` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded native/importer/src/card_mesh.rs:251— `RgbaImage::from_raw(self.width,self.height,output)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `render` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded native/importer/src/crypto.rs:29— `data[off..off+4].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `word` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded native/importer/src/crypto.rs:89— `std::fs::read(path)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `decrypt` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded native/importer/src/crypto.rs:89— `std::fs::read(path).unwrap().try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `decrypt` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded native/importer/src/crypto.rs:191— `data[offset..offset+4].try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `transform_avx2` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded native/importer/src/fast_pipeline.rs:91— `output.join("images").join(&i.output).parent()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded native/importer/src/fast_pipeline.rs:120— `textures.pop()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded native/importer/src/fast_pipeline.rs:125— `textures.pop()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded REDACTED:20— `std::env::var("PTCGP_SOURCE_ROOT")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `remote` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded REDACTED:24— `std::env::var("PTCGP_ADB_SERIAL")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `serial` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded REDACTED:39— `std::env::var("PTCGP_APKS")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `apks` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded REDACTED:39— `serde_json::from_str(&std::env::var("PTCGP_APKS").expect("APKs required"))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `apks` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded REDACTED:401— `pending.remove(&item)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream_reader` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded REDACTED:418— `child.into_inner()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream_reader` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded REDACTED:503— `weights.iter().enumerate().min_by_key(|(_,w)|**w)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream_run` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded REDACTED:601— `j.join()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `stream_run` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded REDACTED:703— `a.join()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `master_run` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded REDACTED:703— `b.join()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `master_run` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded native/importer/src/unity_fast.rs:282— `path.rsplit('/').next()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `texture` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded desktop/build.rs:12— `std::env::var("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded desktop/build.rs:21— `std::fs::write(&target,bytes)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded desktop/build.rs:24— `std::fs::write(out.join("readers.rs"),code)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded desktop/build.rs:41— `resource.compile()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded desktop/src/http.rs:41— `std::thread::Builder::new().name("image-fetch".into()).spawn(move||loop{let job=receiver.lock().unwrap().recv();let Ok((url,reply))=job else{return};let result=(||->anyhow::Result<(u16,Vec<u8>)>{let response=match agent.get(&url).call(){Ok(response)=>response,Err(ureq::Error::Status(_,response))=>response,Err(error)=>return Err(error.into()),};let status=response.status();let mut bytes=Vec::new();std::io::Read::read_to_end(&mut response.into_reader(),&mut bytes)?;Ok((status,bytes))})();let _=reply.send(result);})` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Hotspot: internal/provision/provision.go internal/provision/provision.go:363— internal/provision/provision.go changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in Manager.Prepare at line 363. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- internal/provision/provision.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:171— REDACTED changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in Handler.ServeHTTP at line 171. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: internal/control/android_setup.go internal/control/android_setup.go:293— internal/control/android_setup.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in NativeRunner.setupAndroid at line 293. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- internal/control/android_setup.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:135— REDACTED changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in NativeRunner.fullStatus at line 135. 1 of those changes was a fix/bug commit, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: desktop/src/ui/app.rs desktop/src/ui/app.rs:215— desktop/src/ui/app.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in AppView::start_polling at line 215. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- desktop/src/ui/app.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: internal/controlcli/run.go internal/controlcli/run.go:20— internal/controlcli/run.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in controlcli.Run at line 20. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- internal/controlcli/run.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: internal/catalog/catalog.go internal/catalog/catalog.go:806— internal/catalog/catalog.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in Catalog.load at line 806. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- internal/catalog/catalog.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: cmd/ptcgp-server/main.go cmd/ptcgp-server/main.go:54— cmd/ptcgp-server/main.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in main.runPanel at line 54. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- cmd/ptcgp-server/main.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: internal/configuration/config.go internal/configuration/config.go:175— internal/configuration/config.go changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in configuration.Load at line 175. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- internal/configuration/config.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: internal/android/discovery.go internal/android/discovery.go:264— internal/android/discovery.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in android.discoverDevices at line 264. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- internal/android/discovery.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: internal/store/packs.go internal/store/packs.go:345— internal/store/packs.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in Store.CommitPackOpening at line 345. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- internal/store/packs.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: internal/android/devices.go internal/android/devices.go:131— internal/android/devices.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in android.listDevices at line 131. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- internal/android/devices.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: internal/control/emulators.go internal/control/emulators.go:314— internal/control/emulators.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in MultiRunner.Status at line 314. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- internal/control/emulators.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: desktop/src/ui/pages/settings.rs desktop/src/ui/pages/settings.rs:323— desktop/src/ui/pages/settings.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in SettingsPage::render_interface at line 323. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- desktop/src/ui/pages/settings.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: internal/server/server.go internal/server/server.go:50— internal/server/server.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in server.Run at line 50. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:01:38 +01:00' --until='2026-11-15 12:01:38 +01:00' --full-history --no-merges -- internal/server/server.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FileTooLong: catalog/catalog.go internal/catalog/catalog.go— FileTooLong — 1130 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: Catalog (56 blocks, 255-1573). The bar is 500 significant lines; this is 630 over it, 2.26× 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: player/manager.go internal/player/manager.go— FileTooLong — 1102 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: Manager (127 blocks, 199-1658). The bar is 500 significant lines; this is 602 over it, 2.20× 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: src/card_mesh.rs native/importer/src/card_mesh.rs— FileTooLong — 889 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 389 over it, 1.78× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: pages/accounts.rs desktop/src/ui/pages/accounts.rs— FileTooLong — 786 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 86% of them inside a single declaration: AccountsPage (4 blocks, 123-966). The bar is 500 significant lines; this is 286 over it, 1.57× 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: ui/app.rs desktop/src/ui/app.rs— FileTooLong — 766 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 92% of them inside a single declaration: AppView (3 blocks, 49-970). The bar is 500 significant lines; this is 266 over it, 1.53× 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: REDACTED REDACTED— FileTooLong — 721 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: Handler (34 blocks, 32-964). The bar is 500 significant lines; this is 221 over it, 1.44× 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: store/store.go internal/store/store.go— FileTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: Store (31 blocks, 122-947). The bar is 500 significant lines; this is 199 over it, 1.40× 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: REDACTED REDACTED— FileTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 161 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: provision/provision.go internal/provision/provision.go— FileTooLong — 617 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 117 over it, 1.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: pages/packs.rs desktop/src/ui/pages/packs.rs— FileTooLong — 534 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: PacksPage (6 blocks, 25-657). The bar is 500 significant lines; this is 34 over it, 1.07× 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.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×10
TooManyMethods: Store internal/store/store.go:122— TooManyMethods — 159 methods, declared across 28 files: store/store.go (31), store/packs.go (10), REDACTED (9), store/trade_sessions.go (9), +24 more file(s). The bar is 30 methods; this is 129 over it, 5.30× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Manager internal/player/manager.go:199— TooManyMethods — 130 methods, declared across 2 files: player/manager.go (129), player/action_projection.go (1). The bar is 30 methods; this is 100 over it, 4.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NativeRunner REDACTED:25— TooManyMethods — 60 methods, declared across 8 files: REDACTED (29), control/android_setup.go (14), control/action_cache.go (4), control/hosted.go (4), +4 more file(s). The bar is 30 methods; this is 30 over it, 2.00× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Catalog internal/catalog/catalog.go:255— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AppView desktop/src/ui/app.rs:49— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Api desktop/src/api.rs:361— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Handler REDACTED:32— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AccountsPage desktop/src/ui/pages/accounts.rs:123— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Manager internal/player/manager.go:199— ClassTooLong — 909 significant lines (blank, comment-only and punctuation-only lines excluded), 130 methods, 127 blocks, lines 199-1658. The bar is 400 significant lines; this is 509 over it, 2.27× 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: Catalog internal/catalog/catalog.go:255— ClassTooLong — 733 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods, 56 blocks, lines 255-1573. The bar is 400 significant lines; this is 333 over it, 1.83× 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: AppView desktop/src/ui/app.rs:49— ClassTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 38 methods, 3 blocks, lines 49-970. The bar is 400 significant lines; this is 301 over it, 1.75× 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: AccountsPage desktop/src/ui/pages/accounts.rs:123— ClassTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 33 methods, 4 blocks, lines 123-966. The bar is 400 significant lines; this is 274 over it, 1.69× 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: Handler REDACTED:32— ClassTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods, 34 blocks, lines 32-964. The bar is 400 significant lines; this is 171 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PacksPage desktop/src/ui/pages/packs.rs:25— ClassTooLong — 485 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 25 methods, 6 blocks, lines 25-657. The bar is 400 significant lines; this is 85 over it, 1.21× 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: Store internal/store/store.go:122— ClassTooLong — 433 significant lines (blank, comment-only and punctuation-only lines excluded), 159 methods, 31 blocks, lines 122-947. 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.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×7
Edited copy of a member (11 corresponding lines) internal/store/trade_sessions.go:152— internal/store/trade_sessions.go:152-162 | internal/store/trade_sessions.go:164-174 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) internal/store/activities.go:60— internal/store/activities.go:60-76 | internal/store/progression.go:168-178 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) REDACTED:506— REDACTED:506-517 | REDACTED:582-592 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) internal/playerapi/trade_lifecycle.go:108— internal/playerapi/trade_lifecycle.go:108-118 | internal/playerapi/trade_lifecycle.go:120-130 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) internal/playerapi/trade_reads.go:60— internal/playerapi/trade_reads.go:60-70 | internal/playerapi/trade_reads.go:87-97 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) internal/player/manager.go:1395— internal/player/manager.go:1395-1405 | internal/player/manager.go:1408-1418 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) internal/playerapi/pvp_casual_handlers.go:82— internal/playerapi/pvp_casual_handlers.go:82-92 | internal/playerapi/pvp_casual_handlers.go:96-106 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (7 lines × 2) internal/playerapi/present_handlers.go:46— internal/playerapi/present_handlers.go:46-52 | internal/playerapi/present_handlers.go:77-83 — 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 `internal/playerapi/present_handlers.go:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/playerapi/showcase_handlers.go:114— internal/playerapi/showcase_handlers.go:114-120 | internal/playerapi/showcase_handlers.go:231-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/playerapi/showcase_handlers.go:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/playerapi/friend_handlers.go:221— internal/playerapi/friend_handlers.go:221-227 | internal/playerapi/stateful_reads.go:328-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 (7 lines × 2) internal/playerapi/collection_handlers.go:217— internal/playerapi/collection_handlers.go:217-223 | internal/playerapi/collection_handlers.go:235-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) internal/android/installs_windows.go:34— internal/android/installs_windows.go:34-40 | internal/android/installs_windows.go:58-64 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) internal/playerapi/stateful_reads.go:214— internal/playerapi/stateful_reads.go:214-220 | internal/playerapi/stateful_reads.go:229-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) native/importer/src/unity_fast.rs:239— native/importer/src/unity_fast.rs:239-245 | native/importer/src/unity_fast.rs:303-309 — 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 `native/importer/src/unity_fast.rs:239` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) REDACTED:720— REDACTED:720-725 | REDACTED:758-763 — 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 `REDACTED:720` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) internal/playerapi/card_skin_handlers.go:75— internal/playerapi/card_skin_handlers.go:75-80 | internal/playerapi/trade_reads.go:116-121 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/playerapi/card_skin_handlers.go:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) internal/playerapi/collection_handlers.go:298— internal/playerapi/collection_handlers.go:298-303 | internal/playerapi/showcase_handlers.go:312-317 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) internal/playerapi/feed_handlers.go:77— internal/playerapi/feed_handlers.go:77-82 | internal/playerapi/trade_reads.go:114-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) internal/playerapi/pack_handlers.go:183— internal/playerapi/pack_handlers.go:183-188 | internal/playerapi/special_pack_handlers.go:138-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/playerapi/pack_handlers.go:183` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) internal/store/packs.go:158— internal/store/packs.go:158-163 | internal/store/packs.go:242-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (6 lines × 2) REDACTED:534— REDACTED:534-539 | REDACTED:565-570 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
FunctionTooLong: ptcgp_reader::run native/reader/src/main.rs:39— FunctionTooLong — ptcgp_reader::run runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ptcgp_importer::live_source::stream_run REDACTED:446— FunctionTooLong — ptcgp_importer::live_source::stream_run runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ptcgp_importer::live_source::master_run REDACTED:661— FunctionTooLong — ptcgp_importer::live_source::master_run runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: main.runPanel cmd/ptcgp-server/main.go:54— FunctionTooLong — runPanel runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: testfixture.masterDataTables internal/testfixture/master_data.go:41— FunctionTooLong — masterDataTables runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ptcgp_importer::live_source::stream_reader REDACTED:313— FunctionTooLong — ptcgp_importer::live_source::stream_reader runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (8 lines × 2) internal/playerapi/solo_battle_handlers.go:70— internal/playerapi/solo_battle_handlers.go:70-77 | internal/playerapi/solo_battle_handlers.go:138-145 — 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 `internal/playerapi/solo_battle_handlers.go:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) internal/playerapi/supplemental_handlers.go:104— internal/playerapi/supplemental_handlers.go:104-111 | internal/playerapi/supplemental_handlers.go:173-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) internal/provision/provision.go:464— internal/provision/provision.go:464-471 | internal/provision/provision.go:507-514 — 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 (8 lines × 2) internal/store/store.go:640— internal/store/store.go:640-647 | internal/store/store.go:708-715 — 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 `internal/store/store.go:640` 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) internal/store/snapshot.go:112— internal/store/snapshot.go:112-119 | internal/store/snapshot.go:129-136 — 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 `internal/store/snapshot.go:112` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `internal/store/snapshot.go:126` calls `Unix`, `UTC` and `internal/store/snapshot.go:109` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) internal/playerapi/feed_handlers.go:64— internal/playerapi/feed_handlers.go:64-71 | internal/playerapi/solo_battle_handlers.go:84-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/playerapi/feed_handlers.go:64` 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.
AppView::start_polling (cyclomatic 28) desktop/src/ui/app.rs:215— AppView::start_polling has cyclomatic complexity 28 (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.
AppView::render_topbar (cyclomatic 27) desktop/src/ui/app.rs:674— AppView::render_topbar has cyclomatic complexity 27 (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.
AppView::render_preparation (cyclomatic 22) desktop/src/ui/app.rs:770— AppView::render_preparation has cyclomatic complexity 22 (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.
AppView::render_update (cyclomatic 19) desktop/src/ui/app.rs:640— AppView::render_update has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AppView::render_route (cyclomatic 16) desktop/src/ui/app.rs:830— AppView::render_route has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AppView::start_polling (cognitive 48) desktop/src/ui/app.rs:215— AppView::start_polling has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 11, loops 2, match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppView::render_topbar (cognitive 42) desktop/src/ui/app.rs:674— AppView::render_topbar has cognitive complexity 42 (threshold 15). Drivers by points: if/else 34 (35 pts), boolean chains 6, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AppView::render_preparation (cognitive 32) desktop/src/ui/app.rs:770— AppView::render_preparation has cognitive complexity 32 (threshold 15). Drivers by points: if/else 25 (28 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AppView::render_update (cognitive 29) desktop/src/ui/app.rs:640— AppView::render_update has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AppView::connect (cognitive 21) desktop/src/ui/app.rs:151— AppView::connect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AccountsPage::render_profile (cognitive 47) desktop/src/ui/pages/accounts.rs:686— AccountsPage::render_profile has cognitive complexity 47 (threshold 15). Drivers by points: if/else 36 (44 pts), match/switch 3 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AccountsPage::set_card_quantity (cognitive 28) desktop/src/ui/pages/accounts.rs:385— AccountsPage::set_card_quantity has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (27 pts), match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AccountsPage::render_rail (cognitive 24) desktop/src/ui/pages/accounts.rs:584— AccountsPage::render_rail has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AccountsPage::render_cards (cognitive 21) desktop/src/ui/pages/accounts.rs:813— AccountsPage::render_cards has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AccountsPage::render_peripherals (cognitive 16) desktop/src/ui/pages/accounts.rs:874— AccountsPage::render_peripherals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2. 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.
ptcgp_importer::masterdata::locales::parse_kvrf_bytes (cognitive 32) native/importer/src/masterdata/locales.rs:271— ptcgp_importer::masterdata::locales::parse_kvrf_bytes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ptcgp_importer::masterdata::locales::bootstrap_from_releases (cognitive 28) native/importer/src/masterdata/locales.rs:43— ptcgp_importer::masterdata::locales::bootstrap_from_releases has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ptcgp_importer::fast_pipeline::stream (cognitive 25) native/importer/src/fast_pipeline.rs:73— ptcgp_importer::fast_pipeline::stream has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 7 (9 pts), match/switch 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ptcgp_importer::live_source::stream_reader (cognitive 24) REDACTED:313— ptcgp_importer::live_source::stream_reader has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 4 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ptcgp_importer::masterdata::export (cognitive 22) native/importer/src/masterdata/mod.rs:45— ptcgp_importer::masterdata::export has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (8 pts), match/switch 1 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MethodTooLong: Manager.Prepare internal/provision/provision.go:363— MethodTooLong — Prepare runs 266 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 166 over it, 2.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PacksPage.render desktop/src/ui/pages/packs.rs:384— MethodTooLong — render runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NativeRunner.setupAndroid internal/control/android_setup.go:293— MethodTooLong — setupAndroid runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Catalog.load internal/catalog/catalog.go:806— MethodTooLong — load runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Handler.login internal/restapi/handler.go:161— MethodTooLong — login runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× 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.
Swallowed exception (caught, then discarded) internal/traffic/recorder.go:163— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) internal/traffic/recorder.go:180— `if rotateErr := r.rotateLocked(); rotateErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) internal/traffic/recorder.go:399— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) internal/restapi/handler.go:325— `if err := json.NewEncoder(w).Encode(value); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) internal/playerapi/card_handlers.go:83— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
PacksPage::render (cognitive 76) desktop/src/ui/pages/packs.rs:384— PacksPage::render has cognitive complexity 76 (threshold 15). Drivers by points: if/else 51 (71 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 21). 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.
PacksPage::render_preview (cognitive 41) desktop/src/ui/pages/packs.rs:613— PacksPage::render_preview has cognitive complexity 41 (threshold 15). Drivers by points: if/else 26 (32 pts), match/switch 3 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PacksPage::new (cognitive 26) desktop/src/ui/pages/packs.rs:96— PacksPage::new has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PacksPage::render_illegal (cognitive 23) desktop/src/ui/pages/packs.rs:551— PacksPage::render_illegal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×4
Edited copy of a member (10 corresponding lines) REDACTED:731— REDACTED:731-740 | REDACTED:742-751 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) internal/store/snapshot.go:239— internal/store/snapshot.go:239-249 | internal/store/store.go:389-398 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) internal/playerapi/showcase_handlers.go:130— internal/playerapi/showcase_handlers.go:130-139 | internal/playerapi/showcase_handlers.go:247-256 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) internal/playerapi/player_handlers.go:17— internal/playerapi/player_handlers.go:17-26 | internal/playerapi/player_handlers.go:28-37 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×4
Edited copy of a member (3 corresponding lines) internal/playerapi/feed_handlers.go:182— internal/playerapi/feed_handlers.go:182-184 | internal/playerapi/solo_battle_handlers.go:208-210 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) REDACTED:962— REDACTED:962-964 | REDACTED:475-477 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) desktop/src/ui/pages/logs.rs:172— desktop/src/ui/pages/logs.rs:172-176 | desktop/src/ui/pages/traffic.rs:133-135 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) internal/playerapi/give_card_handlers.go:204— internal/playerapi/give_card_handlers.go:204-206 | internal/playerapi/trade_lifecycle.go:274-279 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
PacksPage::render (cyclomatic 39) desktop/src/ui/pages/packs.rs:384— PacksPage::render has cyclomatic complexity 39 (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.
PacksPage::render_preview (cyclomatic 24) desktop/src/ui/pages/packs.rs:613— PacksPage::render_preview has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PacksPage::render_illegal (cyclomatic 16) desktop/src/ui/pages/packs.rs:551— PacksPage::render_illegal has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×3
Duplicated block (11 lines × 2) internal/control/device_action.go:40— internal/control/device_action.go:40-50 | REDACTED:299-309 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/control/device_action.go:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) internal/playerapi/trade_lifecycle.go:62— internal/playerapi/trade_lifecycle.go:62-72 | internal/playerapi/trade_lifecycle.go:94-104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) REDACTED:72— REDACTED:72-82 | REDACTED:630-640 — 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.
ptcgp_importer::masterdata::locales::bootstrap_from_releases (cyclomatic 18) native/importer/src/masterdata/locales.rs:43— ptcgp_importer::masterdata::locales::bootstrap_from_releases has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ptcgp_importer::fast_pipeline::stream (cyclomatic 16) native/importer/src/fast_pipeline.rs:73— ptcgp_importer::fast_pipeline::stream has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D12 · Dependency Hygiene· Dependency pinned to a stale untagged commit · ×2
Dependency pinned to a stale untagged commit: github.com/srwiley/oksvg — Direct dependency `github.com/srwiley/oksvg` is required at `v0.0.0-20221011165216-be6e8873101c` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2022-10-11, 4.1 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/srwiley/oksvg` and has not moved this requirement in 4.1 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/srwiley/oksvg` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/srwiley/rasterx — Direct dependency `github.com/srwiley/rasterx` is required at `v0.0.0-20220730225603-2ab79fcdd4ef` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2022-07-30, 4.3 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/srwiley/rasterx` and has not moved this requirement in 4.3 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/srwiley/rasterx` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
CardRenderPlan::prepare_filter (cognitive 40) native/importer/src/card_mesh.rs:105— CardRenderPlan::prepare_filter has cognitive complexity 40 (threshold 15). Drivers by points: if/else 5 (21 pts), loops 6 (19 pts) (nesting depth added 29). 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.
CardRenderPlan::render (cognitive 24) native/importer/src/card_mesh.rs:179— CardRenderPlan::render has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 3 (9 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SettingsPage::render_interface (cognitive 31) desktop/src/ui/pages/settings.rs:323— SettingsPage::render_interface has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28 (29 pts), boolean chains 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SettingsPage::render_devices (cognitive 17) desktop/src/ui/pages/settings.rs:99— SettingsPage::render_devices has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 3, match/switch 2. 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.
ptcgp_private_server::ui::pages::traffic::indent_json (cognitive 22) desktop/src/ui/pages/traffic.rs:77— ptcgp_private_server::ui::pages::traffic::indent_json has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ptcgp_private_server::ui::device::label (cognitive 20) desktop/src/ui/device.rs:14— ptcgp_private_server::ui::device::label has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFields: Catalog internal/catalog/catalog.go:255— TooManyFields — 34 stored fields beside 57 methods. The bar is 30 stored fields; this is 4 over it, 1.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Palette desktop/src/theme.rs:181— TooManyFields — 33 stored fields beside 1 method. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) internal/store/profile_lifecycle.go:38— internal/store/profile_lifecycle.go:38-67 | internal/store/profile_lifecycle.go:128-188 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) internal/store/progression.go:130— internal/store/progression.go:130-166 | internal/store/progression.go:180-209 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) internal/playerapi/feed_handlers.go:62— internal/playerapi/feed_handlers.go:62-85 | internal/playerapi/trade_reads.go:99-125 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) REDACTED:641— REDACTED:641-664 | REDACTED:678-702 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×2
Edited copy of a member (13 corresponding lines) desktop/src/ui/pages/logs.rs:37— desktop/src/ui/pages/logs.rs:37-51 | desktop/src/ui/pages/traffic.rs:138-150 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) internal/playerapi/friend_handlers.go:62— internal/playerapi/friend_handlers.go:62-78 | internal/playerapi/give_card_handlers.go:213-225 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) internal/store/activities.go:89— internal/store/activities.go:89-109 | internal/store/feed.go:158-175 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) internal/playerapi/showcase_handlers.go:94— internal/playerapi/showcase_handlers.go:94-111 | internal/playerapi/showcase_handlers.go:211-228 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) internal/playerapi/simple_handlers.go:104— internal/playerapi/simple_handlers.go:104-124 | internal/playerapi/simple_handlers.go:138-159 — 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) internal/traffic/recorder.go:291— internal/traffic/recorder.go:291-311 | internal/traffic/recorder.go:315-336 — 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 copies of one member (4 members, 14+ corresponding lines) · ×2
Edited copies of one member (4 members, 14+ corresponding lines) internal/playerapi/deck_handlers.go:104— internal/playerapi/deck_handlers.go:104-117 | internal/playerapi/showcase_handlers.go:113-128 | internal/playerapi/showcase_handlers.go:230-245 | internal/playerapi/simple_handlers.go:21-34 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 14+ corresponding lines) internal/playerapi/friend_handlers.go:46— internal/playerapi/friend_handlers.go:46-60 | internal/playerapi/friend_handlers.go:80-93 | internal/playerapi/friend_handlers.go:95-108 | internal/playerapi/friend_handlers.go:110-123 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) internal/playerapi/showcase_handlers.go:78— internal/playerapi/showcase_handlers.go:78-92 | internal/playerapi/showcase_handlers.go:195-209 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) internal/playerapi/item_shop_handlers.go:21— internal/playerapi/item_shop_handlers.go:21-38 | internal/playerapi/solo_battle_handlers.go:16-30 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×2
Edited copy of a member (9 corresponding lines) internal/store/store.go:313— internal/store/store.go:313-321 | internal/store/store.go:428-439 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) internal/playerapi/collection_handlers.go:297— internal/playerapi/collection_handlers.go:297-305 | internal/playerapi/showcase_handlers.go:311-319 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×2
Edited copies of one member (3 members, 7+ corresponding lines) internal/playerapi/item_shop_handlers.go:40— internal/playerapi/item_shop_handlers.go:40-46 | internal/playerapi/item_shop_handlers.go:48-54 | internal/playerapi/item_shop_handlers.go:56-62 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) REDACTED:1019— REDACTED:1019-1025 | internal/restapi/handler.go:330-336 | internal/store/store.go:1000-1006 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×2
Edited copy of a member (8 corresponding lines) internal/catalog/catalog.go:584— internal/catalog/catalog.go:584-591 | internal/control/emulators.go:120-127 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) internal/playerapi/showcase_handlers.go:275— internal/playerapi/showcase_handlers.go:275-282 | internal/playerapi/showcase_handlers.go:284-291 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9–10 lines × 2) internal/control/hosted.go:53— internal/control/hosted.go:53-61 | internal/control/process.go:84-93 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/control/hosted.go:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9–10 lines × 2) internal/store/feed.go:83— internal/store/feed.go:83-92 | internal/store/feed.go:181-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `feedID` in one and `cardID` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) internal/playerapi/showcase_handlers.go:62— internal/playerapi/showcase_handlers.go:62-71 | internal/playerapi/showcase_handlers.go:179-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) REDACTED:459— REDACTED:459-468 | REDACTED:674-683 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:469` calls `apks`, `clone` and `REDACTED:684` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 3) internal/playerapi/solo_battle_handlers.go:46— internal/playerapi/solo_battle_handlers.go:46-51 | internal/playerapi/solo_battle_handlers.go:114-119 | internal/playerapi/startup_servers.gen.go:133-138 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `internal/playerapi/solo_battle_handlers.go:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) internal/store/packs.go:158— internal/store/packs.go:158-163 | internal/store/packs.go:242-247 | internal/store/store.go:802-807 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (5 lines × 2) REDACTED:732— REDACTED:732-736 | REDACTED:743-747 — 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 `REDACTED:732` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) REDACTED:89— REDACTED:89-93 | REDACTED:642-646 — 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 `REDACTED:89` 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.
X28 · Index access outside its own emptiness guard· Index access outside its own emptiness guard · ×2
Index access outside its own emptiness guard internal/store/store.go:965— `sum` holds what `Sum256` returns, and `sum[6]` takes element 6 of it without checking its length — while this file tests that same result elsewhere before indexing it, because it can be nil or shorter. Here a short result panics with `index out of range`. Test `len(sum)` (or nil) first, as the other call site does.
Index access outside its own emptiness guard internal/store/store.go:966— `sum` holds what `Sum256` returns, and `sum[8]` takes element 8 of it without checking its length — while this file tests that same result elsewhere before indexing it, because it can be nil or shorter. Here a short result panics with `index out of range`. Test `len(sum)` (or nil) first, as the other call site does.
Manager.Prepare (cyclomatic 93) internal/provision/provision.go:363— Manager.Prepare has cyclomatic complexity 93 (threshold 15). Of this number, 86 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Handler.serveAPI (cyclomatic 76) REDACTED:121— Handler.serveAPI has cyclomatic complexity 76 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
NativeRunner.setupAndroid (cyclomatic 64) internal/control/android_setup.go:293— NativeRunner.setupAndroid has cyclomatic complexity 64 (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.
Catalog.load (cyclomatic 48) internal/catalog/catalog.go:806— Catalog.load has cyclomatic complexity 48 (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.
Handler.ServeHTTP (cyclomatic 42) REDACTED:171— Handler.ServeHTTP has cyclomatic complexity 42 (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.
Catalog.loadTutorialDefinitions (cyclomatic 41) internal/catalog/catalog.go:1082— Catalog.loadTutorialDefinitions has cyclomatic complexity 41 (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.
Store.CommitPackOpening (cyclomatic 38) internal/store/packs.go:345— Store.CommitPackOpening has cyclomatic complexity 38 (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.
controlcli.Run (cyclomatic 37) internal/controlcli/run.go:20— controlcli.Run has cyclomatic complexity 37 (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.
android.Inspect (cyclomatic 34) internal/android/source.go:48— android.Inspect has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Store.Snapshot (cyclomatic 33) internal/store/snapshot.go:40— Store.Snapshot has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
main.runPanel (cyclomatic 29) cmd/ptcgp-server/main.go:54— main.runPanel has cyclomatic complexity 29 (threshold 15). Of this number, 19 points are the body's own statements and 10 belong to 6 function literals inside it that branch. 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.
Manager.Apply (cyclomatic 29) internal/player/manager.go:464— Manager.Apply has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Store.ExchangeCardCosmetics (cyclomatic 29) internal/store/card_exchange.go:23— Store.ExchangeCardCosmetics has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AccountsPage::render_profile (cyclomatic 29) desktop/src/ui/pages/accounts.rs:686— AccountsPage::render_profile has cyclomatic complexity 29 (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.
NativeRunner.fullStatus (cyclomatic 28) REDACTED:135— NativeRunner.fullStatus has cyclomatic complexity 28 (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.
localtls.EnsureFiles (cyclomatic 28) internal/localtls/ensure.go:18— localtls.EnsureFiles has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Engine.validateRule (cyclomatic 28) internal/packlab/engine.go:192— Engine.validateRule has cyclomatic complexity 28 (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.
specialPackServer.PurchaseV1 (cyclomatic 28) internal/playerapi/special_pack_handlers.go:52— specialPackServer.PurchaseV1 has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TrafficPage::render (cyclomatic 28) desktop/src/ui/pages/traffic.rs:224— TrafficPage::render has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ptcgp_reader::run (cyclomatic 28) native/reader/src/main.rs:39— ptcgp_reader::run has cyclomatic complexity 28 (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.
android.discoverDevices (cyclomatic 27) internal/android/discovery.go:264— android.discoverDevices has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Catalog.loadCardExchanges (cyclomatic 27) internal/catalog/catalog.go:1214— Catalog.loadCardExchanges has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Handler.ServeHTTP (cyclomatic 27) internal/restapi/handler.go:46— Handler.ServeHTTP has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Palette::new (cyclomatic 26) desktop/src/theme.rs:221— Palette::new has cyclomatic complexity 26 (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.
android.listDevices (cyclomatic 25) internal/android/devices.go:131— android.listDevices has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MultiRunner.Status (cyclomatic 25) internal/control/emulators.go:314— MultiRunner.Status has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NativeRunner.Action (cyclomatic 25) REDACTED:385— NativeRunner.Action has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Config.Validate (cyclomatic 24) internal/configuration/config.go:227— Config.Validate has cyclomatic complexity 24 (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.
Store.CommitTutorialGrant (cyclomatic 24) internal/store/tutorial.go:97— Store.CommitTutorialGrant has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Handler.profileInventory (cyclomatic 23) REDACTED:403— Handler.profileInventory has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Catalog.loadGameplayDefinitions (cyclomatic 23) internal/catalog/catalog.go:981— Catalog.loadGameplayDefinitions has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Manager.Profile (cyclomatic 23) internal/player/manager.go:262— Manager.Profile has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
packShopServer.PurchaseV2 (cyclomatic 23) internal/playerapi/pack_handlers.go:111— packShopServer.PurchaseV2 has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
store.seedInventory (cyclomatic 23) internal/store/profile_lifecycle.go:69— store.seedInventory has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Handler.login (cyclomatic 22) internal/restapi/handler.go:161— Handler.login has cyclomatic complexity 22 (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.
Store.migrate (cyclomatic 22) REDACTED:561— Store.migrate has cyclomatic complexity 22 (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.
android.describeDevice (cyclomatic 21) internal/android/devices.go:227— android.describeDevice has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
android.parseIdentity (cyclomatic 20) internal/android/devices.go:43— android.parseIdentity has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
server.Run (cyclomatic 20) internal/server/server.go:50— server.Run has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
Store.migrateLegacy (cyclomatic 20) REDACTED:845— Store.migrateLegacy has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Store.SetCardLanguage (cyclomatic 20) internal/store/store.go:490— Store.SetCardLanguage has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Catalog.loadCosmetics (cyclomatic 19) internal/catalog/catalog.go:1482— Catalog.loadCosmetics has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Engine.draw (cyclomatic 19) internal/packlab/engine.go:260— Engine.draw has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Manager.PurchaseShopProduct (cyclomatic 19) internal/player/manager.go:938— Manager.PurchaseShopProduct has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Catalog.loadPackTables (cyclomatic 18) internal/catalog/catalog.go:1261— Catalog.loadPackTables has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
control.NewMultiRunner (cyclomatic 18) internal/control/emulators.go:67— control.NewMultiRunner has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
playerapi.appendInventoryChange (cyclomatic 18) internal/playerapi/acquisition_helpers.go:32— playerapi.appendInventoryChange has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
playerapi.toProtoResources (cyclomatic 18) internal/playerapi/stateful_reads.go:336— playerapi.toProtoResources has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Store.GiveCard (cyclomatic 18) internal/store/card_social.go:69— Store.GiveCard 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.
Store.CommitFeedChallenge (cyclomatic 18) internal/store/feed.go:177— Store.CommitFeedChallenge 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.
Store.CommitShopPurchase (cyclomatic 18) internal/store/item_shop.go:28— Store.CommitShopPurchase 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.
Store.ExchangePackPoints (cyclomatic 18) internal/store/packs.go:298— Store.ExchangePackPoints 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.
Store.DeletePlayer (cyclomatic 18) internal/store/profile_lifecycle.go:220— Store.DeletePlayer has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Store.HealTradePower (cyclomatic 18) internal/store/trade.go:26— Store.HealTradePower 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.
Store.SubmitTrade (cyclomatic 18) internal/store/trade_sessions.go:45— Store.SubmitTrade 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.
LogsPage::render (cyclomatic 18) desktop/src/ui/pages/logs.rs:106— LogsPage::render 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.
SettingsPage::render_interface (cyclomatic 18) desktop/src/ui/pages/settings.rs:323— SettingsPage::render_interface 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.
Handler.cardBrowser (cyclomatic 17) REDACTED:657— Handler.cardBrowser has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
NativeRunner.configureTunnel (cyclomatic 17) internal/control/tunnel.go:43— NativeRunner.configureTunnel has cyclomatic complexity 17 (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.
startupCardServer.GetUsageV1 (cyclomatic 17) internal/playerapi/card_handlers.go:50— startupCardServer.GetUsageV1 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.
servercmd.run (cyclomatic 17) internal/servercmd/servercmd.go:38— servercmd.run 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.
store.changeShopInventory (cyclomatic 17) internal/store/item_shop.go:84— store.changeShopInventory has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Store.HealEventPower (cyclomatic 17) internal/store/activities.go:148— Store.HealEventPower has cyclomatic complexity 17 (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.
Store.HealChallengePower (cyclomatic 17) internal/store/feed.go:247— Store.HealChallengePower has cyclomatic complexity 17 (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.
Handler.trafficStream (cyclomatic 16) REDACTED:233— Handler.trafficStream has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
configuration.Load (cyclomatic 16) internal/configuration/config.go:175— configuration.Load has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
localtls.GenerateFiles (cyclomatic 16) REDACTED:27— localtls.GenerateFiles has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
collectionServer.collectionShowcases (cyclomatic 16) internal/playerapi/collection_handlers.go:164— collectionServer.collectionShowcases has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Store.AuthorizeEmulator (cyclomatic 16) internal/store/emulators.go:137— Store.AuthorizeEmulator has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Store.BeginFeedSnoop (cyclomatic 16) internal/store/feed.go:79— Store.BeginFeedSnoop has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Store.AcceptTrade (cyclomatic 16) internal/store/trade_sessions.go:103— Store.AcceptTrade has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ptcgp_private_server::ui::pages::traffic::indent_json (cyclomatic 16) desktop/src/ui/pages/traffic.rs:77— ptcgp_private_server::ui::pages::traffic::indent_json has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Manager.Prepare (cognitive 183) internal/provision/provision.go:363— Manager.Prepare has cognitive complexity 183 (threshold 15). Drivers by points: if/else 75 (161 pts), loops 10 (14 pts), boolean chains 8 (nesting depth added 90). Of this number, 170 points are the body's own statements and 13 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeRunner.setupAndroid (cognitive 99) internal/control/android_setup.go:293— NativeRunner.setupAndroid has cognitive complexity 99 (threshold 15). Drivers by points: if/else 53 (90 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 38). 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.
MultiRunner.Status (cognitive 67) internal/control/emulators.go:314— MultiRunner.Status has cognitive complexity 67 (threshold 15). Drivers by points: if/else 19 (61 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Catalog.load (cognitive 65) internal/catalog/catalog.go:806— Catalog.load has cognitive complexity 65 (threshold 15). Drivers by points: if/else 33 (46 pts), loops 13 (18 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ptcgp_reader::run (cognitive 64) native/reader/src/main.rs:39— ptcgp_reader::run has cognitive complexity 64 (threshold 15). Drivers by points: if/else 20 (45 pts), loops 7 (14 pts), match/switch 2 (5 pts) (nesting depth added 35). 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.
TrafficPage::render (cognitive 57) desktop/src/ui/pages/traffic.rs:224— TrafficPage::render has cognitive complexity 57 (threshold 15). Drivers by points: if/else 40 (52 pts), boolean chains 4, match/switch 1 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Store.CommitPackOpening (cognitive 56) internal/store/packs.go:345— Store.CommitPackOpening has cognitive complexity 56 (threshold 15). Drivers by points: if/else 30 (48 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Engine.validateRule (cognitive 54) internal/packlab/engine.go:192— Engine.validateRule has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (42 pts), loops 3 (6 pts), boolean chains 5, match/switch 1 (nesting depth added 28). 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.
android.listDevices (cognitive 50) internal/android/devices.go:131— android.listDevices has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (43 pts), loops 5, boolean chains 2 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Handler.ServeHTTP (cognitive 50) REDACTED:171— Handler.ServeHTTP has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 14, loops 1 (3 pts), match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Catalog.loadTutorialDefinitions (cognitive 48) internal/catalog/catalog.go:1082— Catalog.loadTutorialDefinitions has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (30 pts), loops 9 (12 pts), boolean chains 6 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.Snapshot (cognitive 47) internal/store/snapshot.go:40— Store.Snapshot has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (36 pts), loops 9 (11 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Palette::new (cognitive 47) desktop/src/theme.rs:221— Palette::new has cognitive complexity 47 (threshold 15). Drivers by points: if/else 46, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
android.Inspect (cognitive 46) internal/android/source.go:48— android.Inspect has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (36 pts), loops 4 (5 pts), boolean chains 4, match/switch 1 (nesting depth added 13). Of this number, 45 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Handler.serveAPI (cognitive 45) REDACTED:121— Handler.serveAPI has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 24, if/else 10 (20 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Store.ExchangeCardCosmetics (cognitive 44) internal/store/card_exchange.go:23— Store.ExchangeCardCosmetics has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (37 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.Apply (cognitive 41) internal/player/manager.go:464— Manager.Apply has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 5, loops 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeRunner.Action (cognitive 40) REDACTED:385— NativeRunner.Action has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (37 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
store.seedInventory (cognitive 40) internal/store/profile_lifecycle.go:69— store.seedInventory has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 9 (11 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
android.discoverDevices (cognitive 39) internal/android/discovery.go:264— android.discoverDevices has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 7 (10 pts), boolean chains 5 (nesting depth added 14). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeRunner.fullStatus (cognitive 39) REDACTED:135— NativeRunner.fullStatus has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (27 pts), match/switch 3 (7 pts), boolean chains 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Handler.profileInventory (cognitive 36) REDACTED:403— Handler.profileInventory has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 6 (13 pts), boolean chains 4, match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
controlcli.Run (cognitive 34) internal/controlcli/run.go:20— controlcli.Run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24 (28 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Manager.Profile (cognitive 33) internal/player/manager.go:262— Manager.Profile has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 6 (7 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
packShopServer.PurchaseV2 (cognitive 32) internal/playerapi/pack_handlers.go:111— packShopServer.PurchaseV2 has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 6 (12 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
specialPackServer.PurchaseV1 (cognitive 32) internal/playerapi/special_pack_handlers.go:52— specialPackServer.PurchaseV1 has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (22 pts), loops 4 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 7). 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.
main.runPanel (cognitive 31) cmd/ptcgp-server/main.go:54— main.runPanel has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 2, match/switch 2 (nesting depth added 3). Of this number, 21 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Catalog.loadGameplayDefinitions (cognitive 31) internal/catalog/catalog.go:981— Catalog.loadGameplayDefinitions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 7 (9 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.SetCardLanguage (cognitive 31) internal/store/store.go:490— Store.SetCardLanguage has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (27 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Catalog.loadPackTables (cognitive 28) internal/catalog/catalog.go:1261— Catalog.loadPackTables has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 6 (9 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.migrate (cognitive 28) REDACTED:561— Store.migrate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), loops 5 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
localtls.EnsureFiles (cognitive 27) internal/localtls/ensure.go:18— localtls.EnsureFiles has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 4, loops 2 (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.
Store.CommitTutorialGrant (cognitive 27) internal/store/tutorial.go:97— Store.CommitTutorialGrant has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
main.backupBeforeUpgrade (cognitive 26) cmd/ptcgp-server/main.go:233— main.backupBeforeUpgrade has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Config.Validate (cognitive 26) internal/configuration/config.go:227— Config.Validate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 5, boolean chains 3 (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.
packlab.catalogRarityCodes (cognitive 26) internal/packlab/engine.go:518— packlab.catalogRarityCodes has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (11 pts) (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Store.migrateLegacy (cognitive 26) REDACTED:845— Store.migrateLegacy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Catalog.loadItems (cognitive 25) internal/catalog/catalog.go:1420— Catalog.loadItems has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Catalog.loadCosmetics (cognitive 25) internal/catalog/catalog.go:1482— Catalog.loadCosmetics has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 5, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
android.describeDevice (cognitive 24) internal/android/devices.go:227— android.describeDevice has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 3 (4 pts), match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
control.NewMultiRunner (cognitive 24) internal/control/emulators.go:67— control.NewMultiRunner has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
packServer.GetDetailV2 (cognitive 24) internal/playerapi/pack_handlers.go:58— packServer.GetDetailV2 has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 3 (6 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
startupCardServer.GetUsageV1 (cognitive 24) internal/playerapi/card_handlers.go:50— startupCardServer.GetUsageV1 has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 7 (10 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
collectionServer.collectionShowcases (cognitive 24) internal/playerapi/collection_handlers.go:164— collectionServer.collectionShowcases has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 10). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Handler.login (cognitive 24) internal/restapi/handler.go:161— Handler.login has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Store.SendFriendRequests (cognitive 24) internal/store/social.go:105— Store.SendFriendRequests has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Catalog.loadCardExchanges (cognitive 23) internal/catalog/catalog.go:1214— Catalog.loadCardExchanges has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 8, loops 4, match/switch 1 (2 pts) (nesting depth added 5). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cardSkinServer.ExchangeV2 (cognitive 23) internal/playerapi/card_skin_handlers.go:54— cardSkinServer.ExchangeV2 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
collectionServer.deriveBestCollection (cognitive 23) internal/playerapi/collection_handlers.go:213— collectionServer.deriveBestCollection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Store.DeletePlayer (cognitive 23) internal/store/profile_lifecycle.go:220— Store.DeletePlayer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.EnsurePlayer (cognitive 23) internal/store/store.go:180— Store.EnsurePlayer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (23 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
configuration.Load (cognitive 22) internal/configuration/config.go:175— configuration.Load has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiRunner.device (cognitive 22) internal/control/emulators.go:158— MultiRunner.device has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
playerapi.appendInventoryChange (cognitive 21) internal/playerapi/acquisition_helpers.go:32— playerapi.appendInventoryChange has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
startupFeedServer.feedTimeline (cognitive 21) internal/playerapi/feed_handlers.go:113— startupFeedServer.feedTimeline has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 pts), boolean chains 2 (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.
LogsPage::render (cognitive 21) desktop/src/ui/pages/logs.rs:106— LogsPage::render has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, boolean chains 4, match/switch 2. 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.
Handler.trafficStream (cognitive 20) REDACTED:233— Handler.trafficStream has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Handler.cardBrowser (cognitive 20) REDACTED:657— Handler.cardBrowser has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 7 (8 pts), boolean chains 4 (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.
NativeRunner.configureTunnel (cognitive 20) internal/control/tunnel.go:43— NativeRunner.configureTunnel has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Manager.ExchangeCardCosmetics (cognitive 20) internal/player/manager.go:1510— Manager.ExchangeCardCosmetics has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
collectionServer.GetSomeonesV1 (cognitive 20) internal/playerapi/collection_handlers.go:117— collectionServer.GetSomeonesV1 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.FeedEntries (cognitive 20) internal/store/feed.go:31— Store.FeedEntries has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Api::traffic_stream (cognitive 20) desktop/src/api.rs:509— Api::traffic_stream has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
localtls.GenerateFiles (cognitive 19) REDACTED:27— localtls.GenerateFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Engine.draw (cognitive 19) internal/packlab/engine.go:260— Engine.draw has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.ClaimMissions (cognitive 19) internal/store/progression.go:130— Store.ClaimMissions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.HealTradePower (cognitive 19) internal/store/trade.go:26— Store.HealTradePower has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Handler.packStudio (cognitive 18) REDACTED:836— Handler.packStudio has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 3 (4 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
server.Run (cognitive 18) internal/server/server.go:50— server.Run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2, match/switch 2 (nesting depth added 1). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
Store.HealEventPower (cognitive 18) internal/store/activities.go:148— Store.HealEventPower has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Store.HealChallengePower (cognitive 18) internal/store/feed.go:247— Store.HealChallengePower has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Store.SubmitTrade (cognitive 18) internal/store/trade_sessions.go:45— Store.SubmitTrade has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1, loops 1 (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.
binarypatch.Apply (cognitive 17) internal/binarypatch/patch.go:114— binarypatch.Apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiRunner.SelectDevice (cognitive 17) internal/control/emulators.go:273— MultiRunner.SelectDevice has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.CommitShopPurchase (cognitive 17) internal/store/item_shop.go:28— Store.CommitShopPurchase has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, loops 1 (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.
Store.SocialSnapshot (cognitive 17) internal/store/social.go:27— Store.SocialSnapshot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (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.
Store.ReceiveTradeDeposit (cognitive 17) internal/store/trade_sessions.go:224— Store.ReceiveTradeDeposit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
android.parseIdentity (cognitive 16) internal/android/devices.go:43— android.parseIdentity has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), loops 2, match/switch 1 (2 pts) (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.
MultiRunner.stopAll (cognitive 16) internal/control/emulators.go:427— MultiRunner.stopAll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts) (nesting depth added 6). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.PurchaseShopProduct (cognitive 16) internal/player/manager.go:938— Manager.PurchaseShopProduct has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.ClaimMissions (cognitive 16) internal/player/manager.go:1050— Manager.ClaimMissions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.GiveCard (cognitive 16) internal/store/card_social.go:69— Store.GiveCard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Store.Decks (cognitive 16) internal/store/decks.go:20— Store.Decks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.CommitFeedChallenge (cognitive 16) internal/store/feed.go:177— Store.CommitFeedChallenge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Store.SavePackRule (cognitive 16) internal/store/packs.go:237— Store.SavePackRule has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Store.CompleteTrophies (cognitive 16) internal/store/trophies.go:35— Store.CompleteTrophies has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) internal/store/packs.go:101— internal/store/packs.go:101-150 | internal/store/packs.go:186-235 — These two members are one piece of code written twice and then edited apart: 50 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, 48+ corresponding lines) · ×1
Edited copies of one member (3 members, 48+ corresponding lines) internal/store/activities.go:148— internal/store/activities.go:148-198 | internal/store/feed.go:247-294 | internal/store/trade.go:26-78 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 48 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 (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) internal/store/trade_sessions.go:176— internal/store/trade_sessions.go:176-222 | internal/store/trade_sessions.go:224-273 — These two members are one piece of code written twice and then edited apart: 47 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 (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) internal/store/item_shop.go:28— internal/store/item_shop.go:28-76 | internal/store/packs.go:298-343 — These two members are one piece of code written twice and then edited apart: 46 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 (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) internal/playerapi/showcase_handlers.go:49— internal/playerapi/showcase_handlers.go:49-76 | internal/playerapi/showcase_handlers.go:166-193 — These two members are one piece of code written twice and then edited apart: 28 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 (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) internal/store/packs.go:153— internal/store/packs.go:153-184 | internal/store/packs.go:237-271 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) internal/playerapi/trade_lifecycle.go:39— internal/playerapi/trade_lifecycle.go:39-74 | internal/playerapi/trade_lifecycle.go:76-106 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) internal/playerapi/present_handlers.go:32— internal/playerapi/present_handlers.go:32-61 | internal/playerapi/present_handlers.go:63-89 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 22+ corresponding lines) · ×1
Edited copies of one member (4 members, 22+ corresponding lines) internal/playerapi/solo_battle_handlers.go:59— internal/playerapi/solo_battle_handlers.go:59-80 | internal/playerapi/solo_battle_handlers.go:104-125 | internal/playerapi/startup_servers.gen.go:123-144 | internal/playerapi/startup_servers.gen.go:146-169 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) internal/playerapi/startup_servers.gen.go:171— internal/playerapi/startup_servers.gen.go:171-189 | internal/playerapi/startup_servers.gen.go:191-209 | internal/playerapi/startup_servers.gen.go:211-229 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) REDACTED:745— REDACTED:745-770 | internal/store/snapshot.go:173-191 — These two members are one piece of code written twice and then edited apart: 19 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, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) internal/store/profile_emblems.go:25— internal/store/profile_emblems.go:25-47 | internal/store/social.go:150-168 | internal/store/store.go:461-478 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) internal/playerapi/friend_handlers.go:137— internal/playerapi/friend_handlers.go:137-151 | internal/playerapi/stateful_reads.go:208-222 | internal/playerapi/stateful_reads.go:223-237 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 18+ corresponding lines) · ×1
Edited copies of one member (5 members, 18+ corresponding lines) internal/store/card_exchange.go:102— internal/store/card_exchange.go:102-119 | internal/store/card_social.go:124-141 | internal/store/card_stocks.go:10-28 | internal/store/level_history.go:13-30 | internal/store/progression.go:17-34 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) desktop/src/ui/tasks.rs:12— desktop/src/ui/tasks.rs:12-23 | desktop/src/ui/tasks.rs:32-43 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) internal/player/manager.go:908— internal/player/manager.go:908-919 | internal/player/manager.go:1313-1324 | internal/player/manager.go:1614-1625 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) internal/restapi/handler.go:346— internal/restapi/handler.go:346-354 | internal/store/store.go:963-968 | internal/store/store.go:991-999 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) internal/store/action_states.go:93— internal/store/action_states.go:93-108 | internal/store/card_social.go:35-50 | internal/store/profile_emblems.go:8-23 | internal/store/showcases.go:53-68 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) internal/store/emulators.go:64— internal/store/emulators.go:64-79 | internal/store/store.go:559-577 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) internal/store/emulators.go:120— internal/store/emulators.go:120-133 | internal/store/social.go:191-207 | internal/store/store.go:672-686 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) internal/playerapi/card_handlers.go:125— internal/playerapi/card_handlers.go:125-131 | internal/playerapi/solo_battle_handlers.go:200-206 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) internal/store/decks.go:98— internal/store/decks.go:98-107 | internal/store/preferences.go:91-100 | internal/store/showcases.go:79-88 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (21 lines × 2) internal/store/packs.go:130— internal/store/packs.go:130-150 | internal/store/packs.go:215-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/store/packs.go:130` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (16 lines × 2) internal/playerapi/trade_lifecycle.go:40— internal/playerapi/trade_lifecycle.go:40-55 | internal/playerapi/trade_lifecycle.go:77-92 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) internal/store/progression.go:153— internal/store/progression.go:153-166 | internal/store/progression.go:196-209 — 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 `internal/store/progression.go:153` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) internal/player/manager.go:679— internal/player/manager.go:679-691 | internal/store/store.go:762-774 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (17 lines × 3) internal/playerapi/solo_battle_handlers.go:60— internal/playerapi/solo_battle_handlers.go:60-76 | internal/playerapi/solo_battle_handlers.go:128-144 | internal/playerapi/startup_servers.gen.go:147-163 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) internal/store/profile_lifecycle.go:43— internal/store/profile_lifecycle.go:43-57 | internal/store/store.go:329-343 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/store/profile_lifecycle.go:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 2) internal/store/feed.go:117— internal/store/feed.go:117-125 | internal/store/feed.go:209-217 — 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 `internal/store/feed.go: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (2–6 lines × 3) internal/restapi/handler.go:347— internal/restapi/handler.go:347-352 | internal/store/store.go:965-966 | internal/store/store.go:992-997 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (18 lines × 2) internal/store/packs.go:108— internal/store/packs.go:108-125 | internal/store/packs.go:193-210 — 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 `internal/store/packs.go:108` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 3) internal/store/profile_lifecycle.go:49— internal/store/profile_lifecycle.go:49-53 | internal/store/profile_lifecycle.go:139-143 | internal/store/store.go:335-339 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (12 lines × 2) native/importer/src/crypto.rs:144— native/importer/src/crypto.rs:144-155 | native/importer/src/crypto.rs:156-167 — 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.
Off the main sequence: ptcgp-importer — ptcgp-importer: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
P4 · Deployment & Rollback· No deployment automation · ×1
No deployment automation — No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.
X2 · Cancellation propagation· Function without context.Context · ×1
Function without context.Context: runAssetProbe internal/servercmd/probe.go:21— `runAssetProbe` calls `http.NewRequestWithContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Duplicated predicate internal/store/activities.go:149— `chargerAmount < 0 || pokeGoldAmount < 0 || chargerAmount+pokeGoldAmount == 0 || pokeGoldAmount > 8` appears character-identically in 2 files — internal/store/activities.go, internal/store/trade.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate internal/store/collections.go:70— `err != nil && !errors.Is(err, sql.ErrNoRows)` appears character-identically in 3 files — internal/store/collections.go, internal/store/progression.go, internal/store/tutorial.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate cmd/ptcgp-server/main.go:196— `err != nil && err != http.ErrServerClosed` appears character-identically in 2 files — cmd/ptcgp-server/main.go, internal/server/server.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate internal/playerapi/feed_handlers.go:78— `errors.Is(err, store.ErrInsufficientInventory) || errors.Is(err, store.ErrRuleViolation)` appears character-identically in 3 files — internal/playerapi/feed_handlers.go, internal/playerapi/item_shop_handlers.go, internal/playerapi/trade_reads.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate internal/player/manager.go:681— `value.Completed && value.Step > completed[value.TutorialID]` appears character-identically in 2 files — internal/player/manager.go, internal/store/store.go. 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.
Silent fallback default on error internal/android/wireless.go:90— `announcedEndpoint` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error REDACTED:265— `savedMode` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error internal/control/process.go:40— `processPID` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error internal/playerapi/server.go:98— `trafficPlayerID` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
No ADRs found native/reader/src/main.rs: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 `native/reader/src/main.rs` makes this repository a deployable product (line 1).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion REDACTED:1— `(repository root)` (25166 LoC, 189 module-visible types across 27 directories) overshoots its size bounds. 1 of 4 build unit(s) (Cargo, Go) overshoot their size bounds, lowering Project Cohesion to 5.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
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.
Logging is not universal — Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `desktop`, `native/reader`.
No SAST REDACTED:6— No static application security testing detected. For this repository's stack, add gosec / govulncheck (or golangci-lint) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation REDACTED:5— `REDACTED` 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`.
X2 · Cancellation propagation· Not all functions that make a request accept a context.Context · ×1
Not all functions that make a request accept a context.Context — Only 4/5 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up — a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Outdated: golang.org/x/net — `golang.org/x/net` is required at v0.53.0 in REDACTED, but v0.62.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/net@v0.62.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/sys — `golang.org/x/sys` is required at v0.43.0 in REDACTED, but v0.50.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/sys@v0.50.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: google.golang.org/grpc — `google.golang.org/grpc` is required at v1.82.1 in REDACTED, but v1.85.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get google.golang.org/grpc@v1.85.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: google.golang.org/protobuf — `google.golang.org/protobuf` is required at v1.36.11 in REDACTED, but v1.36.12 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get google.golang.org/protobuf@v1.36.12 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: modernc.org/sqlite — `modernc.org/sqlite` is required at v1.48.1 in REDACTED, but v1.62.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get modernc.org/sqlite@v1.62.0 && go mod tidy` and commit the updated REDACTED and go.sum.
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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
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 01a1e7a6-63e2-7ba0-8b88-ea3a9acc2f88 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 11 · Warnings: 446 · Recommendations: 39 · Info: 5 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 03:56 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.