Public report of tokio-rs/topcoat, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 19:47 UTC · Survey ID cd_f756050345cf496facf837cd28afc34d
tokio-rs/topcoat
Measured 14 November 2026, 19:47 UTC, at code version 9da731e
Code coverage is not measured: .NET and JavaScript/TypeScript suite (CouldNotMeasureEnvironment, CouldNotMeasureNoCollector).
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 12 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 136,218 lines of product code in 38 projects, tests not counted · Estimated rebuild effort: about 1.1 person-years · Weakest lens: Security and Compliance, 30
Findings by how serious they are
43 critical328 serious43 minor
15 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 19:47 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
46of 46 dimensions measured by tools.
395of 414 findings point to an exact file and line, so you can open each one in the code. The other 19 concern the repository as a whole, such as missing documentation.
46dimensions across 7 lenses, read from 136,218 lines of product code in 38 projects.
tokio-rs/topcoat falls short of our standard for a preview release, in part because we found no access checks on the code's endpoints or handlers. It scores 55 out of 100 and is rated Adequate, and 42 of its 43 critical findings are security problems.
Security and Compliance, at 30, is the weakest lens and counts most in the score. The best first step is adding access checks, worth about 16 points. Adding the security headers comes next, worth about 7 points. Raising Security and Compliance to 68 would lift the score to about 73.
Twenty-nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Eight known security holes in the packages the code depends on can be used by attackers, and four secrets can leak from the build pipeline. Pinning each tool to an exact version, updating the vulnerable packages and limiting each secret to its own step would close these risks. Fixing the weaknesses the scanner points to would fix the security weakness in the code. The error that is caught and ignored needs handling or logging instead of being ignored.
The product code is 136,218 lines, about €170,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 Security and Compliance rose from 30 to 68, the lowest score rated Strong, the score would rise from 55 to about 73.
Code composition: what the lines of code are
Business logic 1%Supporting code 2%Tests 97%
New since the last survey: 159 findings
These 159 critical or serious findings weren't in the previous survey, on 28 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Edited copy of a member (99 corresponding lines) demos/admin/src/app/_admin/orders.rs
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 37 findings
These 37 critical or serious findings were in the previous survey, on 28 October 2026, and are gone from this one.
€55,000 to €280,000, for 918 to 2,911 hours of work, about 1.1 person-years for 1 to 3 engineers
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 55. 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
Large: 136,218 lines of product code
Comment lines
The estimate prices 136,099 lines. Comment lines count towards the size of 136,218 lines but aren't priced as work.
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.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Protect endpoints by default-deny: [Authorize] + role/policy authorization, or imperative guard methods (throw-on-violation) called from every handler.
Raises the score by about 16 points · Medium effort · Access Controls
2
Add security response headers (Content-Security-Policy first, then Strict-Transport-Security, X-Content-Type-Options and a frame policy) — defense in depth, even when a reverse proxy could set them.
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.
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 €170,000 to build again, about 1.1 person-years of work. Its weakest lens is Security and Compliance, at 30 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Protect endpoints by default-deny: [Authorize] + role/policy authorization, or imperative guard methods (throw-on-violation) called from every handler. Of all the actions in this report, it raises the score most for the work it takes: about 16 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
578 modules, with 1469 dependencies between them. 20 loops run through 72 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 538 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.
topcoat_core.context uses topcoat_core.context.context_map, so a change to topcoat_core.context.context_map can break topcoat_core.context, while a change to topcoat_core.context can't break topcoat_core.context.context_map.
Position
Below the diagonal: topcoat_core.context uses a module listed above it, which is the healthy direction.
topcoat_core_grammar.common.pretty.pretty_print uses topcoat_core_grammar.common.pretty.printer, so a change to topcoat_core_grammar.common.pretty.printer can break topcoat_core_grammar.common.pretty.pretty_print, while a change to topcoat_core_grammar.common.pretty.pretty_print can't break topcoat_core_grammar.common.pretty.printer.
Position
Below the diagonal: topcoat_core_grammar.common.pretty.pretty_print uses a module listed above it, which is the healthy direction.
topcoat_view.region uses topcoat_view.format, so a change to topcoat_view.format can break topcoat_view.region, while a change to topcoat_view.region can't break topcoat_view.format.
Position
Below the diagonal: topcoat_view.region uses a module listed above it, which is the healthy direction.
topcoat_cookie uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_cookie, while a change to topcoat_cookie can't break topcoat_core.context.
Position
Below the diagonal: topcoat_cookie uses a module listed above it, which is the healthy direction.
topcoat_core.error uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_core.error, while a change to topcoat_core.error can't break topcoat_core.context.
Position
Below the diagonal: topcoat_core.error uses a module listed above it, which is the healthy direction.
topcoat_core_grammar.common.lenient.expr uses topcoat_core_grammar.common.pretty.printer, so a change to topcoat_core_grammar.common.pretty.printer can break topcoat_core_grammar.common.lenient.expr, while a change to topcoat_core_grammar.common.lenient.expr can't break topcoat_core_grammar.common.pretty.printer.
Position
Below the diagonal: topcoat_core_grammar.common.lenient.expr uses a module listed above it, which is the healthy direction.
topcoat_core_grammar.common.lenient.expr uses topcoat_core_grammar.common.pretty.span, so a change to topcoat_core_grammar.common.pretty.span can break topcoat_core_grammar.common.lenient.expr, while a change to topcoat_core_grammar.common.lenient.expr can't break topcoat_core_grammar.common.pretty.span.
Position
Below the diagonal: topcoat_core_grammar.common.lenient.expr uses a module listed above it, which is the healthy direction.
topcoat_core_grammar.common.lenient.expr uses topcoat_core_grammar.common.pretty.pretty_print, so a change to topcoat_core_grammar.common.pretty.pretty_print can break topcoat_core_grammar.common.lenient.expr, while a change to topcoat_core_grammar.common.lenient.expr can't break topcoat_core_grammar.common.pretty.pretty_print.
Position
Below the diagonal: topcoat_core_grammar.common.lenient.expr uses a module listed above it, which is the healthy direction.
topcoat_core_grammar.common.lenient.item uses topcoat_core_grammar.common.pretty.printer, so a change to topcoat_core_grammar.common.pretty.printer can break topcoat_core_grammar.common.lenient.item, while a change to topcoat_core_grammar.common.lenient.item can't break topcoat_core_grammar.common.pretty.printer.
Position
Below the diagonal: topcoat_core_grammar.common.lenient.item uses a module listed above it, which is the healthy direction.
topcoat_core_grammar.common.lenient.item uses topcoat_core_grammar.common.pretty.pretty_print, so a change to topcoat_core_grammar.common.pretty.pretty_print can break topcoat_core_grammar.common.lenient.item, while a change to topcoat_core_grammar.common.lenient.item can't break topcoat_core_grammar.common.pretty.pretty_print.
Position
Below the diagonal: topcoat_core_grammar.common.lenient.item uses a module listed above it, which is the healthy direction.
topcoat_metadata.page_metadata uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_metadata.page_metadata, while a change to topcoat_metadata.page_metadata can't break topcoat_core.context.
Position
Below the diagonal: topcoat_metadata.page_metadata uses a module listed above it, which is the healthy direction.
topcoat_router.response uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_router.response, while a change to topcoat_router.response can't break topcoat_core.context.
Position
Below the diagonal: topcoat_router.response uses a module listed above it, which is the healthy direction.
17→20 topcoat_router.response uses topcoat_router.bodypart of a loop✕
Connections
1 pair of types, where a type in topcoat_router.response uses a type in topcoat_router.body.
topcoat_router.response uses topcoat_router.body, so a change to topcoat_router.body can break topcoat_router.response, while a change to topcoat_router.response can't break topcoat_router.body.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
topcoat_view.html.node uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_view.html.node, while a change to topcoat_view.html.node can't break topcoat_core.context.
Position
Below the diagonal: topcoat_view.html.node uses a module listed above it, which is the healthy direction.
18→30 topcoat_view.html.node uses topcoat_view.buffer.partpart of a loop✕
Connections
1 pair of types, where a type in topcoat_view.html.node uses a type in topcoat_view.buffer.part.
topcoat_view.html.node uses topcoat_view.buffer.part, so a change to topcoat_view.buffer.part can break topcoat_view.html.node, while a change to topcoat_view.html.node can't break topcoat_view.buffer.part.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
topcoat_view_grammar.live uses topcoat_core_grammar.common.pretty.printer, so a change to topcoat_core_grammar.common.pretty.printer can break topcoat_view_grammar.live, while a change to topcoat_view_grammar.live can't break topcoat_core_grammar.common.pretty.printer.
Position
Below the diagonal: topcoat_view_grammar.live uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.live uses topcoat_core_grammar.common.pretty.pretty_print, so a change to topcoat_core_grammar.common.pretty.pretty_print can break topcoat_view_grammar.live, while a change to topcoat_view_grammar.live can't break topcoat_core_grammar.common.pretty.pretty_print.
Position
Below the diagonal: topcoat_view_grammar.live uses a module listed above it, which is the healthy direction.
topcoat_router.body uses topcoat_view.format, so a change to topcoat_view.format can break topcoat_router.body, while a change to topcoat_router.body can't break topcoat_view.format.
Position
Below the diagonal: topcoat_router.body uses a module listed above it, which is the healthy direction.
topcoat_router.body uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_router.body, while a change to topcoat_router.body can't break topcoat_core.context.
Position
Below the diagonal: topcoat_router.body uses a module listed above it, which is the healthy direction.
topcoat_router.body uses topcoat_core.error, so a change to topcoat_core.error can break topcoat_router.body, while a change to topcoat_router.body can't break topcoat_core.error.
Position
Below the diagonal: topcoat_router.body uses a module listed above it, which is the healthy direction.
topcoat_router.body uses topcoat_router.response, so a change to topcoat_router.response can break topcoat_router.body, while a change to topcoat_router.body can't break topcoat_router.response.
Position
Below the diagonal: topcoat_router.body uses a module listed above it, which is the healthy direction.
topcoat_router.path uses topcoat_view.format, so a change to topcoat_view.format can break topcoat_router.path, while a change to topcoat_router.path can't break topcoat_view.format.
Position
Below the diagonal: topcoat_router.path uses a module listed above it, which is the healthy direction.
topcoat_router.path uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_router.path, while a change to topcoat_router.path can't break topcoat_core.context.
Position
Below the diagonal: topcoat_router.path uses a module listed above it, which is the healthy direction.
topcoat_router.path uses topcoat_core.error, so a change to topcoat_core.error can break topcoat_router.path, while a change to topcoat_router.path can't break topcoat_core.error.
Position
Below the diagonal: topcoat_router.path uses a module listed above it, which is the healthy direction.
topcoat_view.buffer.handle uses topcoat_view.format, so a change to topcoat_view.format can break topcoat_view.buffer.handle, while a change to topcoat_view.buffer.handle can't break topcoat_view.format.
Position
Below the diagonal: topcoat_view.buffer.handle uses a module listed above it, which is the healthy direction.
topcoat_view.buffer.handle uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_view.buffer.handle, while a change to topcoat_view.buffer.handle can't break topcoat_core.context.
Position
Below the diagonal: topcoat_view.buffer.handle uses a module listed above it, which is the healthy direction.
topcoat_view.buffer.handle uses topcoat_view.html.node, so a change to topcoat_view.html.node can break topcoat_view.buffer.handle, while a change to topcoat_view.buffer.handle can't break topcoat_view.html.node.
Position
Below the diagonal: topcoat_view.buffer.handle uses a module listed above it, which is the healthy direction.
22→26 topcoat_view.buffer.handle uses topcoat_view.bufferpart of a loop✕
Connections
1 pair of types, where a type in topcoat_view.buffer.handle uses a type in topcoat_view.buffer.
topcoat_view.buffer.handle uses topcoat_view.buffer, so a change to topcoat_view.buffer can break topcoat_view.buffer.handle, while a change to topcoat_view.buffer.handle can't break topcoat_view.buffer.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→30 topcoat_view.buffer.handle uses topcoat_view.buffer.partpart of a loop✕
Connections
1 pair of types, where a type in topcoat_view.buffer.handle uses a type in topcoat_view.buffer.part.
topcoat_view.buffer.handle uses topcoat_view.buffer.part, so a change to topcoat_view.buffer.part can break topcoat_view.buffer.handle, while a change to topcoat_view.buffer.handle can't break topcoat_view.buffer.part.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
topcoat_view_grammar.attributes.hir.builder uses topcoat_core_grammar.common.lenient.expr, so a change to topcoat_core_grammar.common.lenient.expr can break topcoat_view_grammar.attributes.hir.builder, while a change to topcoat_view_grammar.attributes.hir.builder can't break topcoat_core_grammar.common.lenient.expr.
Position
Below the diagonal: topcoat_view_grammar.attributes.hir.builder uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.view.hir.builder uses topcoat_core_grammar.common.pretty.span, so a change to topcoat_core_grammar.common.pretty.span can break topcoat_view_grammar.view.hir.builder, while a change to topcoat_view_grammar.view.hir.builder can't break topcoat_core_grammar.common.pretty.span.
Position
Below the diagonal: topcoat_view_grammar.view.hir.builder uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.view.hir.builder uses topcoat_core_grammar.common.lenient.expr, so a change to topcoat_core_grammar.common.lenient.expr can break topcoat_view_grammar.view.hir.builder, while a change to topcoat_view_grammar.view.hir.builder can't break topcoat_core_grammar.common.lenient.expr.
Position
Below the diagonal: topcoat_view_grammar.view.hir.builder uses a module listed above it, which is the healthy direction.
topcoat_router.route uses topcoat_core.context.context_map, so a change to topcoat_core.context.context_map can break topcoat_router.route, while a change to topcoat_router.route can't break topcoat_core.context.context_map.
Position
Below the diagonal: topcoat_router.route uses a module listed above it, which is the healthy direction.
topcoat_router.route uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_router.route, while a change to topcoat_router.route can't break topcoat_core.context.
Position
Below the diagonal: topcoat_router.route uses a module listed above it, which is the healthy direction.
topcoat_router.route uses topcoat_router.body, so a change to topcoat_router.body can break topcoat_router.route, while a change to topcoat_router.route can't break topcoat_router.body.
Position
Below the diagonal: topcoat_router.route uses a module listed above it, which is the healthy direction.
topcoat_router.route uses topcoat_router.path, so a change to topcoat_router.path can break topcoat_router.route, while a change to topcoat_router.route can't break topcoat_router.path.
Position
Below the diagonal: topcoat_router.route uses a module listed above it, which is the healthy direction.
topcoat_view.buffer uses topcoat_view.region, so a change to topcoat_view.region can break topcoat_view.buffer, while a change to topcoat_view.buffer can't break topcoat_view.region.
Position
Below the diagonal: topcoat_view.buffer uses a module listed above it, which is the healthy direction.
topcoat_view.buffer uses topcoat_view.buffer.handle, so a change to topcoat_view.buffer.handle can break topcoat_view.buffer, while a change to topcoat_view.buffer can't break topcoat_view.buffer.handle.
Position
Below the diagonal: topcoat_view.buffer uses a module listed above it, which is the healthy direction.
topcoat_view.view uses topcoat_view.region, so a change to topcoat_view.region can break topcoat_view.view, while a change to topcoat_view.view can't break topcoat_view.region.
Position
Below the diagonal: topcoat_view.view uses a module listed above it, which is the healthy direction.
topcoat_view.view uses topcoat_view.buffer.handle, so a change to topcoat_view.buffer.handle can break topcoat_view.view, while a change to topcoat_view.view can't break topcoat_view.buffer.handle.
Position
Below the diagonal: topcoat_view.view uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes.attribute uses topcoat_core_grammar.common.parse_option, so a change to topcoat_core_grammar.common.parse_option can break topcoat_view_grammar.attributes.attribute, while a change to topcoat_view_grammar.attributes.attribute can't break topcoat_core_grammar.common.parse_option.
Position
Below the diagonal: topcoat_view_grammar.attributes.attribute uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes.attribute uses topcoat_core_grammar.common.pretty.printer, so a change to topcoat_core_grammar.common.pretty.printer can break topcoat_view_grammar.attributes.attribute, while a change to topcoat_view_grammar.attributes.attribute can't break topcoat_core_grammar.common.pretty.printer.
Position
Below the diagonal: topcoat_view_grammar.attributes.attribute uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes.attribute uses topcoat_core_grammar.common.pretty.pretty_print, so a change to topcoat_core_grammar.common.pretty.pretty_print can break topcoat_view_grammar.attributes.attribute, while a change to topcoat_view_grammar.attributes.attribute can't break topcoat_core_grammar.common.pretty.pretty_print.
Position
Below the diagonal: topcoat_view_grammar.attributes.attribute uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes.attribute uses topcoat_view_grammar.attributes.hir.builder, so a change to topcoat_view_grammar.attributes.hir.builder can break topcoat_view_grammar.attributes.attribute, while a change to topcoat_view_grammar.attributes.attribute can't break topcoat_view_grammar.attributes.hir.builder.
Position
Below the diagonal: topcoat_view_grammar.attributes.attribute uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes.attribute uses topcoat_view_grammar.view.hir.builder, so a change to topcoat_view_grammar.view.hir.builder can break topcoat_view_grammar.attributes.attribute, while a change to topcoat_view_grammar.attributes.attribute can't break topcoat_view_grammar.view.hir.builder.
Position
Below the diagonal: topcoat_view_grammar.attributes.attribute uses a module listed above it, which is the healthy direction.
topcoat_router.router uses topcoat_core.context.context_map, so a change to topcoat_core.context.context_map can break topcoat_router.router, while a change to topcoat_router.router can't break topcoat_core.context.context_map.
Position
Below the diagonal: topcoat_router.router uses a module listed above it, which is the healthy direction.
topcoat_router.router uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_router.router, while a change to topcoat_router.router can't break topcoat_core.context.
Position
Below the diagonal: topcoat_router.router uses a module listed above it, which is the healthy direction.
topcoat_router.router uses topcoat_router.body, so a change to topcoat_router.body can break topcoat_router.router, while a change to topcoat_router.router can't break topcoat_router.body.
Position
Below the diagonal: topcoat_router.router uses a module listed above it, which is the healthy direction.
topcoat_router.router uses topcoat_router.route, so a change to topcoat_router.route can break topcoat_router.router, while a change to topcoat_router.router can't break topcoat_router.route.
Position
Below the diagonal: topcoat_router.router uses a module listed above it, which is the healthy direction.
topcoat_view.buffer.part uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_view.buffer.part, while a change to topcoat_view.buffer.part can't break topcoat_core.context.
Position
Below the diagonal: topcoat_view.buffer.part uses a module listed above it, which is the healthy direction.
topcoat_view.buffer.part uses topcoat_view.region, so a change to topcoat_view.region can break topcoat_view.buffer.part, while a change to topcoat_view.buffer.part can't break topcoat_view.region.
Position
Below the diagonal: topcoat_view.buffer.part uses a module listed above it, which is the healthy direction.
topcoat_view.buffer.part uses topcoat_view.buffer.handle, so a change to topcoat_view.buffer.handle can break topcoat_view.buffer.part, while a change to topcoat_view.buffer.part can't break topcoat_view.buffer.handle.
Position
Below the diagonal: topcoat_view.buffer.part uses a module listed above it, which is the healthy direction.
topcoat_view.buffer.part uses topcoat_view.buffer, so a change to topcoat_view.buffer can break topcoat_view.buffer.part, while a change to topcoat_view.buffer.part can't break topcoat_view.buffer.
Position
Below the diagonal: topcoat_view.buffer.part uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in topcoat_view.child uses a type in topcoat_view.view.
The types involved
topcoat_view.child.Child → topcoat_view.view.View
Direction
topcoat_view.child uses topcoat_view.view, so a change to topcoat_view.view can break topcoat_view.child, while a change to topcoat_view.child can't break topcoat_view.view.
Position
Below the diagonal: topcoat_view.child uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.template.template_for_loop uses topcoat_core_grammar.common.parse_option, so a change to topcoat_core_grammar.common.parse_option can break topcoat_view_grammar.template.template_for_loop, while a change to topcoat_view_grammar.template.template_for_loop can't break topcoat_core_grammar.common.parse_option.
Position
Below the diagonal: topcoat_view_grammar.template.template_for_loop uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.template.template_for_loop uses topcoat_core_grammar.common.pretty.printer, so a change to topcoat_core_grammar.common.pretty.printer can break topcoat_view_grammar.template.template_for_loop, while a change to topcoat_view_grammar.template.template_for_loop can't break topcoat_core_grammar.common.pretty.printer.
Position
Below the diagonal: topcoat_view_grammar.template.template_for_loop uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.template.template_for_loop uses topcoat_core_grammar.common.pretty.pretty_print, so a change to topcoat_core_grammar.common.pretty.pretty_print can break topcoat_view_grammar.template.template_for_loop, while a change to topcoat_view_grammar.template.template_for_loop can't break topcoat_core_grammar.common.pretty.pretty_print.
Position
Below the diagonal: topcoat_view_grammar.template.template_for_loop uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.template.template_for_loop uses topcoat_core_grammar.common.lenient.expr, so a change to topcoat_core_grammar.common.lenient.expr can break topcoat_view_grammar.template.template_for_loop, while a change to topcoat_view_grammar.template.template_for_loop can't break topcoat_core_grammar.common.lenient.expr.
Position
Below the diagonal: topcoat_view_grammar.template.template_for_loop uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.template.template_for_loop uses topcoat_view_grammar.attributes.hir.builder, so a change to topcoat_view_grammar.attributes.hir.builder can break topcoat_view_grammar.template.template_for_loop, while a change to topcoat_view_grammar.template.template_for_loop can't break topcoat_view_grammar.attributes.hir.builder.
Position
Below the diagonal: topcoat_view_grammar.template.template_for_loop uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.template.template_for_loop uses topcoat_view_grammar.view.hir.builder, so a change to topcoat_view_grammar.view.hir.builder can break topcoat_view_grammar.template.template_for_loop, while a change to topcoat_view_grammar.template.template_for_loop can't break topcoat_view_grammar.view.hir.builder.
Position
Below the diagonal: topcoat_view_grammar.template.template_for_loop uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.template.template_for_loop uses topcoat_view_grammar.attributes.attribute, so a change to topcoat_view_grammar.attributes.attribute can break topcoat_view_grammar.template.template_for_loop, while a change to topcoat_view_grammar.template.template_for_loop can't break topcoat_view_grammar.attributes.attribute.
Position
Below the diagonal: topcoat_view_grammar.template.template_for_loop uses a module listed above it, which is the healthy direction.
topcoat_view.html.attribute.value uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_view.html.attribute.value, while a change to topcoat_view.html.attribute.value can't break topcoat_core.context.
Position
Below the diagonal: topcoat_view.html.attribute.value uses a module listed above it, which is the healthy direction.
topcoat_view.html.attribute.value uses topcoat_view.buffer.part, so a change to topcoat_view.buffer.part can break topcoat_view.html.attribute.value, while a change to topcoat_view.html.attribute.value can't break topcoat_view.buffer.part.
Position
Below the diagonal: topcoat_view.html.attribute.value uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes.visitor uses topcoat_view_grammar.attributes.attribute, so a change to topcoat_view_grammar.attributes.attribute can break topcoat_view_grammar.attributes.visitor, while a change to topcoat_view_grammar.attributes.visitor can't break topcoat_view_grammar.attributes.attribute.
Position
Below the diagonal: topcoat_view_grammar.attributes.visitor uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes.visitor uses topcoat_view_grammar.template.template_for_loop, so a change to topcoat_view_grammar.template.template_for_loop can break topcoat_view_grammar.attributes.visitor, while a change to topcoat_view_grammar.attributes.visitor can't break topcoat_view_grammar.template.template_for_loop.
Position
Below the diagonal: topcoat_view_grammar.attributes.visitor uses a module listed above it, which is the healthy direction.
topcoat_asset.asset uses topcoat_view.format, so a change to topcoat_view.format can break topcoat_asset.asset, while a change to topcoat_asset.asset can't break topcoat_view.format.
Position
Below the diagonal: topcoat_asset.asset uses a module listed above it, which is the healthy direction.
topcoat_asset.asset uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_asset.asset, while a change to topcoat_asset.asset can't break topcoat_core.context.
Position
Below the diagonal: topcoat_asset.asset uses a module listed above it, which is the healthy direction.
topcoat_asset.asset uses topcoat_view.buffer.part, so a change to topcoat_view.buffer.part can break topcoat_asset.asset, while a change to topcoat_asset.asset can't break topcoat_view.buffer.part.
Position
Below the diagonal: topcoat_asset.asset uses a module listed above it, which is the healthy direction.
topcoat_asset.asset uses topcoat_view.html.attribute.value, so a change to topcoat_view.html.attribute.value can break topcoat_asset.asset, while a change to topcoat_asset.asset can't break topcoat_view.html.attribute.value.
Position
Below the diagonal: topcoat_asset.asset uses a module listed above it, which is the healthy direction.
topcoat_l10n.langid uses topcoat_view.format, so a change to topcoat_view.format can break topcoat_l10n.langid, while a change to topcoat_l10n.langid can't break topcoat_view.format.
Position
Below the diagonal: topcoat_l10n.langid uses a module listed above it, which is the healthy direction.
topcoat_l10n.langid uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_l10n.langid, while a change to topcoat_l10n.langid can't break topcoat_core.context.
Position
Below the diagonal: topcoat_l10n.langid uses a module listed above it, which is the healthy direction.
topcoat_l10n.langid uses topcoat_view.html.node, so a change to topcoat_view.html.node can break topcoat_l10n.langid, while a change to topcoat_l10n.langid can't break topcoat_view.html.node.
Position
Below the diagonal: topcoat_l10n.langid uses a module listed above it, which is the healthy direction.
topcoat_l10n.langid uses topcoat_view.buffer.part, so a change to topcoat_view.buffer.part can break topcoat_l10n.langid, while a change to topcoat_l10n.langid can't break topcoat_view.buffer.part.
Position
Below the diagonal: topcoat_l10n.langid uses a module listed above it, which is the healthy direction.
topcoat_l10n.langid uses topcoat_view.html.attribute.value, so a change to topcoat_view.html.attribute.value can break topcoat_l10n.langid, while a change to topcoat_l10n.langid can't break topcoat_view.html.attribute.value.
Position
Below the diagonal: topcoat_l10n.langid uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes uses topcoat_core_grammar.common.pretty.printer, so a change to topcoat_core_grammar.common.pretty.printer can break topcoat_view_grammar.attributes, while a change to topcoat_view_grammar.attributes can't break topcoat_core_grammar.common.pretty.printer.
Position
Below the diagonal: topcoat_view_grammar.attributes uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes uses topcoat_core_grammar.common.pretty.span, so a change to topcoat_core_grammar.common.pretty.span can break topcoat_view_grammar.attributes, while a change to topcoat_view_grammar.attributes can't break topcoat_core_grammar.common.pretty.span.
Position
Below the diagonal: topcoat_view_grammar.attributes uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes uses topcoat_core_grammar.common.pretty.pretty_print, so a change to topcoat_core_grammar.common.pretty.pretty_print can break topcoat_view_grammar.attributes, while a change to topcoat_view_grammar.attributes can't break topcoat_core_grammar.common.pretty.pretty_print.
Position
Below the diagonal: topcoat_view_grammar.attributes uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes uses topcoat_core.error, so a change to topcoat_core.error can break topcoat_view_grammar.attributes, while a change to topcoat_view_grammar.attributes can't break topcoat_core.error.
Position
Below the diagonal: topcoat_view_grammar.attributes uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes uses topcoat_view_grammar.attributes.hir.builder, so a change to topcoat_view_grammar.attributes.hir.builder can break topcoat_view_grammar.attributes, while a change to topcoat_view_grammar.attributes can't break topcoat_view_grammar.attributes.hir.builder.
Position
Below the diagonal: topcoat_view_grammar.attributes uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes uses topcoat_view_grammar.view.hir.builder, so a change to topcoat_view_grammar.view.hir.builder can break topcoat_view_grammar.attributes, while a change to topcoat_view_grammar.attributes can't break topcoat_view_grammar.view.hir.builder.
Position
Below the diagonal: topcoat_view_grammar.attributes uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes uses topcoat_view_grammar.attributes.attribute, so a change to topcoat_view_grammar.attributes.attribute can break topcoat_view_grammar.attributes, while a change to topcoat_view_grammar.attributes can't break topcoat_view_grammar.attributes.attribute.
Position
Below the diagonal: topcoat_view_grammar.attributes uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes uses topcoat_view_grammar.template.template_for_loop, so a change to topcoat_view_grammar.template.template_for_loop can break topcoat_view_grammar.attributes, while a change to topcoat_view_grammar.attributes can't break topcoat_view_grammar.template.template_for_loop.
Position
Below the diagonal: topcoat_view_grammar.attributes uses a module listed above it, which is the healthy direction.
topcoat_view_grammar.attributes uses topcoat_view_grammar.attributes.visitor, so a change to topcoat_view_grammar.attributes.visitor can break topcoat_view_grammar.attributes, while a change to topcoat_view_grammar.attributes can't break topcoat_view_grammar.attributes.visitor.
Position
Below the diagonal: topcoat_view_grammar.attributes uses a module listed above it, which is the healthy direction.
topcoat_font.source uses topcoat_core.fnv1a, so a change to topcoat_core.fnv1a can break topcoat_font.source, while a change to topcoat_font.source can't break topcoat_core.fnv1a.
Position
Below the diagonal: topcoat_font.source uses a module listed above it, which is the healthy direction.
topcoat_font.source uses topcoat_view.format, so a change to topcoat_view.format can break topcoat_font.source, while a change to topcoat_font.source can't break topcoat_view.format.
Position
Below the diagonal: topcoat_font.source uses a module listed above it, which is the healthy direction.
topcoat_font.source uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_font.source, while a change to topcoat_font.source can't break topcoat_core.context.
Position
Below the diagonal: topcoat_font.source uses a module listed above it, which is the healthy direction.
topcoat_font.source uses topcoat_core.error, so a change to topcoat_core.error can break topcoat_font.source, while a change to topcoat_font.source can't break topcoat_core.error.
Position
Below the diagonal: topcoat_font.source uses a module listed above it, which is the healthy direction.
topcoat_font.source uses topcoat_view.buffer.part, so a change to topcoat_view.buffer.part can break topcoat_font.source, while a change to topcoat_font.source can't break topcoat_view.buffer.part.
Position
Below the diagonal: topcoat_font.source uses a module listed above it, which is the healthy direction.
topcoat_font.source uses topcoat_view.html.attribute.value, so a change to topcoat_view.html.attribute.value can break topcoat_font.source, while a change to topcoat_font.source can't break topcoat_view.html.attribute.value.
Position
Below the diagonal: topcoat_font.source uses a module listed above it, which is the healthy direction.
topcoat_font.source uses topcoat_asset.asset, so a change to topcoat_asset.asset can break topcoat_font.source, while a change to topcoat_font.source can't break topcoat_asset.asset.
Position
Below the diagonal: topcoat_font.source uses a module listed above it, which is the healthy direction.
topcoat_l10n.locale uses topcoat_view.format, so a change to topcoat_view.format can break topcoat_l10n.locale, while a change to topcoat_l10n.locale can't break topcoat_view.format.
Position
Below the diagonal: topcoat_l10n.locale uses a module listed above it, which is the healthy direction.
topcoat_l10n.locale uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_l10n.locale, while a change to topcoat_l10n.locale can't break topcoat_core.context.
Position
Below the diagonal: topcoat_l10n.locale uses a module listed above it, which is the healthy direction.
topcoat_l10n.locale uses topcoat_view.html.node, so a change to topcoat_view.html.node can break topcoat_l10n.locale, while a change to topcoat_l10n.locale can't break topcoat_view.html.node.
Position
Below the diagonal: topcoat_l10n.locale uses a module listed above it, which is the healthy direction.
topcoat_l10n.locale uses topcoat_view.buffer.part, so a change to topcoat_view.buffer.part can break topcoat_l10n.locale, while a change to topcoat_l10n.locale can't break topcoat_view.buffer.part.
Position
Below the diagonal: topcoat_l10n.locale uses a module listed above it, which is the healthy direction.
topcoat_l10n.locale uses topcoat_l10n.langid, so a change to topcoat_l10n.langid can break topcoat_l10n.locale, while a change to topcoat_l10n.locale can't break topcoat_l10n.langid.
Position
Below the diagonal: topcoat_l10n.locale uses a module listed above it, which is the healthy direction.
topcoat_font.face uses topcoat_core.fnv1a, so a change to topcoat_core.fnv1a can break topcoat_font.face, while a change to topcoat_font.face can't break topcoat_core.fnv1a.
Position
Below the diagonal: topcoat_font.face uses a module listed above it, which is the healthy direction.
topcoat_font.face uses topcoat_view.format, so a change to topcoat_view.format can break topcoat_font.face, while a change to topcoat_font.face can't break topcoat_view.format.
Position
Below the diagonal: topcoat_font.face uses a module listed above it, which is the healthy direction.
topcoat_font.face uses topcoat_core.context, so a change to topcoat_core.context can break topcoat_font.face, while a change to topcoat_font.face can't break topcoat_core.context.
Position
Below the diagonal: topcoat_font.face uses a module listed above it, which is the healthy direction.
topcoat_font.face uses topcoat_core.error, so a change to topcoat_core.error can break topcoat_font.face, while a change to topcoat_font.face can't break topcoat_core.error.
Position
Below the diagonal: topcoat_font.face uses a module listed above it, which is the healthy direction.
topcoat_font.face uses topcoat_font.source, so a change to topcoat_font.source can break topcoat_font.face, while a change to topcoat_font.face can't break topcoat_font.source.
Position
Below the diagonal: topcoat_font.face uses a module listed above it, which is the healthy direction.
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
58
High / Critical
A03:2025 — Software Supply Chain Failures
38
High / Critical
Roadmap
Top priorities: Protect endpoints by default-deny: [Authorize] + role/policy authorization, or imperative guard methods (throw-on-violation) called from every handler; Add security response headers (Content-Security-Policy first, then Strict-Transport-Security, X-Content-Type-Options and a frame policy) — defense in depth, even when a reverse proxy could set them; 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Protect endpoints by default-deny: [Authorize] + role/policy authorization, or imperative guard methods (throw-on-violation) called from every handler.
Add security response headers (Content-Security-Policy first, then Strict-Transport-Security, X-Content-Type-Options and a frame policy) — defense in depth, even when a reverse proxy could set them.
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.
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 — 43
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 — 328
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 — 43
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 15
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 46 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 — 46 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, 395 of 414 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.
D10 Test 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. The 210 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 204 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (vitest via `yarn install --frozen-lockfile --ignore-scripts` in crates/topcoat-cli/browser/ (21 tests); vitest via `yarn install --frozen-lockfile --ignore-scripts` in crates/topcoat-runtime/browser/ (254 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — 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 — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
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 Cargo manifest, but the licence verdict published here was taken over its gem dependencies. Nothing was read about its Cargo 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-maintainer repository — bus factor is not applicable (41 contributor(s) across 1066 commit(s) sampled, automation and bot accounts excluded). One of them holds 91% of the history; the other 40 hold 0.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D17 Explicit Debt — 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. The 1 deducted marker(s) and the 0.4/KLoC density on this row were taken over this repository's .NET projects ALONE: .rs (126,605 lines, 95% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 2 task marker(s) (TODO/FIXME/HACK/XXX) across 2 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
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.
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. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — 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 source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — 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. `benchmarks/apps/aspnet/Catalog/HarborJsonContext.cs`, `REDACTED`, `REDACTED` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
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.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
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'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.
X27 Collection changed while being enumerated — 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.
X3 Exception handling — 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.
Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
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.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
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 (go.mod, 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.
11 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Renderer::execute at 29. A further 5 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being LengthUnit::as_str at 49 — they are counted neither in the figure above nor in this dimension's score. 5 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/topcoat-view/src/css/length.rs (LengthUnit::as_str at 49), crates/topcoat-core/grammar/src/common/pretty/syn/expr.rs (Expr::pretty_print at 37), crates/topcoat-cli/src/common/format.rs (topcoat_cli::common::format::register at 31), crates/topcoat-view/src/buffer/instruction_buffer.rs (InstructionBuffer::print_stats at 28), crates/topcoat-runtime/grammar/src/expr.rs (Expr::dispatch at 22). 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.
+ 6 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 11 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with Renderer::execute (cyclomatic 29), topcoat_cli::new::generate::generate (cyclomatic 26), Input::resolve (cyclomatic 23). — 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 11 together lifts Cyclomatic Complexity from 8.4 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 20 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 30 down to 30 or less in Cognitive Complexity — start with topcoat_l10n::fluent::check::analysis::check_references (cognitive 40), topcoat_ui::manage::add::add (cognitive 36). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 7.0 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; 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 Classes9.4 / 10Stronggated by 16 serious findings✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 6 MethodTooLong finding(s) in God Classes — start with props.rs, component.rs, route.rs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 3 TooManyMethods finding(s) in God Classes — start with length.rs, buffer.rs, expr.rs. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 3 FunctionTooLong finding(s) in God Classes — start with generate.rs, add.rs, wizard.rs. — One of this dimension's main actionable groups (3 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.
119 duplicated block group(s) detected. 5.2 % of the production lines (6,967 of 134,281) are in a reported copy. A further 80 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 18 of the 199 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 79 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with sidebar.rs (5), layer.rs, layout.rs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 10 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with sidebar.rs (9), pagination.rs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 9 Edited copy of a member (7 corresponding lines) finding(s) in Code Duplication — start with datetime.rs (3), integer.rs, ident.rs. — One of this dimension's main actionable groups (9 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.6 / 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.
38 production modules (Cargo), 0 dependency cycle(s), 2 unstable depended-on module(s). Read from the build's own module declarations; 4 module(s) off the main sequence, with abstractness counted on 28 of the 38 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: topcoat-ui · ×4
Unstable project topcoat
Unstable project topcoat-metadata
What to do
Resolve the 4 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 Unstable project topcoat finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project topcoat-metadata 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.
Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with config.rs, family.rs, catalog.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 210 tests. Measured on the JavaScript/TypeScript suite only — at least 204 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.
Mock-dominated test: ignores a superseded redirect even when the request ignores cancellation · ×5crates/topcoat-runtime/browser/src/render/request.test.ts:122
✓ On the Gold path — maintain.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
0 outdated, 0 retired direct Hex dependencies, 0 pinning defect(s). Whether any of these packages is UNMAINTAINED is not graded — hex.pm publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: a Hex app name does not determine the modules it provides (`ecto_sql` provides Ecto.Adapters.SQL), and a large idiomatic class of BEAM dependencies — runtime adapters, codec plugins, protocol implementations and OTP applications the release starts — is correctly declared and never referenced in source, so absence of a reference is not evidence of an unused dependency. Known CVEs in this dependency graph are D30's question, read from mix.lock there.
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 76 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 76 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed Gemfile.lock. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's gem dependencies and nothing else. The repository also declares a Cargo manifest, 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 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with fmt.rs, renderer.rs, node.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 deducted debt markers + 1 dead symbols across 839 LoC in the .NET projects (0.4/KLoC) → score 9.1. Measured on the .NET source only: .rs (95% of production source) was not read, and carries at least 2 uncounted task marker(s) in 2 file(s).
EmptyCatchBlockREDACTED:85
Dead code: Listingbenchmarks/apps/aspnet/Infrastructure/Urls.cs:21
What to do
Resolve the 1 EmptyCatchBlock finding(s) in Explicit Debt — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Dead code finding(s) in Explicit Debt — start with Urls.cs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
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).
59 finding(s): 0 critical, 34 high, 25 medium, 0 low. 29 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 14 file(s) — `benchmarks/apps/aspnet/Catalog/HarborJsonContext.cs` (lines 10–20), `REDACTED` (line 8), `REDACTED` (line 8), `benchmarks/apps/django/store/templates/store/base.html` (line 1), `REDACTED` (lines 1–13, line 54, line 67, …), … (+9 more) — 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. In 2 of those file(s) — `REDACTED`, `REDACTED` — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 6 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 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 29 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 (29 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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 12 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6), REDACTED (6). — One of this dimension's main actionable groups (12 warning-level).
Resolve the 8 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8). — One of this dimension's main actionable groups (8 issue-level).
Resolve the 4 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 563 of the 1040 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 2 Change coupling finding(s) in Change Coupling — start with layout.rs, memoize.rs. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
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 4 platform declaration(s) and 12 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 — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.
Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.
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.
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 the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
No [Authorize]/policies and no imperative guard methods (throw-on-violation) were found — endpoints may be unprotected.
`MapGet("/products")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — REDACTED:31
`MapGet("/products/{id}")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — REDACTED:32
`MapPost("/cart")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — REDACTED:33
`MapGet("/health")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase. — benchmarks/apps/aspnet/Program.cs:71
What to do
Protect endpoints by default-deny: [Authorize] + role/policy authorization, or imperative guard methods (throw-on-violation) called from every handler.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
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
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
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 & versioning9.8 / 10Exemplary✓ Tool-verified
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
1 public type in `topcoat_core.internal` is marked as implementation by its own namespace, folder or name: `ResultExt` (crates/topcoat-core/src/internal.rs:1, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-core/src/internal.rs:1
1 public type in `topcoat_view.internal.builder` is marked as implementation by its own namespace, folder or name: `Builder` (crates/topcoat-view/src/internal/builder.rs:14, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-view/src/internal/builder.rs:14
1 public type in `topcoat_view.internal.capture` is marked as implementation by its own namespace, folder or name: `Capture` (crates/topcoat-view/src/internal/capture.rs:11, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-view/src/internal/capture.rs:11
1 public type in `topcoat_view.internal.either_view` is marked as implementation by its own namespace, folder or name: `EitherView` (crates/topcoat-view/src/internal/either_view.rs:19, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-view/src/internal/either_view.rs:19
1 public type in `topcoat_view.internal.error_boundary_view` is marked as implementation by its own namespace, folder or name: `ErrorBoundaryView` (crates/topcoat-view/src/internal/error_boundary_view.rs:25, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-view/src/internal/error_boundary_view.rs:25
4 public types in `topcoat_view.internal.join_view` are marked as implementation by their own namespace, folder or name: `JoinView` (crates/topcoat-view/src/internal/join_view.rs:19, `internal`), `JoinUnits` (crates/topcoat-view/src/internal/join_view.rs:104, `internal`), `JoinUnit` (crates/topcoat-view/src/internal/join_view.rs:157, `internal`), `JoinPair` (crates/topcoat-view/src/internal/join_view.rs:234, `internal`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — crates/topcoat-view/src/internal/join_view.rs:19
2 public types in `topcoat_view.internal.live_view` are marked as implementation by their own namespace, folder or name: `LiveView` (crates/topcoat-view/src/internal/live_view.rs:22, `internal`), `EmitView` (crates/topcoat-view/src/internal/live_view.rs:126, `internal`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — crates/topcoat-view/src/internal/live_view.rs:22
1 public type in `topcoat_view.internal.loop_view` is marked as implementation by its own namespace, folder or name: `LoopView` (crates/topcoat-view/src/internal/loop_view.rs:15, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-view/src/internal/loop_view.rs:15
1 public type in `topcoat_view.internal.move_view` is marked as implementation by its own namespace, folder or name: `MoveView` (crates/topcoat-view/src/internal/move_view.rs:23, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-view/src/internal/move_view.rs:23
1 public type in `topcoat_view.internal.node_classify` is marked as implementation by its own namespace, folder or name: `NodeClassify` (crates/topcoat-view/src/internal/node_classify.rs:11, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-view/src/internal/node_classify.rs:11
1 public type in `topcoat_view.internal.scope_view` is marked as implementation by its own namespace, folder or name: `ScopeView` (crates/topcoat-view/src/internal/scope_view.rs:17, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-view/src/internal/scope_view.rs:17
1 public type in `topcoat_view.internal.suspense_view` is marked as implementation by its own namespace, folder or name: `SuspenseView` (crates/topcoat-view/src/internal/suspense_view.rs:25, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-view/src/internal/suspense_view.rs:25
1 public type in `topcoat_view.internal.then_view` is marked as implementation by its own namespace, folder or name: `ThenView` (crates/topcoat-view/src/internal/then_view.rs:18, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — crates/topcoat-view/src/internal/then_view.rs:18
What to do
Hide `topcoat_core.internal` (`ResultExt`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.builder` (`Builder`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.capture` (`Capture`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.either_view` (`EitherView`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.error_boundary_view` (`ErrorBoundaryView`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.join_view` (`JoinView`, `JoinUnits`, `JoinUnit`, `JoinPair`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.live_view` (`LiveView`, `EmitView`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.loop_view` (`LoopView`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.move_view` (`MoveView`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.node_classify` (`NodeClassify`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.scope_view` (`ScopeView`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.suspense_view` (`SuspenseView`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `topcoat_view.internal.then_view` (`ThenView`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Do you agree with this assessment?
P2 · Observability5.8 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 1/4 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/topcoat`, `crates/topcoat-font`, `crates/topcoat-router`.
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.
`benchmarks/apps/nextjs/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — benchmarks/apps/nextjs/package.json:10
What to do
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.
Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
What to do
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Security — Transport security, security headers, secure cookies, input validation, middleware order and crypto hygiene (presence, not runtime).
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. (−2.0 on this card.)
This web host's pipeline is composed here and adds no security response header (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, a frame policy) to what it serves. — benchmarks/apps/aspnet/Program.cs:15
No ModelState/[ApiController]/FluentValidation signal — inbound payloads reach handlers unvalidated. (−2.0 on this card.)
`MapGet("/products")` binds request input and nothing in this codebase validates it — no [ApiController]/ModelState check, validator or guard. — REDACTED:31
`MapGet("/products/{id}")` binds request input and nothing in this codebase validates it — no [ApiController]/ModelState check, validator or guard. — REDACTED:32
`MapPost("/cart")` binds request input and nothing in this codebase validates it — no [ApiController]/ModelState check, validator or guard. — REDACTED:33
No CookieSecurePolicy/HttpOnly/SameSite configuration found. (−1.5 on this card; skip if the app sets no cookies.) — benchmarks/apps/aspnet/Infrastructure/Cart.cs:16
What to do
Add security response headers (Content-Security-Policy first, then Strict-Transport-Security, X-Content-Type-Options and a frame policy) — defense in depth, even when a reverse proxy could set them.
Validate inbound models (ModelState/[ApiController]/FluentValidation) to reduce injection and bad-data risk.
Set secure cookie flags — CookieSecurePolicy.Always, HttpOnly, and SameSite (Strict/Lax) on auth/session cookies. Skip only if the app sets no cookies.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
~1.2 `!` suppressions per 1k syntax nodes — 5 suppression(s) across the 4207 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 70 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 — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (9 DOM element(s) < 25) — too little surface to assess accessibility.
AX4 Dependency direction — not applicable to a transaction-script/CRUD architecture (the inward-dependency rule is for layered/clean styles)
AX6 Interface segregation — AX6 reached only 4% of this repository's production lines — rust (127,133 lines), elixir (1,761 lines), go (915 lines), python (673 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution, but this repository's production source is mostly .ex, .exs, .go, .py, .rb, .rs, .ts, .tsx — the .NET project files present are an immaterial minority — so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D21 Naming Consistency — Naming consistency does not read html yet; not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — This repository is one project, `Harbor` (839 LoC, 30 public types across 7 namespaces), within the size bounds. Not scored: a single unit of this size gives project cohesion nothing to grade.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 3 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage NOT MEASURED: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half could not be measured — crates/topcoat-cli/browser/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
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): 232 value object(s); 2 domain event(s); its domain events are published by services or handlers — no domain entity raises one
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 Fold determinism — not applicable — the code was read and holds no event-replay fold, so there is nothing for this check to judge
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — no outbound HTTP usage detected — no HttpClient/IHttpClientFactory/AddHttpClient in source, and no Refit/RestSharp/Flurl.Http namespace or package reference
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
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.
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 1% of this repository's production lines — rust (127,133 lines), typescript (2,256 lines), javascript (1,937 lines), elixir (1,761 lines), go (915 lines), ruby (704 lines), python (673 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 1% of this repository's production lines — rust (127,133 lines), typescript (2,256 lines), javascript (1,937 lines), elixir (1,761 lines), go (915 lines), ruby (704 lines), python (673 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 1% of this repository's production lines — rust (127,133 lines), typescript (2,256 lines), javascript (1,937 lines), elixir (1,761 lines), go (915 lines), ruby (704 lines), python (673 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — X2 reached only 1% of this repository's production lines — rust (127,133 lines), typescript (2,256 lines), javascript (1,937 lines), elixir (1,761 lines), go (915 lines), ruby (704 lines), python (673 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — X24 reached only 4% of this repository's production lines — rust (127,133 lines), elixir (1,761 lines), go (915 lines), ruby (704 lines), python (673 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — X27 reached only 1% of this repository's production lines — rust (127,133 lines), typescript (2,256 lines), javascript (1,937 lines), elixir (1,761 lines), go (915 lines), ruby (704 lines), python (673 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — X3 reached only 1% of this repository's production lines — rust (127,133 lines), typescript (2,256 lines), javascript (1,937 lines), elixir (1,761 lines), go (915 lines), ruby (704 lines), python (673 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
EmptyCatchBlock REDACTED:85— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
Duplicated block (11 lines × 2) crates/topcoat-router/grammar/src/layer.rs:25— crates/topcoat-router/grammar/src/layer.rs:25-35 | crates/topcoat-router/grammar/src/layout.rs:25-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) crates/topcoat-router/grammar/src/layout.rs:117— crates/topcoat-router/grammar/src/layout.rs:117-127 | crates/topcoat-router/grammar/src/page.rs:130-140 — 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 (11 lines × 2) crates/topcoat-view/grammar/src/view/element_tag.rs:31— crates/topcoat-view/grammar/src/view/element_tag.rs:31-41 | crates/topcoat-view/grammar/src/view/element_tag.rs:71-81 — 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, `crates/topcoat-view/grammar/src/view/element_tag.rs:82` calls `pretty_print` and `crates/topcoat-view/grammar/src/view/element_tag.rs:42` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) crates/topcoat-ui/registry/src/components/breadcrumb.rs:106— crates/topcoat-ui/registry/src/components/breadcrumb.rs:106-116 | demos/admin/src/components/breadcrumb.rs:106-116 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/breadcrumb.rs` and `demos/admin/src/components/breadcrumb.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/breadcrumb.rs:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:326— crates/topcoat-ui/registry/src/components/sidebar.rs:326-336 | demos/admin/src/components/sidebar.rs:326-336 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:326` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:431— crates/topcoat-ui/registry/src/components/sidebar.rs:431-441 | demos/admin/src/components/sidebar.rs:431-441 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:431` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:449— crates/topcoat-ui/registry/src/components/sidebar.rs:449-459 | demos/admin/src/components/sidebar.rs:449-459 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:449` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:467— crates/topcoat-ui/registry/src/components/sidebar.rs:467-477 | demos/admin/src/components/sidebar.rs:467-477 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:467` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:697— crates/topcoat-ui/registry/src/components/sidebar.rs:697-707 | demos/admin/src/components/sidebar.rs:697-707 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:697` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/topcoat-runtime/grammar/src/shard/item.rs:36— crates/topcoat-runtime/grammar/src/shard/item.rs:36-46 | crates/topcoat-view/grammar/src/component/item.rs:36-46 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-runtime/grammar/src/shard/item.rs:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/topcoat-ui/registry/src/components/pagination.rs:38— crates/topcoat-ui/registry/src/components/pagination.rs:38-51 | demos/admin/src/components/pagination.rs:38-51 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/pagination.rs` and `demos/admin/src/components/pagination.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/pagination.rs:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:101— crates/topcoat-ui/registry/src/components/sidebar.rs:101-114 | demos/admin/src/components/sidebar.rs:101-114 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:281— crates/topcoat-ui/registry/src/components/sidebar.rs:281-294 | demos/admin/src/components/sidebar.rs:281-294 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:281` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:305— crates/topcoat-ui/registry/src/components/sidebar.rs:305-318 | demos/admin/src/components/sidebar.rs:305-318 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:305` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:344— crates/topcoat-ui/registry/src/components/sidebar.rs:344-357 | demos/admin/src/components/sidebar.rs:344-357 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:344` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:365— crates/topcoat-ui/registry/src/components/sidebar.rs:365-378 | demos/admin/src/components/sidebar.rs:365-378 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:365` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:386— crates/topcoat-ui/registry/src/components/sidebar.rs:386-399 | demos/admin/src/components/sidebar.rs:386-399 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:386` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:481— crates/topcoat-ui/registry/src/components/sidebar.rs:481-494 | demos/admin/src/components/sidebar.rs:481-494 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:626— crates/topcoat-ui/registry/src/components/sidebar.rs:626-639 | demos/admin/src/components/sidebar.rs:626-639 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:626` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:676— crates/topcoat-ui/registry/src/components/sidebar.rs:676-689 | demos/admin/src/components/sidebar.rs:676-689 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:676` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×9
Edited copy of a member (7 corresponding lines) crates/topcoat-l10n/src/fluent/format/datetime.rs:21— crates/topcoat-l10n/src/fluent/format/datetime.rs:21-27 | crates/topcoat-l10n/src/fluent/format/datetime.rs:29-35 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/topcoat-runtime/src/surrogate/integer.rs:73— crates/topcoat-runtime/src/surrogate/integer.rs:73-141 | crates/topcoat-runtime/src/surrogate/slice.rs:79-85 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/topcoat-l10n/src/datetime.rs:105— crates/topcoat-l10n/src/datetime.rs:105-111 | crates/topcoat-l10n/src/number.rs:132-138 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/topcoat-l10n/src/fluent/format/datetime.rs:92— crates/topcoat-l10n/src/fluent/format/datetime.rs:92-98 | crates/topcoat-l10n/src/fluent/format/number.rs:62-68 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/topcoat-l10n/grammar/src/fluent/common/ident.rs:178— crates/topcoat-l10n/grammar/src/fluent/common/ident.rs:178-185 | crates/topcoat-view/grammar/src/view/element_name.rs:122-128 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/topcoat-router/src/content/css.rs:31— crates/topcoat-router/src/content/css.rs:31-37 | crates/topcoat-router/src/content/html.rs:31-37 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/topcoat-view/grammar/src/attributes/attribute_nodes.rs:36— crates/topcoat-view/grammar/src/attributes/attribute_nodes.rs:36-42 | crates/topcoat-view/grammar/src/view/nodes.rs:35-41 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/topcoat-datastar/src/response.rs:72— crates/topcoat-datastar/src/response.rs:72-79 | crates/topcoat-htmx/src/response.rs:101-107 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/topcoat-core/grammar/src/common/lenient/field_value.rs:72— crates/topcoat-core/grammar/src/common/lenient/field_value.rs:72-79 | crates/topcoat-l10n/grammar/src/fluent/translate/argument.rs:181-187 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) crates/topcoat-runtime/grammar/src/procedure.rs:201— crates/topcoat-runtime/grammar/src/procedure.rs:201-213 | crates/topcoat-runtime/grammar/src/shard.rs:213-225 — 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 `crates/topcoat-runtime/grammar/src/procedure.rs:201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/topcoat-ui/registry/src/components/pagination.rs:139— crates/topcoat-ui/registry/src/components/pagination.rs:139-151 | demos/admin/src/components/pagination.rs:139-151 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/pagination.rs` and `demos/admin/src/components/pagination.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) crates/topcoat-ui/registry/src/components/pagination.rs:165— crates/topcoat-ui/registry/src/components/pagination.rs:165-177 | demos/admin/src/components/pagination.rs:165-177 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/pagination.rs` and `demos/admin/src/components/pagination.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) crates/topcoat-view/grammar/src/attributes/attribute_nodes.rs:64— crates/topcoat-view/grammar/src/attributes/attribute_nodes.rs:64-76 | crates/topcoat-view/grammar/src/view/nodes.rs:55-67 — 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 (13 lines × 2) crates/topcoat-ui/registry/src/components/breadcrumb.rs:46— crates/topcoat-ui/registry/src/components/breadcrumb.rs:46-58 | demos/admin/src/components/breadcrumb.rs:46-58 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/breadcrumb.rs` and `demos/admin/src/components/breadcrumb.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/breadcrumb.rs: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.
Duplicated block (13 lines × 2) crates/topcoat-ui/registry/src/components/breadcrumb.rs:84— crates/topcoat-ui/registry/src/components/breadcrumb.rs:84-96 | demos/admin/src/components/breadcrumb.rs:84-96 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/breadcrumb.rs` and `demos/admin/src/components/breadcrumb.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/breadcrumb.rs:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/topcoat-ui/registry/src/components/dropdown_menu.rs:177— crates/topcoat-ui/registry/src/components/dropdown_menu.rs:177-189 | demos/admin/src/components/dropdown_menu.rs:177-189 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/dropdown_menu.rs` and `demos/admin/src/components/dropdown_menu.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/dropdown_menu.rs:177` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/topcoat-ui/registry/src/components/dropdown_menu.rs:312— crates/topcoat-ui/registry/src/components/dropdown_menu.rs:312-324 | demos/admin/src/components/dropdown_menu.rs:312-324 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/dropdown_menu.rs` and `demos/admin/src/components/dropdown_menu.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/dropdown_menu.rs:312` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/topcoat-ui/registry/src/components/pagination.rs:62— crates/topcoat-ui/registry/src/components/pagination.rs:62-74 | demos/admin/src/components/pagination.rs:62-74 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/pagination.rs` and `demos/admin/src/components/pagination.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/pagination.rs:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/topcoat-ui/registry/src/components/breadcrumb.rs:134— crates/topcoat-ui/registry/src/components/breadcrumb.rs:134-143 | demos/admin/src/components/breadcrumb.rs:134-143 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/breadcrumb.rs` and `demos/admin/src/components/breadcrumb.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/breadcrumb.rs:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/topcoat-font/grammar/src/fontsource/font.rs:229— crates/topcoat-font/grammar/src/fontsource/font.rs:229-238 | crates/topcoat-font/grammar/src/fontsource/font_face.rs:239-248 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) crates/topcoat-ui/registry/src/components/breadcrumb.rs:67— crates/topcoat-ui/registry/src/components/breadcrumb.rs:67-76 | demos/admin/src/components/breadcrumb.rs:67-76 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/breadcrumb.rs` and `demos/admin/src/components/breadcrumb.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/breadcrumb.rs:67` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/topcoat-ui/registry/src/components/breadcrumb.rs:120— crates/topcoat-ui/registry/src/components/breadcrumb.rs:120-129 | demos/admin/src/components/breadcrumb.rs:120-129 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/breadcrumb.rs` and `demos/admin/src/components/breadcrumb.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) crates/topcoat-ui/registry/src/components/dropdown_menu.rs:47— crates/topcoat-ui/registry/src/components/dropdown_menu.rs:47-56 | demos/admin/src/components/dropdown_menu.rs:47-56 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/dropdown_menu.rs` and `demos/admin/src/components/dropdown_menu.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/dropdown_menu.rs:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/topcoat-ui/registry/src/components/dropdown_menu.rs:223— crates/topcoat-ui/registry/src/components/dropdown_menu.rs:223-232 | demos/admin/src/components/dropdown_menu.rs:223-232 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/dropdown_menu.rs` and `demos/admin/src/components/dropdown_menu.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/dropdown_menu.rs:223` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/topcoat-ui/registry/src/components/hover_card.rs:33— crates/topcoat-ui/registry/src/components/hover_card.rs:33-42 | crates/topcoat-ui/registry/src/components/tooltip.rs:37-46 — 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 `crates/topcoat-ui/registry/src/components/hover_card.rs:33` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/topcoat-router/grammar/src/page.rs:72— crates/topcoat-router/grammar/src/page.rs:72-82 | crates/topcoat-router/grammar/src/route.rs:66-75 — before extracting anything, compare `crates/topcoat-router/grammar/src/page.rs` and `crates/topcoat-router/grammar/src/route.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-router/grammar/src/page.rs:72` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/topcoat-view/src/internal/move_view.rs:57— crates/topcoat-view/src/internal/move_view.rs:57-61 | crates/topcoat-view/src/internal/move_view.rs:73-77 — 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 (5 lines × 2) crates/topcoat-core/grammar/src/memoize.rs:58— crates/topcoat-core/grammar/src/memoize.rs:58-62 | crates/topcoat-router/grammar/src/layer.rs:51-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/topcoat-ui/registry/src/components/breadcrumb.rs:31— crates/topcoat-ui/registry/src/components/breadcrumb.rs:31-35 | demos/admin/src/components/breadcrumb.rs:31-35 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/breadcrumb.rs` and `demos/admin/src/components/breadcrumb.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/breadcrumb.rs:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/topcoat-ui/registry/src/components/dropdown_menu.rs:331— crates/topcoat-ui/registry/src/components/dropdown_menu.rs:331-335 | demos/admin/src/components/dropdown_menu.rs:331-335 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/dropdown_menu.rs` and `demos/admin/src/components/dropdown_menu.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/dropdown_menu.rs:331` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/topcoat-ui/registry/src/components/label.rs:37— crates/topcoat-ui/registry/src/components/label.rs:37-41 | demos/admin/src/components/label.rs:37-41 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/label.rs` and `demos/admin/src/components/label.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/label.rs:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/topcoat-view/src/internal/live_view.rs:107— crates/topcoat-view/src/internal/live_view.rs:107-111 | crates/topcoat-view/src/internal/move_view.rs:72-76 — 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 (5 lines × 2) crates/topcoat-router/grammar/src/page.rs:236— crates/topcoat-router/grammar/src/page.rs:236-240 | crates/topcoat-router/grammar/src/route.rs:248-252 — before extracting anything, compare `crates/topcoat-router/grammar/src/page.rs` and `crates/topcoat-router/grammar/src/route.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-router/grammar/src/page.rs:236` 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.
MethodTooLong: Props.to_tokens crates/topcoat-view/grammar/src/props.rs:137— MethodTooLong — to_tokens runs 141 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 41 over it, 1.41× 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: Component.to_tokens crates/topcoat-view/grammar/src/component.rs:56— MethodTooLong — to_tokens runs 121 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 21 over it, 1.21× 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: Route.to_tokens crates/topcoat-router/grammar/src/route.rs:101— MethodTooLong — to_tokens runs 109 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 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Record.to_tokens crates/topcoat-runtime/grammar/src/record.rs:103— MethodTooLong — to_tokens runs 106 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 6 over it, 1.06× 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: Page.to_tokens crates/topcoat-router/grammar/src/page.rs:108— MethodTooLong — to_tokens runs 103 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 3 over it, 1.03× 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: Shard.to_tokens crates/topcoat-runtime/grammar/src/shard.rs:45— MethodTooLong — to_tokens runs 102 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 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (15 lines × 2) crates/topcoat-router/grammar/src/layer.rs:83— crates/topcoat-router/grammar/src/layer.rs:83-97 | crates/topcoat-router/grammar/src/route.rs:107-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.
Duplicated block (15 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:229— crates/topcoat-ui/registry/src/components/sidebar.rs:229-243 | demos/admin/src/components/sidebar.rs:229-243 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (15 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:256— crates/topcoat-ui/registry/src/components/sidebar.rs:256-270 | demos/admin/src/components/sidebar.rs:256-270 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (15 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:720— crates/topcoat-ui/registry/src/components/sidebar.rs:720-734 | demos/admin/src/components/sidebar.rs:720-734 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (15 lines × 2) crates/topcoat-ui/registry/src/components/floating.rs:62— crates/topcoat-ui/registry/src/components/floating.rs:62-76 | demos/admin/src/components/floating.rs:62-76 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/floating.rs` and `demos/admin/src/components/floating.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (15 lines × 2) crates/topcoat-ui/registry/src/components/button.rs:136— crates/topcoat-ui/registry/src/components/button.rs:136-150 | demos/admin/src/components/button.rs:136-150 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/button.rs` and `demos/admin/src/components/button.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/button.rs:136` 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) crates/topcoat-core/grammar/src/common/pretty/printer.rs:146— crates/topcoat-core/grammar/src/common/pretty/printer.rs:146-151 | crates/topcoat-core/grammar/src/common/pretty/printer.rs:165-170 — 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 `crates/topcoat-core/grammar/src/common/pretty/printer.rs:146` 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) crates/topcoat-router/src/builder.rs:373— crates/topcoat-router/src/builder.rs:373-378 | crates/topcoat-router/src/builder.rs:402-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/topcoat-asset/grammar/src/asset.rs:133— crates/topcoat-asset/grammar/src/asset.rs:133-138 | crates/topcoat-l10n/grammar/src/fluent/messages.rs:211-216 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/topcoat-cli/src/ui/list.rs:20— crates/topcoat-cli/src/ui/list.rs:20-25 | crates/topcoat-cli/src/ui/remove.rs:20-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) crates/topcoat-view/grammar/src/attributes/attribute_value.rs:55— crates/topcoat-view/grammar/src/attributes/attribute_value.rs:55-60 | crates/topcoat-view/grammar/src/attributes/event_handler.rs:50-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) crates/topcoat-l10n/src/fluent/format/datetime.rs:22— crates/topcoat-l10n/src/fluent/format/datetime.rs:22-27 | crates/topcoat-l10n/src/fluent/format/datetime.rs:30-35 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `intls` to `&IntlLangMemoizer` in one and `&concurrent::IntlLangMemoizer` 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 (7 lines × 2) crates/topcoat-font/src/style.rs:137— crates/topcoat-font/src/style.rs:137-143 | crates/topcoat-font/src/weight.rs:151-157 — 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) crates/topcoat-ui/registry/src/components/sidebar.rs:531— crates/topcoat-ui/registry/src/components/sidebar.rs:531-537 | demos/admin/src/components/sidebar.rs:531-537 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) crates/topcoat-font/grammar/src/font_face/display.rs:97— crates/topcoat-font/grammar/src/font_face/display.rs:97-103 | crates/topcoat-font/grammar/src/font_face/weight.rs:94-100 — before extracting anything, compare `crates/topcoat-font/grammar/src/font_face/display.rs` and `crates/topcoat-font/grammar/src/font_face/weight.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) crates/topcoat-ui/src/manage/package.rs:62— crates/topcoat-ui/src/manage/package.rs:62-69 | crates/topcoat-ui/src/manage/workspace.rs:57-63 — 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) crates/topcoat-router/src/module/router.rs:267— crates/topcoat-router/src/module/router.rs:267-273 | crates/topcoat-router/src/module/router.rs:312-318 — 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 `crates/topcoat-router/src/module/router.rs:267` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) demos/admin/src/features/customer.rs:42— demos/admin/src/features/customer.rs:42-48 | demos/admin/src/features/user.rs:48-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
No authorization — No [Authorize]/policies and no imperative guard methods (throw-on-violation) were found — endpoints may be unprotected.
No authorization REDACTED:31— `MapGet("/products")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization REDACTED:32— `MapGet("/products/{id}")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization REDACTED:33— `MapPost("/cart")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
No authorization benchmarks/apps/aspnet/Program.cs:71— `MapGet("/health")` serves requests and nothing authorizes it: no [Authorize] or RequireAuthorization on it or its controller/group, no fallback policy, no auth-gate middleware and no imperative guard in this codebase.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×5
Edited copy of a member (9 corresponding lines) crates/topcoat-cookie/src/private.rs:38— crates/topcoat-cookie/src/private.rs:38-46 | crates/topcoat-cookie/src/signed.rs:37-47 — 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) crates/topcoat-cookie/src/private.rs:28— crates/topcoat-cookie/src/private.rs:28-36 | crates/topcoat-cookie/src/signed.rs:27-35 — 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) crates/topcoat-view/grammar/src/attributes/hir/builder.rs:109— crates/topcoat-view/grammar/src/attributes/hir/builder.rs:109-117 | crates/topcoat-view/grammar/src/view/hir/builder.rs:209-217 — 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) crates/topcoat-asset/src/asset.rs:213— crates/topcoat-asset/src/asset.rs:213-221 | crates/topcoat-l10n/src/fluent/record.rs:309-317 — 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) demos/admin/src/features/order.rs:48— demos/admin/src/features/order.rs:48-56 | demos/admin/src/features/order.rs:179-187 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×5
Edited copy of a member (8 corresponding lines) crates/topcoat-router/src/layer.rs:176— crates/topcoat-router/src/layer.rs:176-186 | crates/topcoat-router/src/page.rs:282-289 — 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) crates/topcoat-router/grammar/src/page.rs:48— crates/topcoat-router/grammar/src/page.rs:48-55 | crates/topcoat-router/grammar/src/route.rs:45-52 — 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) crates/topcoat-view/grammar/src/view/element_name.rs:84— crates/topcoat-view/grammar/src/view/element_name.rs:84-92 | crates/topcoat-view/grammar/src/attributes/attribute_key.rs:64-71 — 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) demos/admin/src/app/_admin/_dashboard.rs:135— demos/admin/src/app/_admin/_dashboard.rs:135-148 | demos/admin/src/app/_admin/_dashboard.rs:150-157 — 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) demos/admin/src/features/locale.rs:26— demos/admin/src/features/locale.rs:26-33 | demos/admin/src/features/theme.rs:55-62 — 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 (19 lines × 2) crates/topcoat-ui/registry/src/components/dropdown_menu.rs:251— crates/topcoat-ui/registry/src/components/dropdown_menu.rs:251-269 | demos/admin/src/components/dropdown_menu.rs:251-269 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/dropdown_menu.rs` and `demos/admin/src/components/dropdown_menu.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (19 lines × 2) crates/topcoat-ui/registry/src/components/dropdown_menu.rs:286— crates/topcoat-ui/registry/src/components/dropdown_menu.rs:286-304 | demos/admin/src/components/dropdown_menu.rs:286-304 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/dropdown_menu.rs` and `demos/admin/src/components/dropdown_menu.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (19 lines × 2) crates/topcoat-ui/registry/src/components/pagination.rs:103— crates/topcoat-ui/registry/src/components/pagination.rs:103-121 | demos/admin/src/components/pagination.rs:103-121 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/pagination.rs` and `demos/admin/src/components/pagination.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (19 lines × 2) crates/topcoat-ui/registry/src/components/select.rs:47— crates/topcoat-ui/registry/src/components/select.rs:47-65 | demos/admin/src/components/select.rs:47-65 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/select.rs` and `demos/admin/src/components/select.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/select.rs:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) demos/admin/src/app/_admin/orders.rs:182— demos/admin/src/app/_admin/orders.rs:182-200 | demos/admin/src/app/_admin/products.rs:180-198 — before extracting anything, compare `demos/admin/src/app/_admin/orders.rs` and `demos/admin/src/app/_admin/products.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `demos/admin/src/app/_admin/orders.rs:182` 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 (8 lines × 2) crates/topcoat-core/grammar/src/common/pretty/printer.rs:197— crates/topcoat-core/grammar/src/common/pretty/printer.rs:197-204 | crates/topcoat-core/grammar/src/common/pretty/printer.rs:210-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/topcoat-core/grammar/src/common/pretty/printer.rs:218` calls `scan_force_break` and `crates/topcoat-core/grammar/src/common/pretty/printer.rs:205` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) crates/topcoat-cli/src/ui/add.rs:28— crates/topcoat-cli/src/ui/add.rs:28-35 | crates/topcoat-cli/src/ui/init.rs:24-31 — 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 (8 lines × 2) crates/topcoat-ui/registry/src/components/button.rs:75— crates/topcoat-ui/registry/src/components/button.rs:75-82 | demos/admin/src/components/button.rs:75-82 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/button.rs` and `demos/admin/src/components/button.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) crates/topcoat-font/grammar/src/font_face/format.rs:27— crates/topcoat-font/grammar/src/font_face/format.rs:27-34 | crates/topcoat-font/grammar/src/font_face/tech.rs:27-34 — 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 (8 lines × 2) demos/admin/src/app/_admin/orders.rs:50— demos/admin/src/app/_admin/orders.rs:50-57 | demos/admin/src/app/_admin/products.rs:48-55 — before extracting anything, compare `demos/admin/src/app/_admin/orders.rs` and `demos/admin/src/app/_admin/products.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `sort` to `OrderSort` in one and `ProductSort` 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.
topcoat_cli::dev::watch::gitignore_matchers (cognitive 29) crates/topcoat-cli/src/dev/watch.rs:325— topcoat_cli::dev::watch::gitignore_matchers has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
topcoat_cli::new::generate::generate (cognitive 28) crates/topcoat-cli/src/new/generate.rs:384— topcoat_cli::new::generate::generate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 5, boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
topcoat_cli::dev::broadcast_server::handle_socket (cognitive 19) crates/topcoat-cli/src/dev/broadcast_server.rs:143— topcoat_cli::dev::broadcast_server::handle_socket has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (6 pts), boolean chains 2, loops 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.
topcoat_cli::common::cargo::progress::last_count (cognitive 18) crates/topcoat-cli/src/common/cargo/progress.rs:40— topcoat_cli::common::cargo::progress::last_count has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 3 (5 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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×4
REDACTED
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×4
Edited copy of a member (16 corresponding lines) crates/topcoat-font/grammar/src/font_face/display.rs:145— crates/topcoat-font/grammar/src/font_face/display.rs:145-160 | crates/topcoat-router/grammar/src/common/error_response.rs:107-124 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/topcoat-router/src/module/router.rs:262— crates/topcoat-router/src/module/router.rs:262-277 | crates/topcoat-router/src/module/router.rs:307-322 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/topcoat-core/grammar/src/common/lenient/field_value.rs:47— crates/topcoat-core/grammar/src/common/lenient/field_value.rs:47-67 | crates/topcoat-router/grammar/src/href.rs:150-165 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/topcoat-ui/registry/src/components/radio_group.rs:65— crates/topcoat-ui/registry/src/components/radio_group.rs:65-80 | crates/topcoat-ui/registry/src/components/switch.rs:38-53 — 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 copy of a member (6 corresponding lines) · ×4
Edited copy of a member (6 corresponding lines) crates/topcoat-view/grammar/src/attributes/bind_attribute.rs:83— crates/topcoat-view/grammar/src/attributes/bind_attribute.rs:83-88 | crates/topcoat-view/grammar/src/attributes/event_handler.rs:147-152 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/topcoat-view/grammar/src/attributes/attribute_value.rs:45— crates/topcoat-view/grammar/src/attributes/attribute_value.rs:45-50 | crates/topcoat-view/grammar/src/attributes/event_handler.rs:40-45 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/topcoat-view/grammar/src/attributes/attribute_key.rs:113— crates/topcoat-view/grammar/src/attributes/attribute_key.rs:113-118 | crates/topcoat-view/grammar/src/view/html_ident.rs:184-189 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/topcoat-view/grammar/src/template/template_or_runtime_expr.rs:48— crates/topcoat-view/grammar/src/template/template_or_runtime_expr.rs:48-53 | crates/topcoat-view/grammar/src/view/component.rs:69-74 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 2) crates/topcoat-core/grammar/src/common/pretty/trivia.rs:204— crates/topcoat-core/grammar/src/common/pretty/trivia.rs:204-220 | crates/topcoat-core/grammar/src/common/pretty/trivia.rs:240-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 × 2) crates/topcoat-view/src/html/attribute/key.rs:169— crates/topcoat-view/src/html/attribute/key.rs:169-185 | crates/topcoat-view/src/html/attribute/value.rs:348-364 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-view/src/html/attribute/key.rs:169` 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 (17 lines × 2) crates/topcoat-view/src/html/attribute/key.rs:192— crates/topcoat-view/src/html/attribute/key.rs:192-208 | crates/topcoat-view/src/html/attribute/value.rs:372-388 — 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 `crates/topcoat-view/src/html/attribute/key.rs:192` 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 (17 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:602— crates/topcoat-ui/registry/src/components/sidebar.rs:602-618 | demos/admin/src/components/sidebar.rs:602-618 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:602` 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.
Off the main sequence: topcoat-ui — topcoat-ui: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: topcoat — topcoat: abstractness 1.00, instability 0.96, distance 0.96 — zone of uselessness — abstract and unstable, so it's likely unused.
Off the main sequence: topcoat-core-grammar — topcoat-core-grammar: abstractness 0.11, instability 0.00, distance 0.89 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
Off the main sequence: topcoat-core — topcoat-core: abstractness 0.22, instability 0.00, distance 0.78 — zone of pain — concrete and depended on by 18 project(s), so it's rigid to change.
Hotspot: crates/topcoat-cli/src/fmt.rs crates/topcoat-cli/src/fmt.rs:47— crates/topcoat-cli/src/fmt.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in FmtCommand::run at line 47. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:46:39 +01:00' --until='2026-11-14 13:46:39 +01:00' --full-history --no-merges -- crates/topcoat-cli/src/fmt.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: crates/topcoat-view/src/buffer/renderer.rs crates/topcoat-view/src/buffer/renderer.rs:32— crates/topcoat-view/src/buffer/renderer.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in Renderer::execute at line 32. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:46:39 +01:00' --until='2026-11-14 13:46:39 +01:00' --full-history --no-merges -- crates/topcoat-view/src/buffer/renderer.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: crates/topcoat-view/grammar/src/view/node.rs crates/topcoat-view/grammar/src/view/node.rs:75— crates/topcoat-view/grammar/src/view/node.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in Node::parse at line 75. 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:46:39 +01:00' --until='2026-11-14 13:46:39 +01:00' --full-history --no-merges -- crates/topcoat-view/grammar/src/view/node.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.
topcoat_core_grammar::common::glob::walk (cognitive 23) crates/topcoat-core/grammar/src/common/glob.rs:171— topcoat_core_grammar::common::glob::walk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts), boolean chains 4, 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.
topcoat_core_grammar::common::lenient::expr::scanner::path (cognitive 20) crates/topcoat-core/grammar/src/common/lenient/expr/scanner.rs:247— topcoat_core_grammar::common::lenient::expr::scanner::path has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (5 pts), 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.
topcoat_core_grammar::common::pretty::syn::expr::chain (cognitive 17) crates/topcoat-core/grammar/src/common/pretty/syn/expr.rs:93— topcoat_core_grammar::common::pretty::syn::expr::chain has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyMethods: Length crates/topcoat-view/src/css/length.rs:194— TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: ViewBuffer crates/topcoat-view/src/buffer.rs:38— 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: Expr crates/topcoat-runtime/grammar/src/expr.rs:89— TooManyMethods — 31 methods, declared across 25 files: expr/expr_call.rs (3), src/expr.rs (2), expr/builtin_macro.rs (2), expr/expr_if.rs (2), +21 more file(s). The bar is 30 methods; this is 1 over it, 1.03× 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.
FunctionTooLong: topcoat_cli::new::generate::generate crates/topcoat-cli/src/new/generate.rs:384— FunctionTooLong — topcoat_cli::new::generate::generate 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: topcoat_ui::manage::add::add crates/topcoat-ui/src/manage/add.rs:130— FunctionTooLong — topcoat_ui::manage::add::add runs 144 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 44 over it, 1.44× 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: topcoat_cli::new::wizard::ask crates/topcoat-cli/src/new/wizard.rs:46— FunctionTooLong — topcoat_cli::new::wizard::ask runs 106 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 6 over it, 1.06× 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.
FileTooLong: syn/item.rs crates/topcoat-core/grammar/src/common/pretty/syn/item.rs— FileTooLong — 545 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 45 over it, 1.09× 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: components/sidebar.rs crates/topcoat-ui/registry/src/components/sidebar.rs— FileTooLong — 509 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 9 over it, 1.02× 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: syn/expr.rs crates/topcoat-core/grammar/src/common/pretty/syn/expr.rs— FileTooLong — 507 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 7 over it, 1.01× 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.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×3
REDACTED
REDACTED
REDACTED
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×3
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) crates/topcoat-view/grammar/src/attributes/attribute_node.rs:131— crates/topcoat-view/grammar/src/attributes/attribute_node.rs:131-145 | crates/topcoat-view/grammar/src/view/node.rs:122-138 — 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) crates/topcoat-view/grammar/src/view/element_tag.rs:30— crates/topcoat-view/grammar/src/view/element_tag.rs:30-44 | crates/topcoat-view/grammar/src/view/element_tag.rs:70-86 — 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) crates/topcoat-runtime/grammar/src/expr/builtin_macro.rs:269— crates/topcoat-runtime/grammar/src/expr/builtin_macro.rs:269-287 | crates/topcoat-runtime/grammar/src/expr/builtin_macro.rs:289-303 — 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 (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) crates/topcoat-view/src/internal/move_view.rs:52— crates/topcoat-view/src/internal/move_view.rs:52-66 | crates/topcoat-view/src/internal/move_view.rs:68-80 — 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) crates/topcoat-font/grammar/src/fontsource/font/list.rs:66— crates/topcoat-font/grammar/src/fontsource/font/list.rs:66-79 | crates/topcoat-router/grammar/src/method.rs:85-97 — 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) crates/topcoat-router/src/path.rs:421— crates/topcoat-router/src/path.rs:421-435 | crates/topcoat-router/src/path.rs:439-451 — 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 (14 corresponding lines) · ×3
Edited copy of a member (14 corresponding lines) crates/topcoat-core/src/memoize/cell.rs:111— crates/topcoat-core/src/memoize/cell.rs:111-124 | crates/topcoat-core/src/memoize/cell.rs:159-175 — These two members are one piece of code written twice and then edited apart: 14 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 (14 corresponding lines) crates/topcoat-view/src/hoist.rs:172— crates/topcoat-view/src/hoist.rs:172-185 | crates/topcoat-view/src/hoist.rs:187-203 — These two members are one piece of code written twice and then edited apart: 14 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 (14 corresponding lines) crates/topcoat-view/grammar/src/view/hir/builder.rs:119— crates/topcoat-view/grammar/src/view/hir/builder.rs:119-135 | crates/topcoat-view/grammar/src/view/hir/builder.rs:143-156 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×3
Edited copy of a member (10 corresponding lines) crates/topcoat-font/grammar/src/font_face/format.rs:51— crates/topcoat-font/grammar/src/font_face/format.rs:51-60 | crates/topcoat-font/grammar/src/font_face/tech.rs:51-60 — 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) crates/topcoat-view/grammar/src/attributes/hir/builder.rs:71— crates/topcoat-view/grammar/src/attributes/hir/builder.rs:71-80 | crates/topcoat-view/grammar/src/view/hir/builder.rs:162-172 — 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) crates/topcoat-router/src/error/service_unavailable.rs:67— crates/topcoat-router/src/error/service_unavailable.rs:67-76 | crates/topcoat-router/src/error/too_many_requests.rs:65-74 — 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) · ×3
Edited copy of a member (3 corresponding lines) crates/topcoat-ui/registry/src/components/skeleton.rs:25— crates/topcoat-ui/registry/src/components/skeleton.rs:25-27 | demos/admin/src/components/skeleton.rs:25-27 — 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) crates/topcoat-ui/registry/src/components/input.rs:30— crates/topcoat-ui/registry/src/components/input.rs:30-32 | demos/admin/src/components/input.rs:30-32 — 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) crates/topcoat-ui/registry/src/components/pagination.rs:82— crates/topcoat-ui/registry/src/components/pagination.rs:82-84 | demos/admin/src/components/pagination.rs:82-84 — 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.
Duplicated block (21 lines × 2) crates/topcoat-router/grammar/src/page.rs:242— crates/topcoat-router/grammar/src/page.rs:242-262 | crates/topcoat-router/grammar/src/route.rs:254-274 — before extracting anything, compare `crates/topcoat-router/grammar/src/page.rs` and `crates/topcoat-router/grammar/src/route.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-router/grammar/src/page.rs:242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) crates/topcoat-ui/registry/src/components/select.rs:98— crates/topcoat-ui/registry/src/components/select.rs:98-118 | demos/admin/src/components/select.rs:98-118 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/select.rs` and `demos/admin/src/components/select.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (21 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:648— crates/topcoat-ui/registry/src/components/sidebar.rs:648-668 | demos/admin/src/components/sidebar.rs:648-668 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (20 lines × 2) crates/topcoat-router/grammar/src/route.rs:114— crates/topcoat-router/grammar/src/route.rs:114-133 | crates/topcoat-runtime/grammar/src/procedure.rs:103-122 — before extracting anything, compare `crates/topcoat-router/grammar/src/route.rs` and `crates/topcoat-runtime/grammar/src/procedure.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-router/grammar/src/route.rs:114` 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 (20 lines × 2) crates/topcoat-router/grammar/src/route.rs:265— crates/topcoat-router/grammar/src/route.rs:265-284 | crates/topcoat-runtime/grammar/src/procedure.rs:206-225 — before extracting anything, compare `crates/topcoat-router/grammar/src/route.rs` and `crates/topcoat-runtime/grammar/src/procedure.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-router/grammar/src/route.rs:265` 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 (20 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:574— crates/topcoat-ui/registry/src/components/sidebar.rs:574-593 | demos/admin/src/components/sidebar.rs:574-593 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (9 lines × 2) crates/topcoat-view/grammar/src/attributes/attribute_node.rs:137— crates/topcoat-view/grammar/src/attributes/attribute_node.rs:137-145 | crates/topcoat-view/grammar/src/view/node.rs:130-138 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-view/grammar/src/attributes/attribute_node.rs:137` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/topcoat-router/src/page.rs:118— crates/topcoat-router/src/page.rs:118-126 | crates/topcoat-router/src/route.rs:165-173 — 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 `crates/topcoat-router/src/page.rs:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/topcoat-core/grammar/src/memoize.rs:31— crates/topcoat-core/grammar/src/memoize.rs:31-39 | crates/topcoat-router/grammar/src/query_params.rs:18-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Low cohesion: BundlerConfig (LCOM4 4) crates/topcoat-asset/src/bundler/config.rs:33— BundlerConfig's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Family (LCOM4 4) crates/topcoat-font/src/fontsource/family.rs:8— Family's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ProductForm (LCOM4 4) demos/admin/src/features/catalog.rs:234— ProductForm's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
topcoat_l10n::fluent::check::analysis::check_references (cognitive 40) crates/topcoat-l10n/src/fluent/check/analysis.rs:263— topcoat_l10n::fluent::check::analysis::check_references has cognitive complexity 40 (threshold 15). Drivers by points: if/else 4 (24 pts), loops 5 (15 pts), boolean chains 1 (nesting depth added 30). 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.
topcoat_l10n::fluent::check::analysis::check_calls (cognitive 23) crates/topcoat-l10n/src/fluent/check/analysis.rs:194— topcoat_l10n::fluent::check::analysis::check_calls has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 pts), match/switch 2 (6 pts) (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.
Lexer::skip_raw_string (cognitive 26) crates/topcoat-core/grammar/src/common/pretty/trivia.rs:260— Lexer::skip_raw_string has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (10 pts), match/switch 1 (2 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.
Lexer::next (cognitive 22) crates/topcoat-core/grammar/src/common/pretty/trivia.rs:315— Lexer::next has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FontsourceFont::parse (cognitive 25) crates/topcoat-font/grammar/src/fontsource/font.rs:153— FontsourceFont::parse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (24 pts), 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.
FontsourceFont::to_tokens (cognitive 18) crates/topcoat-font/grammar/src/fontsource/font.rs:41— FontsourceFont::to_tokens has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 5, match/switch 4 (nesting depth added 6). 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.
Props::to_tokens (cognitive 17) crates/topcoat-view/grammar/src/props.rs:137— Props::to_tokens has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 2, 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.
Props::new (cognitive 16) crates/topcoat-view/grammar/src/props.rs:71— Props::new has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 1 (4 pts), 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.
Change coupling: layout.rs ↔ page.rs crates/topcoat-router/grammar/src/layout.rs:1— `crates/topcoat-router/grammar/src/layout.rs` and `crates/topcoat-router/grammar/src/page.rs` change together 81% of the time (17 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `e6b12f47` fix(view): allow props and locals to share component names (#582); `34d2f38d` feat(runtime)!: replace signal custom syntax with an ordinary rust fu…; `4165610f` refactor(router): rename erased constant for more readable profiler a… — run `git show` on any of them.
Change coupling: memoize.rs ↔ cache.rs crates/topcoat-core/grammar/src/memoize.rs:1— `crates/topcoat-core/grammar/src/memoize.rs` and `crates/topcoat-core/src/memoize/cache.rs` change together 67% of the time (10 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `38c07beb` fix(core): memoize + borrowed async arg fails with AsyncFnOnce lifeti…; `40e2188d` feat(core): use 128-bit hash instead of Clone and Eq for memoization …; `af925bbb` Rewrite MemoizeCache to return direct references (at that commit the files were still `crates/topcoat-macro/src/memoize/mod.rs` and `crates/topcoat-core/src/context/memoize.rs`) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) crates/topcoat-font/grammar/src/fontsource/font_face/subset.rs:99— crates/topcoat-font/grammar/src/fontsource/font_face/subset.rs:99-115 | crates/topcoat-font/grammar/src/fontsource/font_face/weight.rs:92-108 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) demos/admin/src/features/customer.rs:127— demos/admin/src/features/customer.rs:127-143 | demos/admin/src/features/order.rs:253-272 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×2
Edited copy of a member (11 corresponding lines) crates/topcoat-view/grammar/src/view/html_ident.rs:216— crates/topcoat-view/grammar/src/view/html_ident.rs:216-226 | crates/topcoat-view/grammar/src/view/html_ident.rs:231-241 — 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) crates/topcoat-ui/registry/src/components/alert.rs:65— crates/topcoat-ui/registry/src/components/alert.rs:65-75 | crates/topcoat-ui/registry/src/components/toggle.rs:99-110 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×2
Edited copies of one member (3 members, 10+ corresponding lines) crates/topcoat-font/grammar/src/font_face/style.rs:307— crates/topcoat-font/grammar/src/font_face/style.rs:307-318 | crates/topcoat-font/grammar/src/font_face/unicode.rs:266-275 | crates/topcoat-font/grammar/src/font_face/weight.rs:221-231 — 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.
Edited copies of one member (3 members, 10+ corresponding lines) crates/topcoat-router/src/content/css.rs:54— crates/topcoat-router/src/content/css.rs:54-63 | crates/topcoat-router/src/content/html.rs:54-63 | crates/topcoat-router/src/content/js.rs:45-54 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×2
Edited copies of one member (4 members, 6+ corresponding lines) crates/topcoat-font/grammar/src/font_face/display.rs:83— crates/topcoat-font/grammar/src/font_face/display.rs:83-88 | crates/topcoat-font/grammar/src/font_face/family.rs:78-83 | crates/topcoat-font/grammar/src/font_face/style.rs:81-86 | crates/topcoat-font/grammar/src/font_face/weight.rs:80-85 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 6+ corresponding lines) crates/topcoat-l10n/src/langid/language.rs:24— crates/topcoat-l10n/src/langid/language.rs:24-29 | crates/topcoat-l10n/src/langid/region.rs:22-27 | crates/topcoat-l10n/src/langid/script.rs:21-26 | crates/topcoat-l10n/src/langid/variant.rs:23-28 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Duplicated block (18 lines × 2) crates/topcoat-router/grammar/src/page.rs:253— crates/topcoat-router/grammar/src/page.rs:253-270 | crates/topcoat-runtime/grammar/src/shard.rs:218-235 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-router/grammar/src/page.rs:253` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) crates/topcoat-ui/registry/src/components/floating.rs:24— crates/topcoat-ui/registry/src/components/floating.rs:24-41 | demos/admin/src/components/floating.rs:24-41 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/floating.rs` and `demos/admin/src/components/floating.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (57 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:158— crates/topcoat-ui/registry/src/components/sidebar.rs:158-214 | demos/admin/src/components/sidebar.rs:158-214 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (57 lines × 2) crates/topcoat-ui/registry/src/components/separator.rs:23— crates/topcoat-ui/registry/src/components/separator.rs:23-79 | demos/admin/src/components/separator.rs:23-79 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/separator.rs` and `demos/admin/src/components/separator.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/separator.rs:23` 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 (13 lines × 3) crates/topcoat-core/grammar/src/common/pretty/trivia.rs:106— crates/topcoat-core/grammar/src/common/pretty/trivia.rs:106-118 | crates/topcoat-core/grammar/src/common/pretty/trivia.rs:139-151 | crates/topcoat-core/grammar/src/common/pretty/trivia.rs:185-197 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-core/grammar/src/common/pretty/trivia.rs:106` 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, `crates/topcoat-core/grammar/src/common/pretty/trivia.rs:136` calls `bump` and `crates/topcoat-core/grammar/src/common/pretty/trivia.rs:103` 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 (13 lines × 3) demos/admin/src/app/_admin/customers.rs:71— demos/admin/src/app/_admin/customers.rs:71-83 | demos/admin/src/app/_admin/orders.rs:78-90 | demos/admin/src/app/_admin/products.rs:76-88 — before extracting anything, compare `demos/admin/src/app/_admin/orders.rs` and `demos/admin/src/app/_admin/products.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `demos/admin/src/app/_admin/customers.rs:71` 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, `demos/admin/src/app/_admin/orders.rs:77` calls `element_id` and `demos/admin/src/app/_admin/customers.rs:70` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) crates/topcoat-router/grammar/src/page.rs:177— crates/topcoat-router/grammar/src/page.rs:177-188 | crates/topcoat-router/grammar/src/route.rs:165-176 — before extracting anything, compare `crates/topcoat-router/grammar/src/page.rs` and `crates/topcoat-router/grammar/src/route.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-router/grammar/src/page.rs:177` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/topcoat-ui/registry/src/components/sidebar.rs:412— crates/topcoat-ui/registry/src/components/sidebar.rs:412-423 | demos/admin/src/components/sidebar.rs:412-423 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sidebar.rs` and `demos/admin/src/components/sidebar.rs` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sidebar.rs:412` 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 (82 lines × 2) crates/topcoat-ui/registry/src/components/card.rs:44— crates/topcoat-ui/registry/src/components/card.rs:44-125 | demos/admin/src/components/card.rs:44-125 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/card.rs` and `demos/admin/src/components/card.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/card.rs:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (82 lines × 2) crates/topcoat-ui/registry/src/components/tabs.rs:38— crates/topcoat-ui/registry/src/components/tabs.rs:38-119 | demos/admin/src/components/tabs.rs:38-119 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/tabs.rs` and `demos/admin/src/components/tabs.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/tabs.rs:38` 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 × 3) crates/topcoat-font/grammar/src/font_face/display.rs:107— crates/topcoat-font/grammar/src/font_face/display.rs:107-112 | crates/topcoat-font/grammar/src/font_face/style.rs:105-110 | crates/topcoat-font/grammar/src/font_face/weight.rs:104-109 — before extracting anything, compare `crates/topcoat-font/grammar/src/font_face/display.rs` and `crates/topcoat-font/grammar/src/font_face/weight.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 3) crates/topcoat-font/grammar/src/font_face/display.rs:117— crates/topcoat-font/grammar/src/font_face/display.rs:117-122 | crates/topcoat-font/grammar/src/font_face/style.rs:115-120 | crates/topcoat-font/grammar/src/font_face/weight.rs:114-119 — before extracting anything, compare `crates/topcoat-font/grammar/src/font_face/display.rs` and `crates/topcoat-font/grammar/src/font_face/weight.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×2
Edited copies of one member (3 members, 4+ corresponding lines) demos/admin/src/features/catalog.rs:208— demos/admin/src/features/catalog.rs:208-211 | demos/admin/src/features/customer.rs:145-148 | demos/admin/src/features/order.rs:274-277 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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, 4+ corresponding lines) demos/admin/src/features/catalog.rs:37— demos/admin/src/features/catalog.rs:37-40 | demos/admin/src/features/customer.rs:37-40 | demos/admin/src/features/order.rs:42-45 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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.
Renderer::execute (cyclomatic 29) crates/topcoat-view/src/buffer/renderer.rs:32— Renderer::execute has cyclomatic complexity 29 (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.
topcoat_cli::new::generate::generate (cyclomatic 26) crates/topcoat-cli/src/new/generate.rs:384— topcoat_cli::new::generate::generate 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.
Input::resolve (cyclomatic 23) crates/topcoat-cli/src/new/input.rs:298— Input::resolve 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.
topcoat_ui::manage::add::add (cyclomatic 23) crates/topcoat-ui/src/manage/add.rs:130— topcoat_ui::manage::add::add 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.
Scanner::operand (cyclomatic 22) crates/topcoat-core/grammar/src/common/lenient/expr/scanner.rs:69— Scanner::operand has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
topcoat_core_grammar::common::glob::walk (cyclomatic 18) crates/topcoat-core/grammar/src/common/glob.rs:171— topcoat_core_grammar::common::glob::walk 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.
Bindings::collect_pattern (cyclomatic 17) crates/topcoat-view/grammar/src/view/hir/bindings.rs:80— Bindings::collect_pattern 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.
FmtCommand::run (cyclomatic 16) crates/topcoat-cli/src/fmt.rs:47— FmtCommand::run 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.
Lexer::next (cyclomatic 16) crates/topcoat-core/grammar/src/common/pretty/trivia.rs:315— Lexer::next 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.
Node::parse (cyclomatic 16) crates/topcoat-view/grammar/src/view/node.rs:75— Node::parse 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.
morph.morphChildren (cyclomatic 16) crates/topcoat-core/browser/morph.ts:146— morph.morphChildren 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.
Dead code: Listing benchmarks/apps/aspnet/Infrastructure/Urls.cs:21— Method Listing — Roslyn's SymbolFinder walked every project the solution loads, including Harbor, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
topcoat_ui::manage::add::add (cognitive 36) crates/topcoat-ui/src/manage/add.rs:130— topcoat_ui::manage::add::add has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 4 (9 pts), loops 5 (7 pts), boolean chains 4 (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.
morph.morphChildren (cognitive 30) crates/topcoat-core/browser/morph.ts:146— morph.morphChildren has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (6 pts), boolean chains 5, ternaries 1 (4 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.
DevCommand::run (cognitive 29) crates/topcoat-cli/src/dev.rs:35— DevCommand::run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (25 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FontFace::parse (cognitive 29) crates/topcoat-font/grammar/src/font_face.rs:38— FontFace::parse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 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.
FmtCommand::run (cognitive 26) crates/topcoat-cli/src/fmt.rs:47— FmtCommand::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 3 (4 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.
Printer::scan_trivia (cognitive 25) crates/topcoat-core/grammar/src/common/pretty/printer.rs:190— Printer::scan_trivia has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (9 pts), boolean chains 4, match/switch 1 (2 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.
FontsourceFontFace::parse (cognitive 25) crates/topcoat-font/grammar/src/fontsource/font_face.rs:164— FontsourceFontFace::parse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (24 pts), 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.
topcoat_runtime::layer::socket::run (cognitive 23) crates/topcoat-runtime/src/layer/socket.rs:230— topcoat_runtime::layer::socket::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
morph.findBestMatch (cognitive 22) crates/topcoat-core/browser/morph.ts:210— morph.findBestMatch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 4, loops 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.
OriginPolicy::check (cognitive 19) crates/topcoat-router/src/origin.rs:133— OriginPolicy::check has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 8). 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.
Input::resolve (cognitive 18) crates/topcoat-cli/src/new/input.rs:298— Input::resolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 7, match/switch 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.
Scanner::continuation (cognitive 18) crates/topcoat-core/grammar/src/common/lenient/expr/scanner.rs:133— Scanner::continuation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (8 pts), loops 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.
FontSource::parse (cognitive 18) crates/topcoat-font/grammar/src/font_face/source.rs:147— FontSource::parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
morph.syncAttributes (cognitive 18) crates/topcoat-core/browser/morph.ts:396— morph.syncAttributes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RouterBuilder::build (cognitive 17) crates/topcoat-router/src/builder.rs:338— RouterBuilder::build has cognitive complexity 17 (threshold 15). Drivers by points: loops 8 (13 pts), if/else 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 7). 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.
ModuleRouterBuilder::module_path_to_path (cognitive 17) crates/topcoat-router/src/module/router.rs:94— ModuleRouterBuilder::module_path_to_path has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 4 (7 pts), loops 1 (nesting depth added 8). 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.
morph.createContext::collect (cognitive 17) crates/topcoat-core/browser/morph.ts:95— morph.createContext::collect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 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.
Memoize::to_tokens (cognitive 16) crates/topcoat-core/grammar/src/memoize.rs:85— Memoize::to_tokens has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 2, 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, 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.
Tag::attribute (cognitive 16) crates/topcoat-mail/src/text.rs:262— Tag::attribute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, match/switch 1 (3 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.
TooManyFields: Event crates/topcoat-runtime/src/surrogate/event.rs:10— TooManyFields — 35 stored fields beside 3 methods. The bar is 30 stored fields; this is 5 over it, 1.17× 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 (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) crates/topcoat-font/grammar/src/fontsource/font.rs:153— crates/topcoat-font/grammar/src/fontsource/font.rs:153-208 | crates/topcoat-font/grammar/src/fontsource/font_face.rs:164-221 — 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· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/topcoat-router/grammar/src/page.rs:108— crates/topcoat-router/grammar/src/page.rs:108-270 | crates/topcoat-router/grammar/src/route.rs:101-284 | crates/topcoat-runtime/grammar/src/procedure.rs:89-225 | crates/topcoat-runtime/grammar/src/shard.rs:45-235 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (88 corresponding lines) · ×1
Edited copy of a member (88 corresponding lines) crates/topcoat-router/grammar/src/layer.rs:78— crates/topcoat-router/grammar/src/layer.rs:78-185 | crates/topcoat-router/grammar/src/layout.rs:110-197 — These two members are one piece of code written twice and then edited apart: 88 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, 30+ corresponding lines) · ×1
Edited copies of one member (3 members, 30+ corresponding lines) crates/topcoat-asset/grammar/src/asset.rs:161— crates/topcoat-asset/grammar/src/asset.rs:161-192 | crates/topcoat-l10n/grammar/src/fluent/translate/argument.rs:54-83 | crates/topcoat-router/grammar/src/href.rs:101-132 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) crates/topcoat-font/grammar/src/font_face/format.rs:77— crates/topcoat-font/grammar/src/font_face/format.rs:77-94 | crates/topcoat-font/grammar/src/font_face/tech.rs:77-94 — 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 (1 corresponding lines) · ×1
Edited copy of a member (1 corresponding lines) crates/topcoat-metadata/src/metadata/open_graph.rs:120— crates/topcoat-metadata/src/metadata/open_graph.rs:120-120 | crates/topcoat-metadata/src/page_metadata.rs:128-128 — These two members are one piece of code written twice and then edited apart: 1 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, 18+ corresponding lines) · ×1
Edited copies of one member (4 members, 18+ corresponding lines) crates/topcoat-router/grammar/src/page.rs:66— crates/topcoat-router/grammar/src/page.rs:66-84 | crates/topcoat-router/grammar/src/route.rs:60-77 | crates/topcoat-runtime/grammar/src/shard/item.rs:24-48 | crates/topcoat-view/grammar/src/component/item.rs:24-48 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) crates/topcoat-core/grammar/src/common/pretty/trivia.rs:94— crates/topcoat-core/grammar/src/common/pretty/trivia.rs:94-121 | crates/topcoat-core/grammar/src/common/pretty/trivia.rs:124-154 — 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 copies of one member (4 members, 19+ corresponding lines) · ×1
Edited copies of one member (4 members, 19+ corresponding lines) crates/topcoat-view/src/html/attribute/key.rs:167— crates/topcoat-view/src/html/attribute/key.rs:167-185 | crates/topcoat-view/src/html/attribute/key.rs:190-208 | crates/topcoat-view/src/html/attribute/value.rs:345-364 | crates/topcoat-view/src/html/attribute/value.rs:369-388 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) crates/topcoat-ui/registry/src/components/select.rs:92— crates/topcoat-ui/registry/src/components/select.rs:92-118 | demos/admin/src/components/select.rs:92-118 — 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, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) crates/topcoat-view/grammar/src/attributes/attribute_key.rs:75— crates/topcoat-view/grammar/src/attributes/attribute_key.rs:75-84 | crates/topcoat-view/grammar/src/attributes/attribute_value.rs:32-41 | crates/topcoat-view/grammar/src/attributes/event_handler.rs:27-36 | crates/topcoat-view/grammar/src/template/template_or_runtime_expr.rs:16-25 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) crates/topcoat-font/grammar/src/font_face/style.rs:229— crates/topcoat-font/grammar/src/font_face/style.rs:229-236 | crates/topcoat-font/grammar/src/font_face/unicode.rs:154-165 | crates/topcoat-font/grammar/src/font_face/weight.rs:147-158 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 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 (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) crates/topcoat-ui/registry/src/components/accordion.rs:87— crates/topcoat-ui/registry/src/components/accordion.rs:87-110 | crates/topcoat-ui/registry/src/components/navigation_menu.rs:124-149 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) crates/topcoat-font/src/face.rs:194— crates/topcoat-font/src/face.rs:194-202 | crates/topcoat-font/src/source.rs:277-285 | crates/topcoat-font/src/unicode.rs:166-174 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 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, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) crates/topcoat-router/src/content/css.rs:66— crates/topcoat-router/src/content/css.rs:66-77 | crates/topcoat-router/src/content/form.rs:184-195 | crates/topcoat-router/src/content/html.rs:66-77 — 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, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) crates/topcoat-ui/registry/src/components/hover_card.rs:76— crates/topcoat-ui/registry/src/components/hover_card.rs:76-89 | crates/topcoat-ui/registry/src/components/kbd.rs:39-51 | crates/topcoat-ui/registry/src/components/tooltip.rs:81-95 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) crates/topcoat-view/grammar/src/attributes/attribute.rs:81— crates/topcoat-view/grammar/src/attributes/attribute.rs:81-87 | crates/topcoat-view/grammar/src/attributes/bind_attribute.rs:65-72 | crates/topcoat-view/grammar/src/attributes/event_handler.rs:129-136 — 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 copies of one member (4 members, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) crates/topcoat-font/grammar/src/font_face/display.rs:66— crates/topcoat-font/grammar/src/font_face/display.rs:66-72 | crates/topcoat-font/grammar/src/font_face/family.rs:61-67 | crates/topcoat-font/grammar/src/font_face/style.rs:64-70 | crates/topcoat-font/grammar/src/font_face/weight.rs:63-69 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) crates/topcoat-router/grammar/src/layer.rs:40— crates/topcoat-router/grammar/src/layer.rs:40-43 | crates/topcoat-router/grammar/src/layout.rs:40-43 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 3+ corresponding lines) · ×1
Edited copies of one member (4 members, 3+ corresponding lines) crates/topcoat-font/grammar/src/font_face/display.rs:76— crates/topcoat-font/grammar/src/font_face/display.rs:76-78 | crates/topcoat-font/grammar/src/font_face/family.rs:71-73 | crates/topcoat-font/grammar/src/font_face/style.rs:74-76 | crates/topcoat-font/grammar/src/font_face/weight.rs:73-75 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 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.
Duplicated block (48 lines × 2) crates/topcoat-font/grammar/src/fontsource/font.rs:154— crates/topcoat-font/grammar/src/fontsource/font.rs:154-201 | crates/topcoat-font/grammar/src/fontsource/font_face.rs:165-212 — 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 `crates/topcoat-font/grammar/src/fontsource/font.rs:154` 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 (22 lines × 2) crates/topcoat-ui/registry/src/components/button.rs:32— crates/topcoat-ui/registry/src/components/button.rs:32-53 | demos/admin/src/components/button.rs:32-53 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/button.rs` and `demos/admin/src/components/button.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (19–20 lines × 2) crates/topcoat-runtime/grammar/src/procedure.rs:154— crates/topcoat-runtime/grammar/src/procedure.rs:154-172 | crates/topcoat-runtime/grammar/src/shard.rs:158-177 — 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 `crates/topcoat-runtime/grammar/src/procedure.rs:154` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 2) crates/topcoat-ui/registry/src/components/pagination.rs:182— crates/topcoat-ui/registry/src/components/pagination.rs:182-197 | demos/admin/src/components/pagination.rs:182-197 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/pagination.rs` and `demos/admin/src/components/pagination.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/pagination.rs:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–11 lines × 2) crates/topcoat-router/grammar/src/layer.rs:81— crates/topcoat-router/grammar/src/layer.rs:81-89 | crates/topcoat-runtime/grammar/src/procedure.rs:91-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-router/grammar/src/layer.rs:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) crates/topcoat-core/grammar/src/common/pretty/syn/common.rs:122— crates/topcoat-core/grammar/src/common/pretty/syn/common.rs:122-130 | crates/topcoat-view/grammar/src/live.rs:60-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-view/grammar/src/live.rs:60` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) crates/topcoat-asset/grammar/src/asset.rs:176— crates/topcoat-asset/grammar/src/asset.rs:176-184 | crates/topcoat-l10n/grammar/src/fluent/translate/argument.rs:67-75 | crates/topcoat-router/grammar/src/href.rs:116-124 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-asset/grammar/src/asset.rs:176` 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 (101 lines × 2) crates/topcoat-ui/registry/src/components/avatar.rs:24— crates/topcoat-ui/registry/src/components/avatar.rs:24-124 | demos/admin/src/components/avatar.rs:24-124 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/avatar.rs` and `demos/admin/src/components/avatar.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/avatar.rs:24` 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 (56 lines × 2) crates/topcoat-ui/registry/src/components/badge.rs:27— crates/topcoat-ui/registry/src/components/badge.rs:27-82 | demos/admin/src/components/badge.rs:27-82 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/badge.rs` and `demos/admin/src/components/badge.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/badge.rs:27` 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 (112 lines × 2) crates/topcoat-ui/registry/src/components/dialog.rs:73— crates/topcoat-ui/registry/src/components/dialog.rs:73-184 | demos/admin/src/components/dialog.rs:73-184 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/dialog.rs` and `demos/admin/src/components/dialog.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/dialog.rs:73` 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 (247 lines × 2) crates/topcoat-ui/registry/src/components/field.rs:23— crates/topcoat-ui/registry/src/components/field.rs:23-269 | demos/admin/src/components/field.rs:23-269 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/field.rs` and `demos/admin/src/components/field.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/field.rs:23` 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 (96 lines × 2) crates/topcoat-ui/registry/src/components/sheet.rs:58— crates/topcoat-ui/registry/src/components/sheet.rs:58-153 | demos/admin/src/components/sheet.rs:58-153 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/sheet.rs` and `demos/admin/src/components/sheet.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/sheet.rs:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (149 lines × 2) crates/topcoat-ui/registry/src/components/table.rs:39— crates/topcoat-ui/registry/src/components/table.rs:39-187 | demos/admin/src/components/table.rs:39-187 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/table.rs` and `demos/admin/src/components/table.rs` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/table.rs:39` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (38 lines × 2) crates/topcoat-view/src/html/element.rs:41— crates/topcoat-view/src/html/element.rs:41-78 | crates/topcoat-view/src/html/node.rs:37-137 — 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 `crates/topcoat-view/src/html/element.rs:41` 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 (7 lines × 14) crates/topcoat-font/grammar/src/font_face/display.rs:28— crates/topcoat-font/grammar/src/font_face/display.rs:28-34 | crates/topcoat-font/grammar/src/font_face/family.rs:23-29 | crates/topcoat-font/grammar/src/font_face/source.rs:28-34 | crates/topcoat-font/grammar/src/font_face/style.rs:26-32 | crates/topcoat-font/grammar/src/font_face/unicode.rs:25-31 | crates/topcoat-font/grammar/src/font_face/weight.rs:25-31 | crates/topcoat-font/grammar/src/fontsource/font/style.rs:20-26 | crates/topcoat-font/grammar/src/fontsource/font/subset.rs:20-26 | crates/topcoat-font/grammar/src/fontsource/font/weight.rs:20-26 | crates/topcoat-font/grammar/src/fontsource/font_face/display.rs:27-33 | crates/topcoat-font/grammar/src/fontsource/font_face/host.rs:30-36 | crates/topcoat-font/grammar/src/fontsource/font_face/style.rs:25-31 | crates/topcoat-font/grammar/src/fontsource/font_face/subset.rs:25-31 | crates/topcoat-font/grammar/src/fontsource/font_face/weight.rs:25-31 — before extracting anything, compare `crates/topcoat-font/grammar/src/font_face/display.rs` and `crates/topcoat-font/grammar/src/font_face/weight.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 14) crates/topcoat-font/grammar/src/font_face/display.rs:51— crates/topcoat-font/grammar/src/font_face/display.rs:51-56 | crates/topcoat-font/grammar/src/font_face/family.rs:46-51 | crates/topcoat-font/grammar/src/font_face/source.rs:51-56 | crates/topcoat-font/grammar/src/font_face/style.rs:49-54 | crates/topcoat-font/grammar/src/font_face/unicode.rs:48-53 | crates/topcoat-font/grammar/src/font_face/weight.rs:48-53 | crates/topcoat-font/grammar/src/fontsource/font/style.rs:37-42 | crates/topcoat-font/grammar/src/fontsource/font/subset.rs:37-42 | crates/topcoat-font/grammar/src/fontsource/font/weight.rs:37-42 | crates/topcoat-font/grammar/src/fontsource/font_face/display.rs:44-49 | crates/topcoat-font/grammar/src/fontsource/font_face/host.rs:53-58 | crates/topcoat-font/grammar/src/fontsource/font_face/style.rs:42-47 | crates/topcoat-font/grammar/src/fontsource/font_face/subset.rs:42-47 | crates/topcoat-font/grammar/src/fontsource/font_face/weight.rs:42-47 — before extracting anything, compare `crates/topcoat-font/grammar/src/font_face/display.rs` and `crates/topcoat-font/grammar/src/font_face/weight.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) crates/topcoat-router/src/content/css.rs:41— crates/topcoat-router/src/content/css.rs:41-47 | crates/topcoat-router/src/content/html.rs:41-47 | crates/topcoat-router/src/content/json.rs:103-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (12 lines × 3) crates/topcoat-ui/registry/src/components/dropdown_menu.rs:94— crates/topcoat-ui/registry/src/components/dropdown_menu.rs:94-105 | crates/topcoat-ui/registry/src/components/popover.rs:66-77 | demos/admin/src/components/dropdown_menu.rs:94-105 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/dropdown_menu.rs` and `demos/admin/src/components/dropdown_menu.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/dropdown_menu.rs:94` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) crates/topcoat-ui/registry/src/components/dropdown_menu.rs:135— crates/topcoat-ui/registry/src/components/dropdown_menu.rs:135-150 | crates/topcoat-ui/registry/src/components/popover.rs:110-125 | demos/admin/src/components/dropdown_menu.rs:135-150 — before extracting anything, compare `crates/topcoat-ui/registry/src/components/dropdown_menu.rs` and `demos/admin/src/components/dropdown_menu.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-ui/registry/src/components/dropdown_menu.rs:135` 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 × 6) crates/topcoat-router/grammar/src/layout.rs:55— crates/topcoat-router/grammar/src/layout.rs:55-62 | crates/topcoat-router/grammar/src/page.rs:68-75 | crates/topcoat-router/grammar/src/route.rs:62-69 | crates/topcoat-runtime/grammar/src/procedure.rs:52-59 | crates/topcoat-runtime/grammar/src/shard/item.rs:26-33 | crates/topcoat-view/grammar/src/component/item.rs:26-33 — before extracting anything, compare `crates/topcoat-router/grammar/src/page.rs` and `crates/topcoat-router/grammar/src/route.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/topcoat-router/grammar/src/layout.rs:55` 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 × 3) crates/topcoat-view/src/internal/live_view.rs:88— crates/topcoat-view/src/internal/live_view.rs:88-92 | crates/topcoat-view/src/internal/move_view.rs:57-61 | crates/topcoat-view/src/internal/move_view.rs:73-77 — 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.
D4 · Code Duplication· Edited copy of a member (99 corresponding lines) · ×1
Edited copy of a member (99 corresponding lines) demos/admin/src/app/_admin/orders.rs:67— demos/admin/src/app/_admin/orders.rs:67-165 | demos/admin/src/app/_admin/products.rs:65-163 — These two members are one piece of code written twice and then edited apart: 99 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, 59+ corresponding lines) · ×1
Edited copies of one member (3 members, 59+ corresponding lines) demos/admin/src/app/_admin/customers.rs:142— demos/admin/src/app/_admin/customers.rs:142-200 | demos/admin/src/app/_admin/orders.rs:174-240 | demos/admin/src/app/_admin/products.rs:172-238 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 59 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 (55 corresponding lines) · ×1
Edited copy of a member (55 corresponding lines) demos/admin/src/app/_admin/_dashboard.rs:255— demos/admin/src/app/_admin/_dashboard.rs:255-309 | demos/admin/src/app/_admin/orders.rs:248-305 — These two members are one piece of code written twice and then edited apart: 55 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 (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) demos/admin/src/app/_admin/customers.rs:267— demos/admin/src/app/_admin/customers.rs:267-308 | demos/admin/src/app/_admin/orders.rs:308-348 — These two members are one piece of code written twice and then edited apart: 41 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) demos/admin/src/app/_admin/_dashboard.rs:312— demos/admin/src/app/_admin/_dashboard.rs:312-342 | demos/admin/src/app/_admin/products.rs:287-319 — 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 copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) demos/admin/src/app/_admin/customers.rs:311— demos/admin/src/app/_admin/customers.rs:311-329 | demos/admin/src/app/_admin/orders/order_id.rs:196-216 | demos/admin/src/app/_admin/products.rs:322-339 — 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, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) demos/admin/src/app/_admin/_dashboard.rs:345— demos/admin/src/app/_admin/_dashboard.rs:345-360 | demos/admin/src/app/_admin/customers/customer_id.rs:226-241 | demos/admin/src/app/_admin/orders.rs:351-367 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
Duplicated block (11 lines × 3) demos/admin/src/app/_admin/customers.rs:149— demos/admin/src/app/_admin/customers.rs:149-159 | demos/admin/src/app/_admin/orders.rs:186-198 | demos/admin/src/app/_admin/products.rs:184-196 — before extracting anything, compare `demos/admin/src/app/_admin/orders.rs` and `demos/admin/src/app/_admin/products.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `demos/admin/src/app/_admin/customers.rs:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Coverage not measured — .NET and JavaScript/TypeScript suite — Coverage NOT MEASURED: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half could not be measured — crates/topcoat-cli/browser/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
Minor — 41 finding(s)
P10 · Library API & versioning· Implementation type on the public API · ×13
Implementation type on the public API crates/topcoat-core/src/internal.rs:1— 1 public type in `topcoat_core.internal` is marked as implementation by its own namespace, folder or name: `ResultExt` (crates/topcoat-core/src/internal.rs:1, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/builder.rs:14— 1 public type in `topcoat_view.internal.builder` is marked as implementation by its own namespace, folder or name: `Builder` (crates/topcoat-view/src/internal/builder.rs:14, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/capture.rs:11— 1 public type in `topcoat_view.internal.capture` is marked as implementation by its own namespace, folder or name: `Capture` (crates/topcoat-view/src/internal/capture.rs:11, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/either_view.rs:19— 1 public type in `topcoat_view.internal.either_view` is marked as implementation by its own namespace, folder or name: `EitherView` (crates/topcoat-view/src/internal/either_view.rs:19, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/error_boundary_view.rs:25— 1 public type in `topcoat_view.internal.error_boundary_view` is marked as implementation by its own namespace, folder or name: `ErrorBoundaryView` (crates/topcoat-view/src/internal/error_boundary_view.rs:25, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/join_view.rs:19— 4 public types in `topcoat_view.internal.join_view` are marked as implementation by their own namespace, folder or name: `JoinView` (crates/topcoat-view/src/internal/join_view.rs:19, `internal`), `JoinUnits` (crates/topcoat-view/src/internal/join_view.rs:104, `internal`), `JoinUnit` (crates/topcoat-view/src/internal/join_view.rs:157, `internal`), `JoinPair` (crates/topcoat-view/src/internal/join_view.rs:234, `internal`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/live_view.rs:22— 2 public types in `topcoat_view.internal.live_view` are marked as implementation by their own namespace, folder or name: `LiveView` (crates/topcoat-view/src/internal/live_view.rs:22, `internal`), `EmitView` (crates/topcoat-view/src/internal/live_view.rs:126, `internal`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/loop_view.rs:15— 1 public type in `topcoat_view.internal.loop_view` is marked as implementation by its own namespace, folder or name: `LoopView` (crates/topcoat-view/src/internal/loop_view.rs:15, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/move_view.rs:23— 1 public type in `topcoat_view.internal.move_view` is marked as implementation by its own namespace, folder or name: `MoveView` (crates/topcoat-view/src/internal/move_view.rs:23, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/node_classify.rs:11— 1 public type in `topcoat_view.internal.node_classify` is marked as implementation by its own namespace, folder or name: `NodeClassify` (crates/topcoat-view/src/internal/node_classify.rs:11, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/scope_view.rs:17— 1 public type in `topcoat_view.internal.scope_view` is marked as implementation by its own namespace, folder or name: `ScopeView` (crates/topcoat-view/src/internal/scope_view.rs:17, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/suspense_view.rs:25— 1 public type in `topcoat_view.internal.suspense_view` is marked as implementation by its own namespace, folder or name: `SuspenseView` (crates/topcoat-view/src/internal/suspense_view.rs:25, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API crates/topcoat-view/src/internal/then_view.rs:18— 1 public type in `topcoat_view.internal.then_view` is marked as implementation by its own namespace, folder or name: `ThenView` (crates/topcoat-view/src/internal/then_view.rs:18, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Mock-dominated test: ignores a superseded redirect even when the request ignores cancellation crates/topcoat-runtime/browser/src/render/request.test.ts:122— This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: aborts on disposal and ignores the disposed owner's redirect crates/topcoat-runtime/browser/src/render/request.test.ts:164— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: batches scheduled requests and reports their failures once crates/topcoat-runtime/browser/src/render/request.test.ts:180— This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: handles a streamed %s before the response ends crates/topcoat-cli/browser/src/refresh.test.ts:181— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: reloads an initial document still streaming instead of waiting for DOMContentLoaded crates/topcoat-cli/browser/src/refresh.test.ts:217— This test sets up 3 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
S1 · Web-Security Posture· No inbound model validation detected · ×4
No inbound model validation detected — No ModelState/[ApiController]/FluentValidation signal — inbound payloads reach handlers unvalidated. (−2.0 on this card.)
No inbound model validation detected REDACTED:31— `MapGet("/products")` binds request input and nothing in this codebase validates it — no [ApiController]/ModelState check, validator or guard.
No inbound model validation detected REDACTED:32— `MapGet("/products/{id}")` binds request input and nothing in this codebase validates it — no [ApiController]/ModelState check, validator or guard.
No inbound model validation detected REDACTED:33— `MapPost("/cart")` binds request input and nothing in this codebase validates it — no [ApiController]/ModelState check, validator or guard.
Silent fallback default on Err benchmarks/runner/src/server.rs:361— `tail` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/topcoat-cli/src/asset/clean.rs:66— `subdirs` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/topcoat-cli/src/common/version.rs:76— `mismatches` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/topcoat-icon/grammar/src/iconify/staged.rs:95— `staged_prefixes` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. (−2.0 on this card.)
No security response headers detected benchmarks/apps/aspnet/Program.cs:15— This web host's pipeline is composed here and adds no security response header (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, a frame policy) to what it serves.
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/4 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/topcoat`, `crates/topcoat-font`, `crates/topcoat-router`.
No dependency-update automation benchmarks/apps/nextjs/package.json:10— `benchmarks/apps/nextjs/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
Secure cookie flags not detected benchmarks/apps/aspnet/Infrastructure/Cart.cs:16— No CookieSecurePolicy/HttpOnly/SameSite configuration found. (−1.5 on this card; skip if the app sets no cookies.)
Duplicated predicate crates/topcoat-core/grammar/src/common/lenient/field_value.rs:50— `input.peek(Token![:]) && !input.peek(Token![::])` appears character-identically in 2 files — crates/topcoat-core/grammar/src/common/lenient/field_value.rs, crates/topcoat-l10n/grammar/src/fluent/translate/argument.rs. 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.
Null-forgiving operator (`!`) suppressions override nullable warnings — ~1.2 `!` suppressions per 1k syntax nodes — 5 suppression(s) across the 4207 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
doc comments repeat the names REDACTED:8— 0 of 3 documented parameters and 2 of 64 summaries in `Harbor` only repeat the member or parameter name (e.g. "A page of products." for `ProductPage`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names benchmarks/apps/nextjs/src/lib/store.ts:60— 0 of 0 documented parameters and 1 of 71 summaries in `harbor-nextjs` only repeat the member or parameter name (e.g. "The record of `category`." for `categoryRecord`). Delete the restating tags, or add what the name does not say.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 3 file(s) — `benchmarks/apps/aspnet/Catalog/HarborJsonContext.cs`, `REDACTED`, `REDACTED` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1db99-82c1-741c-8f2a-88f55ebef8ec · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Appendix C — Personal-data map
Every field, property and record parameter whose name is conventional personal data — 1 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.
Issues: 43 · Warnings: 328 · Recommendations: 41 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 19:47 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.